-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTextModeWindow.asm
More file actions
41 lines (34 loc) · 868 Bytes
/
TextModeWindow.asm
File metadata and controls
41 lines (34 loc) · 868 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
.386
.model flat,stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
; *************************************************************************
; Our Dialog Window procedure prototype
; *************************************************************************
dlgproc PROTO :DWORD,:DWORD,:DWORD,:DWORD
.Data?
.Data
.Code
dlgproc proc hWnd:DWORD, uMsg:DWORD, wParam:DWORD, lParam:DWORD
.IF uMsg==WM_DESTROY
invoke PostQuitMessage,NULL
.ELSEIF uMsg==WM_COMMAND
mov eax,wParam
.IF lParam==0
; Process messages, else...
invoke DestroyWindow,hWnd
.ELSE
mov edx,wParam
shr edx,16
; Process messages here
.ENDIF
.ELSE
invoke DefWindowProc,hWnd,uMsg,wParam,lParam
ret
.ENDIF
xor eax,eax
ret
dlgproc endp
end