WS_OVERLAPPEDWINDOW, \ window style
CW_USEDEFAULT, \ horizontal position of window
CW_USEDEFAULT, \ vertical position of window
CW_USEDEFAULT, \ window width
CW_USEDEFAULT, \ window height
0, \ handle to parent or owner window
eax, \ handle to menu, or child-window identifier
[hInst], \ handle to application instance
0 ; pointer to window-creation data
ENDIF
mov [hWnd],eax
call ShowWindow, eax, SW_SHOW ; show window
call UpdateWindow, [hWnd] ; redraw window
IFDEF VER3
call LoadMenuA, [hInst], MyMenu
mov [hMenu],eax
call SetMenu, [hWnd], eax
ENDIF
msg_loop:
call GetMessageA, offset msg, 0, 0, 0
or ax,ax
jz exit
call TranslateMessage, offset msg
call DispatchMessageA, offset msg
jmp msg_loop
exit: call ExitProcess, 0
public stdcall WndProc
proc WndProc stdcall
arg @@hwnd: dword, @@msg: dword, @@wPar: dword, @@lPar: dword
mov eax,[@@msg]