Subversion Repositories Kolibri OS

Rev

Rev 4988 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4988 Rev 5946
1
format MS COFF
1
format MS COFF
2
public EXPORTS
2
public EXPORTS
3
section '.flat' code readable align 16
3
section '.flat' code readable align 16
4
 
4
 
5
include '../../../macros.inc'
5
include '../../../macros.inc'
6
purge mov
6
macro movi arg1,arg2 {mov arg1,arg2}
7
include 'strlen.inc'
7
include 'strlen.inc'
8
 
8
 
9
MB_FIRST_BUT_ID equ 3 ;¨¤¥­â¨ä¨ª â®à 1-© ª­®¯ª¨ ­  á®®¡é¥­¨¨
9
MB_FIRST_BUT_ID equ 3 ;¨¤¥­â¨ä¨ª â®à 1-© ª­®¯ª¨ ­  á®®¡é¥­¨¨
10
MB_MAX_BUT equ 8 ;¬ ªá¨¬ «ì­®¥ ç¨á«® ª­®¯®ª ¢ á®®¡é¥­¨¨
10
MB_MAX_BUT equ 8 ;¬ ªá¨¬ «ì­®¥ ç¨á«® ª­®¯®ª ¢ á®®¡é¥­¨¨
11
MB_BUT_HEIGHT equ 20 ;¢ëá®â  ª­®¯ª¨ ­  á®®¡é¥­¨¨
11
MB_BUT_HEIGHT equ 20 ;¢ëá®â  ª­®¯ª¨ ­  á®®¡é¥­¨¨
12
CHAR_WIDTH equ 6 ;è¨à¨­  1-© ¡ãª¢ë ⥪áâ 
12
CHAR_WIDTH equ 6 ;è¨à¨­  1-© ¡ãª¢ë ⥪áâ 
13
MB_BUT_OTY_1 equ  5 ;¢ëà⨪ «ì­ë©(¥) ®âáâã¯(ë) ¬¥¦¤ã: § £®«®¢ª®¬ ®ª­  ¨ ⥪á⮬, ⥪á⮬ ª­®¯ª ¬¨
13
MB_BUT_OTY_1 equ  5 ;¢ëà⨪ «ì­ë©(¥) ®âáâã¯(ë) ¬¥¦¤ã: § £®«®¢ª®¬ ®ª­  ¨ ⥪á⮬, ⥪á⮬ ª­®¯ª ¬¨
14
;--- ®âáâã¯ë ­  ª­®¯ª å, 㪠§ ­­ë¥ ¢®¯à®á ¬¨: <-?->, ¡¥§ ãç¥â  ⥪áâ  ---
14
;--- ®âáâã¯ë ­  ª­®¯ª å, 㪠§ ­­ë¥ ¢®¯à®á ¬¨: <-?->, ¡¥§ ãç¥â  ⥪áâ  ---
15
MB_BUT_OTX_1 equ  5 ;[<-?->Caption.....]
15
MB_BUT_OTX_1 equ  5 ;[<-?->Caption.....]
16
MB_BUT_OTX_2 equ 10 ;[<-?->Caption<-?->]
16
MB_BUT_OTX_2 equ 10 ;[<-?->Caption<-?->]
17
MB_BUT_OTX_3 equ 15 ;[<-?->Caption<-?->]<-?->
17
MB_BUT_OTX_3 equ 15 ;[<-?->Caption<-?->]<-?->
18
MB_TEXT_OFFSET equ 2 ;ᬥ饭¨¥, ¯® ª®â®à®¬ã ­ ç¨­ ¥âìáï ⥪áâ § £®«®¢ª  ®ª­ 
18
MB_TEXT_OFFSET equ 2 ;ᬥ饭¨¥, ¯® ª®â®à®¬ã ­ ç¨­ ¥âìáï ⥪áâ § £®«®¢ª  ®ª­ 
19
 
19
 
20
align 4
20
align 4
21
start:
21
start:
22
  mov eax,48
22
  mov eax,48
23
  mov ebx,3
23
  mov ebx,3
24
  mov ecx,sc
24
  mov ecx,sc
25
  mov edx,sizeof.system_colors
25
  mov edx,sizeof.system_colors
26
  mcall
26
  mcall
27
  mov eax,40
27
  mov eax,40
28
  mov ebx,0x27
28
  mov ebx,0x27
29
  mcall
29
  mcall
30
 
30
 
31
  ;-- clear id pressed button ---
31
  ;-- clear id pressed button ---
32
  mov ebx,[mb_text]
32
  mov ebx,[mb_text]
33
  mov al,byte[ebx]
33
  mov al,byte[ebx]
34
  add al,MB_FIRST_BUT_ID
34
  add al,MB_FIRST_BUT_ID
35
  dec al
35
  dec al
36
  mov byte[mb_key_foc],al
36
  mov byte[mb_key_foc],al
37
 
37
 
38
  push [mb_text]
38
  push [mb_text]
39
  call MsgBoxReInit
39
  call MsgBoxReInit
40
 
40
 
41
align 4
41
align 4
42
red_win:
42
red_win:
43
  mov eax,12
43
  mov eax,12
44
  mov ebx,1
44
  mov ebx,1
45
  mcall
45
  mcall
46
 
46
 
47
  xor eax,eax
47
  xor eax,eax
48
  mov bx,word[mb_left]
48
  mov bx,word[mb_left]
49
  shl ebx,16
49
  shl ebx,16
50
  mov bx,word[mb_width]
50
  mov bx,word[mb_width]
51
  mov cx,word[mb_top]
51
  mov cx,word[mb_top]
52
  shl ecx,16
52
  shl ecx,16
53
  mov cx,word[mb_height]
53
  mov cx,word[mb_height]
54
  mov edx,[sc.work]
54
  mov edx,[sc.work]
55
  or  edx,0x33000000
55
  or  edx,0x33000000
56
  mov edi,[mb_text]
56
  mov edi,[mb_text]
57
  add edi,MB_TEXT_OFFSET ;Caption
57
  add edi,MB_TEXT_OFFSET ;Caption
58
  mcall
58
  mcall
59
 
59
 
60
  mcall 9,mb_procinfo,-1
60
  mcall 9,mb_procinfo,-1
61
  mov eax,dword[mb_procinfo.client_box.width]
61
  mov eax,dword[mb_procinfo.client_box.width]
62
 
62
 
63
  sub eax,[but_width]
63
  sub eax,[but_width]
64
  shr eax,1
64
  shr eax,1
65
  add eax,MB_BUT_OTX_1
65
  add eax,MB_BUT_OTX_1
66
  mov [ot_left],eax
66
  mov [ot_left],eax
67
 
67
 
68
  mov eax,4 ;à¨á®¢ ­¨¥ ⥪áâ 
68
  mov eax,4 ;à¨á®¢ ­¨¥ ⥪áâ 
69
  mov bx,MB_BUT_OTX_1
69
  mov bx,MB_BUT_OTX_1
70
  shl ebx,16
70
  shl ebx,16
71
  mov bx,MB_BUT_OTY_1
71
  mov bx,MB_BUT_OTY_1
72
  mov ecx,[sc.work_text]
72
  mov ecx,[sc.work_text]
73
  mov edx,[txtMsg]
73
  mov edx,[txtMsg]
74
 
74
 
75
  @@:
75
  @@:
76
    mov esi,edx
76
    mov esi,edx
77
    call strlen
77
    call strlen
78
    call linlen
78
    call linlen
79
 
79
 
80
    cmp eax,0
80
    cmp eax,0
81
    je @f
81
    je @f
82
 
82
 
83
    mov esi,eax
83
    mov esi,eax
84
    push eax
84
    push eax
85
      mov eax,4
85
      mov eax,4
86
      int 0x40
86
      int 0x40
87
    pop eax
87
    pop eax
88
 
88
 
89
    add edx,eax
89
    add edx,eax
90
    cmp byte[edx],0
90
    cmp byte[edx],0
91
    je @f
91
    je @f
92
    inc edx
92
    inc edx
93
 
93
 
94
    add ebx,10 ; move <--y-->
94
    add ebx,10 ; move <--y-->
95
    jmp @b
95
    jmp @b
96
  @@:
96
  @@:
97
 
97
 
98
  call MsgBoxDrawAllBut
98
  call MsgBoxDrawAllBut
99
  mcall 12,2
99
  mcall 12,2
100
 
100
 
101
align 4
101
align 4
102
still:
102
still:
103
  mov eax,10
103
  mov eax,10
104
  mcall
104
  mcall
105
 
105
 
106
  cmp al,1 ;¨§¬. ¯®«®¦¥­¨¥ ®ª­ 
106
  cmp al,1 ;¨§¬. ¯®«®¦¥­¨¥ ®ª­ 
107
  jz red_win
107
  jz red_win
108
  cmp al,2
108
  cmp al,2
109
  jz key
109
  jz key
110
  cmp al,3
110
  cmp al,3
111
  jz button
111
  jz button
112
 
112
 
113
  jmp still
113
  jmp still
114
 
114
 
115
align 4
115
align 4
116
key:
116
key:
117
  mcall 2
117
  mcall 2
118
  cmp ah,13
118
  cmp ah,13
119
  jne @f
119
  jne @f
120
    mov ah,[mb_key_foc]
120
    mov ah,[mb_key_foc]
121
    jmp close
121
    jmp close
122
  @@:
122
  @@:
123
 
123
 
124
  cmp ah,176 ;Left
124
  cmp ah,176 ;Left
125
  jne .no_left
125
  jne .no_left
126
  cmp [mb_key_foc],MB_FIRST_BUT_ID
126
  cmp [mb_key_foc],MB_FIRST_BUT_ID
127
  jg @f
127
  jg @f
128
    mov al,[mb_key_max]
128
    mov al,[mb_key_max]
129
    add [mb_key_foc],al
129
    add [mb_key_foc],al
130
  @@:
130
  @@:
131
    dec [mb_key_foc]
131
    dec [mb_key_foc]
132
    call MsgBoxDrawAllBut
132
    call MsgBoxDrawAllBut
133
  .no_left:
133
  .no_left:
134
 
134
 
135
  cmp ah,9 ;Tab
135
  cmp ah,9 ;Tab
136
  je @f
136
  je @f
137
  cmp ah,179 ;Right
137
  cmp ah,179 ;Right
138
  je @f
138
  je @f
139
	jmp .no_right
139
	jmp .no_right
140
  @@:
140
  @@:
141
  mov al,[mb_key_max]
141
  mov al,[mb_key_max]
142
  add al,MB_FIRST_BUT_ID
142
  add al,MB_FIRST_BUT_ID
143
  cmp [mb_key_foc],al
143
  cmp [mb_key_foc],al
144
  je .no_right
144
  je .no_right
145
    inc [mb_key_foc]
145
    inc [mb_key_foc]
146
    cmp [mb_key_foc],al
146
    cmp [mb_key_foc],al
147
    jl @f
147
    jl @f
148
      mov [mb_key_foc],MB_FIRST_BUT_ID
148
      mov [mb_key_foc],MB_FIRST_BUT_ID
149
    @@:
149
    @@:
150
    call MsgBoxDrawAllBut
150
    call MsgBoxDrawAllBut
151
  .no_right:
151
  .no_right:
152
 
152
 
153
  jmp still
153
  jmp still
154
 
154
 
155
align 4
155
align 4
156
button:
156
button:
157
  mcall 17 ;¯®«ãç¨âì ª®¤ ­ ¦ â®© ª­®¯ª¨
157
  mcall 17 ;¯®«ãç¨âì ª®¤ ­ ¦ â®© ª­®¯ª¨
158
  cmp ah,MB_FIRST_BUT_ID
158
  cmp ah,MB_FIRST_BUT_ID
159
  jge close
159
  jge close
160
  cmp ah,1
160
  cmp ah,1
161
  jne still
161
  jne still
162
 
162
 
163
;.exit:
163
;.exit:
164
  mov ah,MB_FIRST_BUT_ID
164
  mov ah,MB_FIRST_BUT_ID
165
  dec ah
165
  dec ah
166
close:
166
close:
167
  sub ah,MB_FIRST_BUT_ID
167
  sub ah,MB_FIRST_BUT_ID
168
  inc ah
168
  inc ah
169
  mov ebx,[mb_text]
169
  mov ebx,[mb_text]
170
  mov byte[ebx],ah
170
  mov byte[ebx],ah
171
 
171
 
172
  ;*** call msgbox functions ***
172
  ;*** call msgbox functions ***
173
  cmp ah,0
173
  cmp ah,0
174
  je @f
174
  je @f
175
  cmp dword[mb_funct],0
175
  cmp dword[mb_funct],0
176
  je @f
176
  je @f
177
    xor ebx,ebx
177
    xor ebx,ebx
178
    mov bl,ah
178
    mov bl,ah
179
    dec bl
179
    dec bl
180
    shl bx,2 ;bx=bx*4
180
    shl bx,2 ;bx=bx*4
181
    add ebx,dword[mb_funct]
181
    add ebx,dword[mb_funct]
182
    cmp dword[ebx],0
182
    cmp dword[ebx],0
183
    je @f
183
    je @f
184
      call dword[ebx]
184
      call dword[ebx]
185
  @@:
185
  @@:
186
  mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë
186
  mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë
187
 
187
 
188
align 4
188
align 4
189
MsgBoxDrawAllBut:
189
MsgBoxDrawAllBut:
190
  mov ebx,[ot_left]
190
  mov ebx,[ot_left]
191
  shl ebx,16
191
  shl ebx,16
192
  mov bx,word[ot_top]
192
  mov bx,word[ot_top]
193
  add bx,MB_BUT_OTY_1
193
  add bx,MB_BUT_OTY_1
194
 
194
 
195
  ; Buttons ...
195
  ; Buttons ...
196
  push edi
196
  push edi
197
  mov edi,txtBut
197
  mov edi,txtBut
198
  mov edx,[edi]
198
  mov edx,[edi]
199
 
199
 
200
  mov ecx,MB_FIRST_BUT_ID
200
  mov ecx,MB_FIRST_BUT_ID
201
  @@:
201
  @@:
202
    ;eax = len button caption text
202
    ;eax = len button caption text
203
    mov esi,edx
203
    mov esi,edx
204
    call strlen
204
    call strlen
205
 
205
 
206
    cmp eax,0
206
    cmp eax,0
207
    je @f
207
    je @f
208
 
208
 
209
    call MsgBoxDrawButton
209
    call MsgBoxDrawButton
210
    inc ecx
210
    inc ecx
211
 
211
 
212
    add edi,4
212
    add edi,4
213
    cmp edi,endBut
213
    cmp edi,endBut
214
    jge @f
214
    jge @f
215
    mov edx,[edi]
215
    mov edx,[edi]
216
 
216
 
217
    push bx
217
    push bx
218
    ror ebx,16
218
    ror ebx,16
219
      imul esi,CHAR_WIDTH
219
      imul esi,CHAR_WIDTH
220
      add esi,MB_BUT_OTX_3
220
      add esi,MB_BUT_OTX_3
221
      add ebx,esi ; ...
221
      add ebx,esi ; ...
222
    ror ebx,16
222
    ror ebx,16
223
    pop bx
223
    pop bx
224
 
224
 
225
    jmp @b
225
    jmp @b
226
  @@:
226
  @@:
227
  pop edi
227
  pop edi
228
  ret
228
  ret
229
 
229
 
230
;input:
230
;input:
231
; ecx = button id
231
; ecx = button id
232
align 4
232
align 4
233
MsgBoxDrawButton:
233
MsgBoxDrawButton:
234
  push ecx
234
  push ecx
235
 
235
 
236
  ;button
236
  ;button
237
  push eax ebx edx
237
  push eax ebx edx
238
    mov edx,ecx
238
    mov edx,ecx
239
    imul eax,CHAR_WIDTH
239
    imul eax,CHAR_WIDTH
240
    add eax,MB_BUT_OTX_2
240
    add eax,MB_BUT_OTX_2
241
 
241
 
242
    mov esi,[sc.work_button]
242
    mov esi,[sc.work_button]
243
    cmp cl,[mb_key_foc]
243
    cmp cl,[mb_key_foc]
244
    jne @f
244
    jne @f
245
      mov esi,[sc.work_button_text]
245
      mov esi,[sc.work_button_text]
246
    @@:
246
    @@:
247
 
247
 
248
    mov cx,bx
248
    mov cx,bx
249
    sub cx,MB_BUT_OTY_1
249
    sub cx,MB_BUT_OTY_1
250
    shl ecx,16
250
    shl ecx,16
251
    mov cx,MB_BUT_HEIGHT
251
    mov cx,MB_BUT_HEIGHT
252
    ror ebx,16
252
    ror ebx,16
253
    sub bx,MB_BUT_OTX_1
253
    sub bx,MB_BUT_OTX_1
254
    ror ebx,16
254
    ror ebx,16
255
    mov bx,ax
255
    mov bx,ax
256
 
256
 
257
    mov eax,8
257
    mov eax,8
258
    int 0x40
258
    int 0x40
259
  pop edx ebx eax
259
  pop edx ebx eax
260
 
260
 
261
  ;caption
261
  ;caption
262
  mov ecx,[sc.work_button_text]
262
  mov ecx,[sc.work_button_text]
263
  cmp esi,ecx
263
  cmp esi,ecx
264
  jne @f
264
  jne @f
265
    mov ecx,[sc.work_button]
265
    mov ecx,[sc.work_button]
266
  @@:
266
  @@:
267
  mov esi,eax
267
  mov esi,eax
268
  mov eax,4
268
  mov eax,4
269
  int 0x40
269
  int 0x40
270
 
270
 
271
  pop ecx
271
  pop ecx
272
  ret
272
  ret
273
 
273
 
274
align 4
274
align 4
275
MsgBoxReInit:
275
MsgBoxReInit:
276
  push ebp
276
  push ebp
277
  mov ebp,esp
277
  mov ebp,esp
278
    m2m dword[mb_text],dword[ebp+8]
278
    m2m dword[mb_text],dword[ebp+8]
279
  push eax ebx ecx edi esi
279
  push eax ebx ecx edi esi
280
 
280
 
281
  mov esi,[mb_text]
281
  mov esi,[mb_text]
282
  add esi,MB_TEXT_OFFSET
282
  add esi,MB_TEXT_OFFSET
283
  call strlen
283
  call strlen
284
  inc esi ;add terminated zero
284
  inc esi ;add terminated zero
285
  add esi,eax ;add len of caption
285
  add esi,eax ;add len of caption
286
  mov [txtMsg],esi
286
  mov [txtMsg],esi
287
 
287
 
288
  ;--- go to first button text --- buttons 1...MB_MAX_BUT
288
  ;--- go to first button text --- buttons 1...MB_MAX_BUT
289
  mov ebx,txtBut
289
  mov ebx,txtBut
290
  mov cx,MB_MAX_BUT
290
  mov cx,MB_MAX_BUT
291
  @@:
291
  @@:
292
    call strlen
292
    call strlen
293
    add esi,eax ;add len of caption
293
    add esi,eax ;add len of caption
294
    inc esi ;add terminated zero
294
    inc esi ;add terminated zero
295
 
295
 
296
    mov dword[ebx],esi
296
    mov dword[ebx],esi
297
    cmp byte[esi],0
297
    cmp byte[esi],0
298
    je @f
298
    je @f
299
    add ebx,4
299
    add ebx,4
300
  loop @b
300
  loop @b
301
  @@:
301
  @@:
302
 
302
 
303
  ;--- calc button top ---
303
  ;--- calc button top ---
304
  mov eax,1
304
  mov eax,1
305
  mov ebx,[txtMsg]
305
  mov ebx,[txtMsg]
306
  @@:
306
  @@:
307
    inc ebx
307
    inc ebx
308
    cmp byte[ebx],0
308
    cmp byte[ebx],0
309
    je @f
309
    je @f
310
    cmp byte[ebx],13
310
    cmp byte[ebx],13
311
    jne @b
311
    jne @b
312
    inc eax
312
    inc eax
313
    jmp @b
313
    jmp @b
314
  @@:
314
  @@:
315
  imul eax,10
315
  imul eax,10
316
  add eax,2*MB_BUT_OTY_1
316
  add eax,2*MB_BUT_OTY_1
317
  mov [ot_top],eax
317
  mov [ot_top],eax
318
 
318
 
319
  ;--- calc window height ---
319
  ;--- calc window height ---
320
  add eax,MB_BUT_OTY_1
320
  add eax,MB_BUT_OTY_1
321
  add eax,MB_BUT_HEIGHT
321
  add eax,MB_BUT_HEIGHT
322
  add ax,5 ;height of border
322
  add ax,5 ;height of border
323
  mov [mb_height],ax
323
  mov [mb_height],ax
324
  mcall 48,4 ;skin height
324
  mcall 48,4 ;skin height
325
  add [mb_height],ax
325
  add [mb_height],ax
326
 
326
 
327
  ;--- calc window top ---
327
  ;--- calc window top ---
328
  mov eax,14
328
  mov eax,14
329
  int 0x40
329
  int 0x40
330
  mov word[mb_top],ax
330
  mov word[mb_top],ax
331
  mov ax,word[mb_height]
331
  mov ax,word[mb_height]
332
  sub word[mb_top],ax
332
  sub word[mb_top],ax
333
  shr word[mb_top],1
333
  shr word[mb_top],1
334
  ;---
334
  ;---
335
  shr eax,16
335
  shr eax,16
336
  mov word[mb_left],ax
336
  mov word[mb_left],ax
337
  mov ax,word[mb_width]
337
  mov ax,word[mb_width]
338
  sub word[mb_left],ax
338
  sub word[mb_left],ax
339
  shr word[mb_left],1
339
  shr word[mb_left],1
340
 
340
 
341
  ;--- calc button width ---
341
  ;--- calc button width ---
342
  xor ebx,ebx
342
  xor ebx,ebx
343
  xor ecx,ecx
343
  xor ecx,ecx
344
  mov esi,[txtBut]
344
  mov esi,[txtBut]
345
  mov byte[mb_key_max],0
345
  mov byte[mb_key_max],0
346
  @@:
346
  @@:
347
    cmp byte[esi],0
347
    cmp byte[esi],0
348
    je @f
348
    je @f
349
    inc ecx
349
    inc ecx
350
    call strlen
350
    call strlen
351
    add esi,eax
351
    add esi,eax
352
    inc esi
352
    inc esi
353
    inc byte[mb_key_max]
353
    inc byte[mb_key_max]
354
    add ebx,eax
354
    add ebx,eax
355
    jmp @b
355
    jmp @b
356
  @@:
356
  @@:
357
 
357
 
358
  imul ebx,CHAR_WIDTH
358
  imul ebx,CHAR_WIDTH
359
  imul ecx,MB_BUT_OTX_3
359
  imul ecx,MB_BUT_OTX_3
360
  add ebx,ecx
360
  add ebx,ecx
361
  add ebx,MB_BUT_OTX_2
361
  add ebx,MB_BUT_OTX_2
362
  sub ebx,MB_BUT_OTX_3
362
  sub ebx,MB_BUT_OTX_3
363
  mov [but_width],ebx
363
  mov [but_width],ebx
364
 
364
 
365
  pop esi edi ecx ebx eax
365
  pop esi edi ecx ebx eax
366
  pop ebp
366
  pop ebp
367
  ret 4
367
  ret 4
368
 
368
 
369
;input:
369
;input:
370
; [esp+8] = pointer to msgbox text
370
; [esp+8] = pointer to msgbox text
371
align 4
371
align 4
372
MsgBoxCreate:
372
MsgBoxCreate:
373
  push ebp
373
  push ebp
374
  mov ebp,esp
374
  mov ebp,esp
375
    m2m dword[mb_text],dword[ebp+8]
375
    m2m dword[mb_text],dword[ebp+8]
376
    push eax ebx ecx edx
376
    push eax ebx ecx edx
377
 
377
 
378
    mov eax,51
378
    mov eax,51
379
    mov ebx,1
379
    mov ebx,1
380
    mov ecx,start
380
    mov ecx,start
381
    mov edx,dword[ebp+12];thread
381
    mov edx,dword[ebp+12];thread
382
    int 0x40
382
    int 0x40
383
 
383
 
384
    mov dword[mb_funct],0
384
    mov dword[mb_funct],0
385
    pop edx ecx ebx eax
385
    pop edx ecx ebx eax
386
  pop ebp
386
  pop ebp
387
  ret 8
387
  ret 8
388
 
388
 
389
;input:
389
;input:
390
; [esp+8] = pointer to msgbox functions pointers
390
; [esp+8] = pointer to msgbox functions pointers
391
align 4
391
align 4
392
MsgBoxSetFunctions:
392
MsgBoxSetFunctions:
393
  push ebp
393
  push ebp
394
  mov ebp,esp
394
  mov ebp,esp
395
    m2m dword[mb_funct],dword[ebp+8]
395
    m2m dword[mb_funct],dword[ebp+8]
396
  pop ebp
396
  pop ebp
397
  ret 4
397
  ret 4
398
 
398
 
399
;--- data ---
399
;--- data ---
400
  txtMsg dd 0 ;㪠§ â¥«ì ­  ­ ç «® ⥪áâ  á®®¡é¥­¨ï
400
  txtMsg dd 0 ;㪠§ â¥«ì ­  ­ ç «® ⥪áâ  á®®¡é¥­¨ï
401
  txtBut rd MB_MAX_BUT ;㪠§ â¥«ì ­  ­ ç «® ⥪áâ  ¯®¤¯¨á¥© ª­®¯®ª
401
  txtBut rd MB_MAX_BUT ;㪠§ â¥«ì ­  ­ ç «® ⥪áâ  ¯®¤¯¨á¥© ª­®¯®ª
402
  endBut:
402
  endBut:
403
  ot_left dd 0 ;®âáâ㯠᫥¢  (¤«ï à¨á®¢ ­¨ï ª­®¯®ª)
403
  ot_left dd 0 ;®âáâ㯠᫥¢  (¤«ï à¨á®¢ ­¨ï ª­®¯®ª)
404
  ot_top dd 0 ;®âáâ㯠ᢥàåã (¤«ï à¨á®¢ ­¨ï ª­®¯®ª)
404
  ot_top dd 0 ;®âáâ㯠ᢥàåã (¤«ï à¨á®¢ ­¨ï ª­®¯®ª)
405
  but_width dd 0 ;è¨à¨­  ¢á¥å ª­®¯®ª + § §®àë ¬¥¦¤ã ­¨¬¨
405
  but_width dd 0 ;è¨à¨­  ¢á¥å ª­®¯®ª + § §®àë ¬¥¦¤ã ­¨¬¨
406
  ;--- à §¬¥àë ­  íªà ­¥ ®ª­  á®®¡é¥­¨ï ---
406
  ;--- à §¬¥àë ­  íªà ­¥ ®ª­  á®®¡é¥­¨ï ---
407
  mb_left dw 0
407
  mb_left dw 0
408
  mb_width dw 300
408
  mb_width dw 300
409
  mb_top dw 0
409
  mb_top dw 0
410
  mb_height dw 50
410
  mb_height dw 50
411
  mb_key_foc db MB_FIRST_BUT_ID ;ª­®¯ª  ¢ 䮪ãᥠ(á ãç¥â®¬ MB_FIRST_BUT_ID)
411
  mb_key_foc db MB_FIRST_BUT_ID ;ª­®¯ª  ¢ 䮪ãᥠ(á ãç¥â®¬ MB_FIRST_BUT_ID)
412
  mb_key_max db 1 ;ç¨á«® ¢á¥å ª­®¯®ª á®®¡é¥­¨ï
412
  mb_key_max db 1 ;ç¨á«® ¢á¥å ª­®¯®ª á®®¡é¥­¨ï
413
;--------------------------------------------------
413
;--------------------------------------------------
414
  sc system_colors
414
  sc system_colors
415
  mb_procinfo process_information ;㪠§ â¥«ì ­  áâàãªâãàã process_information த¨â¥«ì᪮£® ®ª­ 
415
  mb_procinfo process_information ;㪠§ â¥«ì ­  áâàãªâãàã process_information த¨â¥«ì᪮£® ®ª­ 
416
  mb_text dd 0 ;msgbox_1 ;㪠§ â¥«ì ¤ ­­ë¥ ¤«ï á®®¡é¥­¨ï (ª®â®àë ¯¥à¥¤ îâìáï ®ª­ã)
416
  mb_text dd 0 ;msgbox_1 ;㪠§ â¥«ì ¤ ­­ë¥ ¤«ï á®®¡é¥­¨ï (ª®â®àë ¯¥à¥¤ îâìáï ®ª­ã)
417
  mb_funct dd 0 ;pointer to functions
417
  mb_funct dd 0 ;pointer to functions
418
;--------------------------------------------------
418
;--------------------------------------------------
419
align 16
419
align 16
420
EXPORTS:
420
EXPORTS:
421
  dd sz_mb_create, MsgBoxCreate
421
  dd sz_mb_create, MsgBoxCreate
422
  dd sz_mb_reinit, MsgBoxReInit
422
  dd sz_mb_reinit, MsgBoxReInit
423
  dd sz_mb_setfunctions, MsgBoxSetFunctions
423
  dd sz_mb_setfunctions, MsgBoxSetFunctions
424
  dd 0,0
424
  dd 0,0
425
  sz_mb_create db 'mb_create',0
425
  sz_mb_create db 'mb_create',0
426
  sz_mb_reinit db 'mb_reinit',0
426
  sz_mb_reinit db 'mb_reinit',0
427
  sz_mb_setfunctions db 'mb_setfunctions',0
427
  sz_mb_setfunctions db 'mb_setfunctions',0