我试出来了!用 MASM 写的.<br><br>.386<br>.model flat ,stdcall<br><br>include windows.inc<br>include kernel32.inc<br>include user32.inc<br>include Comctl32.inc <br>include gdi32.inc<br><br>includelib kernel32.lib<br>includelib user32.lib<br>includelib Comctl32.lib<br>includelib gdi32.lib<br><br>.const<br> IDD_MAIN dd 1000<br> IDC_BTNOK dd 1002<br> <br>.data<br>szCaption db 'Dialog',0<br>szMsg db 'Program Run OK!',0<br>szError db 'Error',0<br><br>hInst dd ?<br><br>.data?<br><br>DlgProc proto :HWND,:UINT,:WPARAM,:LPARAM<br><br>.code<br>start:<br> invoke GetModuleHandle,NULL<br> mov hInst ,eax<br> invoke InitCommonControls<br> invoke DialogBoxParam,hInst,IDD_MAIN,NULL,Addr DlgProc,NULL<br> invoke ExitProcess,NULL<br><br>DlgProc proc hDlg:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM<br> <br> mov eax ,uMsg<br> .if eax == WM_CLOSE <br> invoke EndDialog,hDlg,NULL<br> .elseif eax == WM_COMMAND<br> mov eax ,wParam<br> .if eax == IDC_BTNOK <br> invoke MessageBox,hDlg,Addr szMsg,Addr szCaption,MB_ICONINFORMATION<br> .endif<br> .endif<br> <br> <br> xor eax,eax<br> ret<br><br>DlgProc endp<br> <br>end start