-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.asm
68 lines (42 loc) · 2 KB
/
main.asm
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
;-----------------------------------------------------------------------
.586
.model flat, stdcall
option casemap : none
;-----------------------------------------------------------------------
include project.inc
include core.asm
;-----------------------------------------------------------------------
.code
MainDlgProc proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM
switch uMsg
case WM_INITDIALOG
invoke FindResource, hInst, IDR_INF, RT_RCDATA
invoke LoadResource, hInst, eax
invoke LockResource, eax
invoke SendDlgItemMessage, hWnd, IDE_INF, WM_SETTEXT, 0, eax
invoke SendDlgItemMessage, hWnd, IDE_REG, WM_SETTEXT, 0, addr szUnregistered
invoke CreateFontIndirect, addr sFont
invoke SendDlgItemMessage, hWnd, IDE_REG, WM_SETFONT, eax, 0
invoke core, hWnd
case WM_COMMAND
.if wParam == IDB_CLSINF
invoke SendMessage, hWnd, WM_CLOSE, 0, 0
.endif
case WM_CLOSE || uMsg == WM_RBUTTONUP || uMsg == WM_LBUTTONDBLCLK
invoke EndDialog, hWnd, 0
case WM_LBUTTONDOWN
invoke SendMessage, hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0
case WM_DEFEATED
invoke registration_info, hWnd, wParam
endsw
xor eax, eax
ret
MainDlgProc endp
;-----------------------------------------------------------------------
Start:
invoke GetModuleHandle, 0
mov hInst, eax
invoke DialogBoxParam, 0, IDD_DLG, 0, MainDlgProc, 0
invoke ExitProcess, 0
end Start
;-----------------------------------------------------------------------