-
Notifications
You must be signed in to change notification settings - Fork 5
/
progbar.asm
46 lines (43 loc) · 1.08 KB
/
progbar.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
.data?
bProgBarStopping1 dd ?
bProgBarStopping2 dd ?
nProgBarLine dd ?
hProgBarWindow dd ?
.code
_TimerThreadPB proc _lparam
.while !bProgBarStopping2 && hProgBarWindow
invoke Sleep,200
invoke SendDlgItemMessageW,hProgBarWindow,IDC_PRBAR_BAR,PBM_SETPOS,nProgBarLine,0
.endw
ret
_TimerThreadPB endp
_WndProgBarProc proc uses edi esi ebx hwnd,uMsg,wParam,lParam
mov eax,uMsg
.if eax==WM_COMMAND
.if wParam==IDC_PRBAR_STOP
mov bProgBarStopping1,1
mov bProgBarStopping2,1
invoke EndDialog,hwnd,0
.endif
.elseif eax==WM_INITDIALOG
mov eax,hwnd
mov hProgBarWindow,eax
mov esi,lParam
.if esi
.if !_ProgBarInfo.bNoStop[esi]
invoke SendDlgItemMessageW,hwnd,IDC_PRBAR_STOP,WM_ENABLE,FALSE,0
.endif
.if _ProgBarInfo.lpszTitle[esi]
invoke SetWindowTextW,hwnd,_ProgBarInfo.lpszTitle[esi]
.endif
.endif
.if bProgBarStopping1
invoke EndDialog,hwnd,0
.endif
invoke CreateThread,0,0,offset _TimerThreadPB,0,0,0
.elseif eax==WM_DESTROY
mov hProgBarWindow,0
.endif
xor eax,eax
ret
_WndProgBarProc endp