extrn MessageBoxA :ptMessageBox
extrn ExitProcess :ptExitProcess
UDataSeg
hInst dd ?
hWnd dd ?
IFNDEF VER1
hMenu dd ?
ENDIF
DataSeg
msg msgStruc <>
classTitle db 'Menu demo', 0
wndTitle db 'Demo program', 0
msg_open_txt db 'You selected open', 0
msg_open_tlt db 'Open box', 0
msg_save_txt db 'You selected save', 0
msg_save_tlt db 'Save box', 0
CodeSeg
Start: call GetModuleHandleA, 0 ; не обязательно, но желательно
mov [hInst],eax
sub esp,SIZE WndClassEx ; отведём место в стеке под структуру
mov [(WndClassEx esp).cbSize],SIZE WndClassEx
mov [(WndClassEx esp).style],CS_HREDRAW or CS_VREDRAW
mov [(WndClassEx esp).lpfnWndProc],offset WndProc
mov [(WndClassEx esp).cbWndExtra],0
mov [(WndClassEx esp).cbClsExtra],0
mov [(WndClassEx esp).hInstance],eax
call LoadIconA, 0, IDI_APPLICATION
mov [(WndClassEx esp).hIcon],eax
call LoadCursorA, 0, IDC_ARROW
mov [(WndClassEx esp).hCursor],eax