-
Notifications
You must be signed in to change notification settings - Fork 0
/
wiq_1.inc
42 lines (25 loc) · 998 Bytes
/
wiq_1.inc
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
section '.text' code readable executable
start: invoke GetModuleHandle,0 ;çàïîëíÿåì ñòðóêòóðó wc è ñîçäà¸ì îêíî
mov [wc.hInstance],eax ; ïîìåùàåì àäðåñ â [wc.hInstance]
invoke LoadIcon,eax, 17 ;
mov [wc.hIcon],eax
invoke LoadCursor,0,IDC_ARROW
mov [wc.hCursor],eax
invoke RegisterClass,wc
test eax,eax ; WS_VISIBLE+WS_DLGFRAME+WS_SYSMENU,\
jz error ; WS_OVERLAPPEDWINDOW
invoke CreateWindowEx,0,_class,_title,WS_VISIBLE+WS_SYSMENU,\
128,128,648,526,NULL,NULL,[wc.hInstance],NULL ; [wc.hInstance]
test eax,eax
jz error
;-----------------------------------------------------------------------------------------
msg_loop: invoke GetMessage,msg,NULL,0,0
cmp eax,1
jb end_loop
jne msg_loop
invoke TranslateMessage,msg
invoke DispatchMessage,msg
jmp msg_loop
error: invoke MessageBox,NULL,_error,NULL,MB_ICONERROR+MB_OK
end_loop:
invoke ExitProcess,[msg.wParam]