Michael Hartlef
09-09-2008, 09:47
Hi folks,
I wonder why when you switch back and forth from one to the other dialog, the caption of the second dialog is not visible, when it is active:
' Basic Template for custom dialog
' Start Date 09-09-2008
' Created by by
USES "UI"
DIM hDlg, hDlg2 AS DWORD
DIM Msg, wParam, lParam AS DWORD
DIM Ctrl, CtrlMsg AS DWORD
' -- ID numbers of controls
BEGIN CONST
%btnClose = 1000
%btnClose2
END CONST
DIALOG NEW 0, "<Enter title here>", 5, 100, 160, 120, _
%WS_POPUP OR %WS_VISIBLE OR _
%WS_CLIPCHILDREN OR %WS_CAPTION OR _
%WS_SYSMENU OR %WS_MINIMIZEBOX, 0 TO hDlg
DIALOG NEW 0, "<Enter title here2>", 200, 100, 160, 120, _
%WS_POPUP OR %WS_VISIBLE OR _
%WS_CLIPCHILDREN OR %WS_CAPTION OR _
%WS_SYSMENU OR %WS_MINIMIZEBOX, 0 TO hDlg2
' -- Place controls here
CONTROL ADD BUTTON, hDlg, %btnClose, "Click to close", 95, 100, 60, 14
' -- Place controls here
CONTROL ADD BUTTON, hDlg2, %btnClose2, "Click to close2", 95, 100, 60, 14
DIALOG SHOW MODELESS hDlg2
DIALOG SHOW MODELESS hDlg
WHILE ISWINDOW( hDlg )
' -- Get dialog messages
Msg = GETMESSAGE( hDlg, wParam, lParam )
SELECT CASE Msg
CASE %WM_Command
' -- Here you can process the input from controls
Ctrl = LOWRD( wParam )
CtrlMsg = HIWRD( wParam )
SELECT CASE Ctrl
CASE %btnClose
IF CtrlMsg = 0 THEN EXIT WHILE
CASE %btnClose2
IF CtrlMsg = 0 THEN EXIT WHILE
END SELECT
CASE %WM_SYSCOMMAND
IF wParam = %SC_Close THEN EXIT WHILE
END SELECT
' -- Get dialog2 messages
Msg = GETMESSAGE( hDlg2, wParam, lParam )
SELECT CASE Msg
CASE %WM_Command
' -- Here you can process the input from controls
Ctrl = LOWRD( wParam )
CtrlMsg = HIWRD( wParam )
SELECT CASE Ctrl
CASE %btnClose2
IF CtrlMsg = 0 THEN EXIT WHILE
END SELECT
CASE %WM_SYSCOMMAND
IF wParam = %SC_Close THEN EXIT WHILE
END SELECT
WEND
' -- Closes the dialog
DIALOG END hDlg2
DIALOG END hDlg
I wonder why when you switch back and forth from one to the other dialog, the caption of the second dialog is not visible, when it is active:
' Basic Template for custom dialog
' Start Date 09-09-2008
' Created by by
USES "UI"
DIM hDlg, hDlg2 AS DWORD
DIM Msg, wParam, lParam AS DWORD
DIM Ctrl, CtrlMsg AS DWORD
' -- ID numbers of controls
BEGIN CONST
%btnClose = 1000
%btnClose2
END CONST
DIALOG NEW 0, "<Enter title here>", 5, 100, 160, 120, _
%WS_POPUP OR %WS_VISIBLE OR _
%WS_CLIPCHILDREN OR %WS_CAPTION OR _
%WS_SYSMENU OR %WS_MINIMIZEBOX, 0 TO hDlg
DIALOG NEW 0, "<Enter title here2>", 200, 100, 160, 120, _
%WS_POPUP OR %WS_VISIBLE OR _
%WS_CLIPCHILDREN OR %WS_CAPTION OR _
%WS_SYSMENU OR %WS_MINIMIZEBOX, 0 TO hDlg2
' -- Place controls here
CONTROL ADD BUTTON, hDlg, %btnClose, "Click to close", 95, 100, 60, 14
' -- Place controls here
CONTROL ADD BUTTON, hDlg2, %btnClose2, "Click to close2", 95, 100, 60, 14
DIALOG SHOW MODELESS hDlg2
DIALOG SHOW MODELESS hDlg
WHILE ISWINDOW( hDlg )
' -- Get dialog messages
Msg = GETMESSAGE( hDlg, wParam, lParam )
SELECT CASE Msg
CASE %WM_Command
' -- Here you can process the input from controls
Ctrl = LOWRD( wParam )
CtrlMsg = HIWRD( wParam )
SELECT CASE Ctrl
CASE %btnClose
IF CtrlMsg = 0 THEN EXIT WHILE
CASE %btnClose2
IF CtrlMsg = 0 THEN EXIT WHILE
END SELECT
CASE %WM_SYSCOMMAND
IF wParam = %SC_Close THEN EXIT WHILE
END SELECT
' -- Get dialog2 messages
Msg = GETMESSAGE( hDlg2, wParam, lParam )
SELECT CASE Msg
CASE %WM_Command
' -- Here you can process the input from controls
Ctrl = LOWRD( wParam )
CtrlMsg = HIWRD( wParam )
SELECT CASE Ctrl
CASE %btnClose2
IF CtrlMsg = 0 THEN EXIT WHILE
END SELECT
CASE %WM_SYSCOMMAND
IF wParam = %SC_Close THEN EXIT WHILE
END SELECT
WEND
' -- Closes the dialog
DIALOG END hDlg2
DIALOG END hDlg