News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

dialog box problems!

Started by xandaz, November 18, 2021, 07:08:38 AM

Previous topic - Next topic

xandaz

    I does the Dialog Box vanish and doesn't stick active? Here's the code:__UNICODE__ equ TRUE

include \masm32\include\masm32rt.inc
DialogProc PROTO :DWORD,:DWORD,:DWORD,:DWORD
.data
hInstance dd ?

.code
start:
invoke GetModuleHandle,0
mov hInstance,eax
invoke CreateDialogParam,hInstance,1000,0,addr DialogProc,0
invoke ExitProcess,eax

DialogProc PROC hWnd:DWORD,uMsg:DWORD,wParam:DWORD,lParam:DWORD
.if uMsg==WM_INITDIALOG
.elseif uMsg==WM_DESTROY
invoke EndDialog,hWnd,0
.else
invoke DefWindowProc,hWnd,uMsg,wParam,lParam
.endif
mov eax,TRUE
ret
DialogProc endp

end start
ยด
    Thanks in advance for helping

xandaz

    Sorry. I was using the improper function. I changed to DialogBoxParamand it works just fine. Thanks anyway.