Author Topic: dialog box problems!  (Read 799 times)

xandaz

  • Member
  • ****
  • Posts: 529
  • I luv you babe
    • My asm examples
dialog box problems!
« on: November 18, 2021, 07:08:38 AM »
    I does the Dialog Box vanish and doesn't stick active? Here's the code:
Code: [Select]
__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

  • Member
  • ****
  • Posts: 529
  • I luv you babe
    • My asm examples
Re: dialog box problems!
« Reply #1 on: November 18, 2021, 08:01:22 AM »
    Sorry. I was using the improper function. I changed to DialogBoxParamand it works just fine. Thanks anyway.