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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
|
-
!
-
|
|
|
!
-
|
|
|
|
!
-
|
|
|
!
-
|
|
|
!
-
|
!
-
|
!
-
!
!
-
|
|
|
|
-
!
|
!
-
|
!
-
!
-
|
!
-
|
|
|
|
!
-
|
|
!
-
|
!
-
|
|
-
!
!
-
!
-
!
| #module _mod_Fake_Edit_
#uselib "imm32.dll"
#cfunc _ImmGetContext "ImmGetContext" sptr
#func _ImmReleaseContext "ImmReleaseContext" sptr,sptr
#func _ImmGetConversionStatus "ImmGetConversionStatus" sptr,var,var
#func _ImmSetConversionStatus "ImmSetConversionStatus" sptr,sptr,sptr
#cfunc _ImmGetOpenStatus "ImmGetOpenStatus" sptr
#func _ImmSetOpenStatus "ImmSetOpenStatus" sptr,int
#func _ImmGetCandidateList "ImmGetCandidateListA" sptr,int,var,int
#func _ImmGetCompositionString "ImmGetCompositionStringA" sptr,int,var,int
#func _ImmSetCompositionString "ImmSetCompositionStringA" sptr,int,var,int,sptr,int
#cfunc _ImmAssociateContext "ImmAssociateContext" sptr,sptr
#cfunc _ImmGetDefaultIMEWnd "ImmGetDefaultIMEWnd" sptr
#uselib "user32.dll"
#cfunc _DefWindowProc "DefWindowProcA" sptr,int,int,int
#cfunc _GetCaretBlinkTime "GetCaretBlinkTime"
#func _SetTimer "SetTimer" sptr,int,int,sptr
#func _KillTimer "KillTimer" sptr,int
#func _ClipOpen "OpenClipboard" nullptr
#func _ClipClose "CloseClipboard"
#cfunc _ClipHasFormat "IsClipboardFormatAvailable" int
#func _ClipEmpty "EmptyClipboard"
#cfunc _ClipGet "GetClipboardData"int
#func _ClipSet "SetClipboardData" int,sptr
#func _ScreenToClient "ScreenToClient" int,var
#uselib "kernel32.dll"
#cfunc _GetTickCount "GetTickCount"
#cfunc _GlobalAlloc "GlobalAlloc" int,int
#cfunc _GlobalLock "GlobalLock" sptr
#func _GlobalUnlock "GlobalUnlock" sptr
#func _lStrCpy "lstrcpy" int,var
#define global fe_SetLabel(%1=0) feLabel@_mod_Fake_Edit_=%1 #define global fe_String feBuf@_mod_Fake_Edit_ #define global fe_Caret feInfo@_mod_Fake_Edit_(0) #define global fe_SelStart feInfo@_mod_Fake_Edit_(1) #define global fe_Key feInfo@_mod_Fake_Edit_(2) #define global fe_State feInfo@_mod_Fake_Edit_(3) #define global fe_Blink feInfo@_mod_Fake_Edit_(6) #define global fe_cInfo fecInfo@_mod_Fake_Edit_
#deffunc fe_Init str p0, int p1, int p2, int p3
feWin=hWnd :fegSel=gInfo_Sel sDim feBuf,$10000 sDim feUndo,$10000 Dim feInfo,12 Dim feTID sDim fecList sDim feComp Dim fecInfo,4 buf="" :tmp=""
feNullReturn=0 :feUpdate=0 mRef feStat,64 :If(p0!=""){feBuf=fe_ConvCR(p0)} feInfo(0)=0,-1,0,$FF,p1,_GetCaretBlinkTime(),1,_fe_Ime(0,0),p2,(p3!=0),-1
onCmd gosub *fe_Message,$102 onCmd gosub *fe_Message,$100 onCmd gosub *fe_Message,$281 onCmd gosub *fe_Message,$282 onCmd gosub *fe_Message,$10F onCmd gosub *fe_Message,$10E Return
#define feCrt feInfo(0) #define feSel feInfo(1) #define feKey feInfo(2) #define feFlg feInfo(3) #define feLen feInfo(4) #define feCBT feInfo(5) #define feBlk feInfo(6) #define feIME feInfo(7) #define feTab feInfo(8) #define feImp feInfo(9) #define feCrt_ feInfo(10) #define feSel_ feInfo(11)
#deffunc fe_End local a
mRef a,65 :a=fe_ConvCR(feBuf,1) :Dim feBuf :Dim feUndo :Dim feList :Dim feComp
Dim buf :Dim tmp :Dim feInfo :Dim fecInfo :Dim feStat
gSel fegSel :If(feTID){_KillTimer feWin,feTID :onCmd gosub *fe_Null,$113 :Dim feTID}
onCmd gosub *fe_Null,$102 :onCmd gosub *fe_Null,$100 onCmd gosub *fe_Null,$10F :onCmd gosub *fe_Null,$10E
onCmd gosub *fe_Null,$281 :onCmd gosub *fe_Null,$282 :Return
#deffunc _fe_Exit onexit If(feWin*feTID){_KillTimer feWin,feTID} :Return
#defcfunc _fe_GetString int p1
Return fe_ConvCR(feBuf,p1)
#define global cType fe_GetString(%1=1) _fe_GetString(%1)
#defcfunc fe_GetSelString local a
If(feSel<0){Return ""} :a=0,fe_GetSel() :a=a.1&$FFFF,(a.1>>16)-a.0
Return StrMid(feBuf,a.0,a.1)
#deffunc fe_Undo local a, local b
If(feCrt_<0){Return 0} :a=feCrt_,feSel_ :b=feUndo
feUndo=feBuf :feCrt_=feCrt :feSel_=feSel
feBuf=b :feCrt=a.0 :feSel=a.1 :feFlg|=3
Return 1
#defcfunc _fe_Ime int p0, int p1, local a
a=p0\2,_ImmGetContext(feWin) :If(a.1==0){Return 2}
If(p1){_ImmSetOpenStatus a.1,a}else{a=_ImmGetOpenStatus(a.1)}
_ImmReleaseContext feWin,a.1 :If(feIME!=a){feIME=a :feFlg|=16} :Return a
#define global fe_GetIme _fe_Ime(0,0)
#define global fe_SetIme(%1=1) feStat@_mod_Fake_Edit_=_fe_Ime(%1,1)
#defcfunc _fe_ImeConv int p0, int p1, int p2, local a
If((fe_GetIme&1)==0){Return 0} :a=_ImmGetContext(feWin),0,0
_ImmGetConversionStatus a.0,a.1,a.2
If(p2){If(p0>=0){a.1=p0&$FFFF} :If(p1>=0){a.2=p1&$FFFF}
_ImmSetConversionStatus a.0,a.1,a.2}
_ImmReleaseContext feWin,a.0 :Return a.1|(a.2<<16)
#define global fe_GetImeConv _fe_ImeConv(-1,-1,0)
#define global fe_SetImeConv(%1=-1,%2=-1) feStat@_mod_Fake_Edit_= \
_fe_ImeConv(%1,%2,1)
#deffunc DisableIME int p0, int p1, local a
a=0,0,p0 :If(a.2==0){a.2=hWnd} :a.1=_ImmGetDefaultIMEWnd(a.2)
If(p1==0){SendMsg a.1,$283,$21} :a.0=_ImmAssociateContext(a.2,p1)
If(p1!=0){SendMsg a.1,$283,$22} :Return a.0
#deffunc DisableSS int p0, local a
If(p0){OnCmd gosub *fe_Null,$112}else{OnCmd gosub *fe_SysMessage,$112}
Return
#defcfunc fe_GetCompStr local a
mRef a,64 :a=StrLen(feComp) :Return feComp
#deffunc fe_SetCompStr str p0, local a
If(p0==""){Return 0} :a=0,_ImmGetContext(hWnd)
_ImmSetCompositionString a.1,$9,p0,StrLen(p0),0,0 :a=stat
_ImmReleaseContext hWnd,a.1 :Return a
#defcfunc fe_GetCandidate int p0, int p1, local a, local b, local c
If(fecList=="")|(fecInfo.2<1){Return 0} :b="",""
a=p0,Abs(p1),0,StrLen(fecList),0 :If(a.1<1){a.1=fecInfo.2}
*@ :If(a.0<0){a.0+=fecInfo.2 :Goto *@b}
*@ :GetStr b,fecList,a.2 :a.2+=StrSize
If(StrSize>a.4){a.4=StrSize} :If(a.2>=a.3){a.2=0}
If(a.0){a.0--}else{a.1-- :If(p1<0){b.1=b+"\n"+b.1}else{b.1+=b+"\n"} }
If(a.1){Goto *@b}
mRef c,64 :c=a.4
Return b.1
#defcfunc fe_GetText int p0, int p1, int p2, local a, local b, local c
a=p0,p1,0,0,0,0 :b="",fe_ImpComp(),"" :sDim c,$10000
If(a.1<1){a.1=$10000} :a.2=0,StrLen(b.1)
Repeat :GetStr b.2,b.1,a.2 :a.2+=StrSize
*@ :If(feLen<1){b=b.2 :b.2=""}else{a.4=0
Repeat :a.5=Peek(b.2,a.4) :a.4++ If(($80<a.5)&($A0>a.5))|(($DF<a.5)&($FD>a.5)){a.4++}
If(a.4>feLen){a.4-=2 :Break} :If(a.4==feLen){Break} :Loop
b=StrMid(b.2,0,a.4) :b.2=StrMid(b.2,a.4,$10000)}
If(a.0<1){c+=b :If(p2==0){c+="\n"} :a.1--}else{a.0--}
If(a.1<0){Break} :If(b.2!=""){Goto *@b} :If(a.2>=a.3){Break} :Loop
Return c
#defcfunc fe_GetSel local a
If(feSel<0){Return (feCrt<<16)|feCrt}
a=feCrt,feSel :a(feSel>feCrt)<<=16 :Return a.0|a.1
#defcfunc fe_GetBlink
feBlk=(_GetTickCount()/feCBT)\2 :Return feBlk
#deffunc fe_SetBlink int p0, local a
If(feWin*feTID){_KillTimer feWin,feTID} If(p0<10){a=feCBT}else{a=p0} :feTID=(_GetTickCount()\((Rnd(90)+10)*100))+9
gSel fegSel :onCmd gosub *fe_Message,$113 _SetTimer feWin,feTID,a,0 :feTID=stat :Return feTID
#defcfunc fe_GetPos int p0, int p1, local a, local b
a=0,0,-1,0,0,0 :b="",fe_ImpComp(),""
Repeat :GetStr b,b.1,a.0 :a.1=a.0 :a.0+=StrSize :a.2++
*@ :If(a.0>p0){a.3=p0-a.1} :If(p1==0)&(feLen!=0)&(StrLen(b)>feLen){a.4=0
Repeat :a.5=Peek(b,a.4) :a.4++
If(($80<a.5)&($A0>a.5))|(($DF<a.5)&($FD>a.5)){a.4++}
If(a.4>feLen){a.4-=2 :Break} :If(a.4==feLen){Break} :Loop
b=StrMid(b,a.4,$10000) :a.1+=a.4 :If(a.1<=p0){a.2++ :Goto *@b}
} :If(a.0>p0){Break} :Loop
Return a.3|(a.2<<16)
#defcfunc fe_SetPos int p0, int p1, local a, local b
a=0,0,p0>>16,p0&$FFFF,0,0 :b="",fe_ImpComp()
Repeat :If(a.0>=StrLen(b.1)-1){a.1=StrLen(b.1)-1,0,0 :Break}
GetStr b,b.1,a.0 :a.1=a.0 :a.0+=StrSize
*@ :If(a.2==0){Break} :a.2--
If(p1==0)&(feLen!=0)&(StrLen(b)>feLen){a.4=0
Repeat :a.5=Peek(b,a.4) :a.4++
If(($80<a.5)&($A0>a.5))|(($DF<a.5)&($FD>a.5)){a.4++}
If(a.4>feLen){a.4-=2 :Break} :If(a.4==feLen){Break} :Loop
b=StrMid(b,a.4,$10000) :a.1+=a.4 :Goto *@b} :Loop
a.3=Limit(a.3,0,StrLen(b)) :If(feLen!=0){a.3=Limit(a.3,0,feLen)}
a=a.3+a.1 :a-=_fe_CheckLB(a,feBuf)
Return a
#deffunc fe_GetBox array p0, int p1, local a, local b, local c
a=p1&$FFFF,p1>>16,0,0,0,0,0,0 :b="",fe_ImpComp(),"" :sDim c,$10000 :Dim p0
Repeat :GetStr b.2,b.1,a.2 :a.3=a.2 :a.2+=StrSize
*@ :If(feLen<1)|(StrLen(b.2)<feLen){b=b.2 :b.2=""}else{a.5=0
Repeat :a.6=Peek(b.2,a.5) :a.5++
If(($80<a.6)&($A0>a.6))|(($DF<a.6)&($FD>a.6)){a.5++}
If(a.5>feLen){a.5-=2 :Break} :If(a.5==feLen){Break} :Loop
b=StrMid(b.2,0,a.5) :b.2=StrMid(b.2,a.5,$10000)}
a.6=StrLen(b)+a.3
If(a.6<a.0){p0++}else{If(a.3<a.0){a.5=a.0-a.3}else{a.5=0}
If(a.6<a.1){a.5|=StrLen(b)<<16}else{a.5|=(a.1-a.3)<<16}
lPoke c,a.4<<2,a.5 :a.4++}
a.3=a.6 :If(a.3>=a.1){Break} :If(b.2!=""){Goto *@b} :Loop
a=0,a.4,p0 :Dim p0,a.1 :Repeat a.1 :p0(cnt)=lPeek(c,a) :a+=4 :Loop
Return a.2
#deffunc fe_Update str p0, local a, local b, local c a=StrLen(feBuf),StrLen(p0),feCrt,feSel :c=p0
If(a.3<0){a.3=a.2}else{If(a.2>a.3){a.3=a.2 :a.2=feSel} }
sDim b,a.0+a.1+1 :MemCpy b,feBuf,a.2 :MemCpy b,c,a.1,a.2
MemCpy b,feBuf,a.0-a.3,a.2+a.1,a.3 :If(feBuf==b){feSel=-1 :Return a.0}
MemCpy feUndo,feBuf,a.0+1 :feFlg|=1 :feCrt_=feCrt :feSel_=feSel
MemCpy feBuf,b,a.0+a.1+1 :If(feSel>=0){feFlg|=2 :feSel=-1}
a.1=Limit(a.1+a.2,0,StrLen(feBuf)) :If(a.1!=feCrt){feFlg|=2 :feCrt=a.1}
Return StrLen(feBuf)
#defcfunc fe_ImpComp local a If(feImp==0)|(feComp==""){Return feBuf+"\r"}
a.1=fe_GetSel() :a=a.1&$FFFF,a.1>>16
Return StrMid(feBuf,0,a.0)+feComp+StrMid(feBuf,a.1,$10000)+"\r"
#deffunc fe_GetLine var p0, int p1, local a, local b a=0,0,-1 :b="",feBuf+"\r"
*@ :GetStr b,b.1,a :a.1=a :a+=StrSize :a.2++
If(a<=p1)&(a<StrLen(feBuf)){Goto *@b}
p0=(a<<16)|a.1 :Return a.2
#defcfunc _fe_CheckLB int p0, str p1, local a, local b a=0,0,p0 :If(a.2>Strlen(p1)){a.2=StrLen(p1)} :b=p1+"\r",""
*@ :GetStr b.1,b,a.0 :a.1=a.0 :a.0+=StrSize :If(a.0<a.2){Goto *@b}
*@ :If(a.1>=a.2){Return (a.1>a.2)} :a=Peek(b,a.1) :a.1++
If(a<$81)|(a>$FC){Goto *@b} :If(a<$A0)|(a>$DF){a.1++} :Goto *@b
#define global cType fe_CheckLB(%1=0,%2=feBuf@_mod_Fake_Edit_) _fe_CheckLB(%1,%2)
#defcfunc fGetKey int p0, local a GetKey a,p0 :Return a
#defcfunc fe_RepStr str p0, int p1, local a, local b
If(p0=="")|(p1<1){Return ""} :a=p1 :sDim b,$100,2 :b=p0
*@ :If(a&1){b.1+=b} :b+=b :a>>=1 :If(a>0){Goto *@b} :Return b.1
#defcfunc fe_ConvCR str p0, int p1, local a, local b, local c If(p0==""){Return ""} :a=0,StrLen(p0) :b=p0,"" :sDim c,$10000
*@ :GetStr b.1,b,a :a+=StrSize
If(c!=""){If(p1==1){c+="\n"}else{If(p1==0){c+="\r"} } }
c+=b.1 :If(a<a.1){Goto *@b} :Return c
#defcfunc fe_GetClipBrd int p0, local a, local b sDim a,$1000 :_ClipOpen :If(_ClipHasFormat(1)){DupPtr a,_ClipGet(1),$1000,2}
_ClipClose :If(a==""){Return ""} :b=a,"" :Dim a
If(p0>=0){b.1=fe_RepStr(" ",p0) Repeat :a=InStr(b,0,"\t") :If(a<0){Break}
b=StrMid(b,0,a)+b.1+StrMid(b,a+1,$1000) :Loop}
Return b
#deffunc fe_SetClipBrd str p0, local a, local b If(p0==""){Return 0} :b=fe_ConvCR(p0,1) :a=_GlobalAlloc(2,StrLen(b)+1)
If(a){a.1=_GlobalLock(a) :If(a.1){_lStrCpy a.1,b :If(stat){_ClipOpen
If(stat){_ClipEmpty} :_ClipSet 1,a :_ClipClose} :_GlobalUnlock a}
} :Return StrLen(p0)
#defcfunc _MousePos int p0, local a a=gInfo_mX,gInfo_mY :_ScreenToClient hWnd,a :Return a(p0)
#undef MouseX
#undef MouseY
#define global MouseX _MousePos(0)
#define global MouseY _MousePos(1)
*fe_Message Dim feNullReturn :Dim feUpdate :sDim buf,$100
Switch iParam
Case $113 If(wParam==feTID){feFlg|=32 :feBlk^=1} :swBreak
Case $102 :If(fGetKey(17)==0){ Switch wParam&$FF
Case 229 :swBreak Case 8 :feUpdate=1 If(feSel<0){feSel=feCrt :feCrt-=fe_CheckLB(feCrt-1)+1} :swBreak
Case 9 :If(feTab<0){buf="\t"}else{ If(feTab>0){buf=fe_RepStr(" ",feTab)} } :swBreak
Case 27 :swBreak Default :Poke buf,0,wParam :swEnd} :swBreak
Case $100 If(15<wParam)&(19>wParam){Return} i=(fGetKey(17)<<1)|fGetKey(16) :feFlg|=8 :feKey=wParam|(i<<8)
Switch feKey&$FF
Case $2E :feUpdate=1 If(feSel<0){feSel=feCrt :feCrt+=fe_CheckLB(feCrt+1)+1} :swBreak
Case $24 :Case $23 If(feSel<0)^(i^1){If(feSel<0){feSel=feCrt}else{feSel=-1} }
If(i&2){i=StrLen(feBuf)<<16}else{fe_GetLine i,feCrt}
If((feKey&$FF)==$24){i&=$FFFF}else{i=(i>>16)-1}
If(feCrt!=i){feFlg|=2 :feCrt=i}
If(feSel==feCrt){feSel=-1} :swBreak
Case $25 :Case $27 :i=feCrt,(feKey&$FF)-38 If(feSel<0)&(feKey&$100){feSel=feCrt}else{If((feKey&$100)==0){
i=fe_GetSel() :If(i.1>0){i>>=16}else{i&=$FFFF} :i.1=0 :feSel=-1
} }
If(i.1){i+=(fe_CheckLB(feCrt+i.1)+1)*i.1} :i=Limit(i,0,StrLen(feBuf))
If(feCrt!=i){feCrt=i :feFlg|=2} :If(feCrt==feSel){feSel=-1} :swBreak
Case $26 :Case $28 If(feSel<0)^(i^1){If(feSel<0){feSel=feCrt}else{feSel=-1} }
i.2=fe_GetPos(feCrt) :i.1=i.2&$FFFF,Limit((i.2>>16)+(feKey&$FF)-$27,0,$FFFF)
i=fe_SetPos(i.1|(i.2<<16)) :If(i!=feCrt){feCrt=i :feFlg|=2} :swBreak
Case $41 :If(i&2){ feSel=0 :feCrt=StrLen(feBuf) :feFlg|=2} :swBreak
Case $5A :If(i&2){fe_Undo} :swBreak Case $58 :feUpdate=1 :Case $43 :If(i&2){ fe_SetClipBrd fe_GetSelString() :feUpdate*=stat
} :swBreak
Case $56 :If(i&2){buf=fe_GetClipBrd(feTab)} :swBreak swEnd :swBreak
Case $281 Return _DefWindowProc(feWin,iParam,wParam,0) :swBreak
Case $282 :Switch wParam Case 3 :Case 4 :Case 5 i=_ImmGetContext(feWin)
_ImmGetCandidateList i,0,tmp,0 :i.1=stat
If(i.1<28){Return} :Dim tmp,(i.1+3)>>2 _ImmGetCandidateList i,0,tmp,i.1 :fecInfo(1)=tmp.3,tmp.2,tmp.5
If(wParam==4){fecList=""} If(wParam&1){i.2=i.1-tmp.6,1 sDim fecList,i.2+1 :MemCpy fecList,tmp,i.2,,tmp.6
*@ :If(Peek(fecList,i.3)==0){Poke fecList,i.3,$D :i.3++} :i.3++
If(i.3<i.2){Goto *@b}
} :_ImmReleaseContext feWin,i :feFlg|=4 :feNullReturn=1 :swBreak
Case 6 :Case 7 :Case 8 If(feIME!=fe_GetIme)|(wParam!=$8){feIME=fe_GetIme :feFlg|=16} :swBreak
swEnd :swBreak
Case $10F :i=_ImmGetContext(feWin) If(lParam&$800){ _ImmGetCompositionString i,$800,buf,0 :i.1=stat
sDim buf,i.1+1 :_ImmGetCompositionString i,$800,buf,i.1
feComp="" :fecList="" :fecInfo=0,0,0,0}
If(lParam&$008){ _ImmGetCompositionString i,$8,feComp,0 :i.1=stat :fecInfo.0=i.1<<16
sDim feComp,i.1+1 :_ImmGetCompositionString i,$8,feComp,i.1}
If(lParam&$010){ _ImmGetCompositionString i,$10,tmp,0 :i.1=stat,0
sDim tmp,i.1+1 :_ImmGetCompositionString i,$10,tmp,i.1
Repeat i.1 :If(Peek(tmp,cnt)&1){i.2+=$10000}else{
If(i.2<$10000){i.2++}else{Break} } :Loop
If(i.2<$10000){i.2<<=16} :fecInfo.0=i.2}
_ImmReleaseContext feWin,i :feFlg|=4+(feImp!=0) :feNullReturn=1 :swBreak
Case $10E feComp="" :fecList="" :fecInfo=0,0,0,0 :feFlg|=4 :swBreak
swEnd
If(buf!="")|(feUpdate!=0){ feCrt=Limit(feCrt,0,StrLen(feBuf)) :fe_Update buf}
If(vartype(feLabel))&(feFlg>0){ feFlg|=$80000000 :Gosub feLabel}
If(feNullReturn){Return 0}Return
*fe_SysMessage Switch wParam&$FFF0
Case $F140 :Return 0 :swBreak Case $F170 :Return 0 :swBreak swEnd
Return
*fe_Null :Return #global
|