32位汇编MessageBox的问题
假如程序中调用MessageBox函数:invoke MessageBox,NULL,offset ExitMsg,offset AppName,MB_OKCANCEL
我要怎么样才能处理MessageBox中单击“确认”按钮这个消息?
程序代码:; #define IDOK 1
; #define IDCANCEL 2
; #define IDABORT 3
; #define IDRETRY 4
; #define IDIGNORE 5
; #define IDYES 6
; #define IDNO 7
; #if(WINVER >= 0x0400)
; #define IDCLOSE 8
; #define IDHELP 9
.386
.model flat, stdcall
option casemap:none
include windows.inc
include gdi32.inc
includelib gdi32.lib
include user32.inc
includelib user32.lib
include kernel32.inc
includelib kernel32.lib
.data?
hInstance dd ?
hWinMain dd ?
.const
szText db 'xx', 0
szTextOne db 'gg', 0
szCaption db 'oo', 0
szCaptionOne db 'jj', 0
.code
_WinMain proc
invoke MessageBox, NULL, offset szText, offset szCaption, MB_YESNO or MB_ICONQUESTION
cmp eax, 6
jne ok
invoke MessageBox, NULL, offset szTextOne, offset szCaptionOne, MB_OK
ok: ret
_WinMain endp
start:
call _WinMain
invoke ExitProcess, NULL
end start