#DIM ALL
#COMPILE EXE
#INCLUDE "WIN32API.INC"
%IDD_MAIN = 101
%IDC_CMD1 = 1001
DECLARE CALLBACK FUNCTION WndProc()
FUNCTION WINMAIN (BYVAL hInstance AS DWORD, _
BYVAL hPrevInstance AS DWORD, _
BYVAL lpCmdLine AS ASCIIZ PTR, _
BYVAL iCmdShow AS LONG) AS LONG
LOCAL hDlg AS DWORD
DIALOG NEW %HWND_DESKTOP, "Main Window", 100, 100, 200, 100, %WS_POPUP OR _
%WS_BORDER OR %WS_DLGFRAME OR %WS_SYSMENU OR %WS_CLIPSIBLINGS OR %WS_VISIBLE _
OR %DS_MODALFRAME OR %DS_3DLOOK OR %DS_NOFAILCREATE OR %DS_SETFONT, %WS_EX_WINDOWEDGE _
OR %WS_EX_CONTROLPARENT OR %WS_EX_LEFT OR %WS_EX_LTRREADING OR _
%WS_EX_RIGHTSCROLLBAR, TO hDlg
CONTROL ADD BUTTON, hDlg, %IDC_CMD1, "Show Child Window", 10, 10, 100, 20
DIALOG SHOW MODAL hDlg, CALL WndProc
END FUNCTION
SUB ShowNewWindow(BYVAL hParent AS DWORD)
LOCAL hDlg AS DWORD
DIALOG NEW hParent, "Child Window", 100, 100, 200, 100, %WS_POPUP OR _
%WS_BORDER OR %WS_DLGFRAME OR %WS_SYSMENU OR %WS_CLIPSIBLINGS OR %WS_VISIBLE _
OR %DS_MODALFRAME OR %DS_3DLOOK OR %DS_NOFAILCREATE OR %DS_SETFONT, %WS_EX_WINDOWEDGE _
OR %WS_EX_CONTROLPARENT OR %WS_EX_LEFT OR %WS_EX_LTRREADING OR _
%WS_EX_RIGHTSCROLLBAR, TO hDlg
DIALOG SHOW MODAL hDlg
END SUB
CALLBACK FUNCTION WndProc
SELECT CASE CBMSG
CASE %WM_COMMAND
SELECT CASE CBCTL
CASE %IDC_CMD1
CALL ShowNewWindow (BYVAL CBHNDL)
'CASE...
END SELECT
END SELECT
END FUNCTION
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 16