09-19-2007, 06:58 AM
Example function Dialog33
WM_SIZING and other windows messages are documented in the MSDN library on the internet.
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
if(!ShowDialog("Dialog33" &Dialog33)) ret
;BEGIN DIALOG
;0 "" 0x90CC0A44 0x100 0 0 222 134 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2020100 "" ""
ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
,;--- insert this ---
,case WM_SIZING
,RECT* r=+lParam
,if(r.right-r.left<400) r.right=r.left+400
,if(r.bottom-r.top<200) r.bottom=r.top+200
,ret DT_Ret(hDlg 1)
,;-------------------
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
WM_SIZING and other windows messages are documented in the MSDN library on the internet.