call MessageBoxA, 0, offset szHello, \
offset szAppName, \
MB_OK or MB_ICONINFORMATION
bye: call ExitProcess, 0
public stdcall DlgProc
proc DlgProc stdcall
arg @@hDlg :dword, @@iMsg :dword, @@wPar :dword, @@lPar :dword
mov eax,[@@iMsg]
cmp eax,WM_INITDIALOG
je @@init
cmp eax,WM_COMMAND
jne @@ret_false
mov eax,[@@wPar]
cmp eax,IDCANCEL
je @@cancel
cmp eax,IDOK
jne @@ret_false
call GetDlgItemTextA, @@hDlg, IDR_NAME, \
offset szUser, MAX_USER_NAME
mov eax,IDOK
@@cancel: call EndDialog, @@hDlg, eax
@@ret_false: xor eax,eax
ret
@@init: call GetDlgItem, @@hDlg, IDR_NAME
call SetFocus, eax
jmp @@ret_false
endp DlgProc
end Start
#include "resource.h"
IDD_DIALOG DIALOGEX 0, 0, 187, 95