A pretty simple question, How do i make the dialog shown below start maximized and be resizable? I can't seem to find a WS_SOMETHING for when i state the size of the dialog in the resource section for either of these. I think i might have to use SendMessage() with something in the WM_INITDIALOG section telling the dialog be maximized before its shown but im not sure. I haven't done any Windows programming for a while now so i'm having to learn it all again
. If someone could just point me in the right direction here that would be great.
format PE GUI 4.0
entry start
include '../../INCLUDE/win32a.inc'
section '.data' data readable writeable
flags dd ?
;end of .data
section '.code' code readable executable
start:
invoke GetModuleHandle,0
invoke DialogBoxParam,eax,37,HWND_DESKTOP,DialogProc,0
or eax,eax
jz exit
exit:
invoke ExitProcess,0
;end of .code
proc DialogProc hwnddlg,msg,wparam,lparam
push ebx esi edi
cmp [msg],WM_INITDIALOG
je wminitdialog
cmp [msg],WM_COMMAND
je wmcommand
cmp [msg],WM_CLOSE
je wmclose
xor eax,eax
jmp finish
wminitdialog:
jmp processed
wmcommand:
jmp processed
wmclose:
invoke EndDialog,[hwnddlg],0
processed:
mov eax,1
finish:
pop edi esi ebx
ret
endp
;end of dialog procedure
section '.idata' import data readable writeable
library kernel,'KERNEL32.DLL',user,'USER32.DLL'
import kernel,GetModuleHandle,'GetModuleHandleA',ExitProcess,'ExitProcess'
import user,DialogBoxParam,'DialogBoxParamA',EndDialog,'EndDialog'
;function imports from WINAPI
section '.rsrc' resource data readable
directory RT_DIALOG,dialogs
resource dialogs,37,LANG_ENGLISH+SUBLANG_DEFAULT,maindialog
dialog maindialog,'Dialog Box',130,50,600,500,WS_CAPTION+WS_POPUP+WS_SYSMENU+WS_MAXIMIZEBOX+WS_MINIMIZEBOX
enddialog
;End of Resource Data