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
|
-
|
|
|
!
-
|
|
!
-
|
|
!
| #module
#deffunc GetOncmdLabel var p1, int p2, int p3
mref gol_ctx, 68
dupptr gol_irqdat, gol_ctx(6), 24 * gol_ctx(7), 4
gol_ptr = -1
repeat gol_ctx(7)
if (gol_irqdat(cnt * 6 + 1) == p3) & (gol_irqdat(cnt * 6 + 2) == p2) {
gol_ptr = gol_irqdat(cnt * 6 + 4)
gol_opt = (gol_irqdat(cnt * 6) >> 16) & 0xFFFF
break
}
loop
dimtype p1, vartype( "label" ), 1
if (gol_ptr == -1) { return (0)}
dupptr gol_dupp1, varptr( p1 ), 4, 4
gol_dupp1 = (gol_ptr - gol_ctx(2)) / 2
return (gol_opt + 1)
#global
#if 0
oncmd goto *on_cmd0, 0x8000
oncmd gosub *on_cmd1, 0x8001
GetOncmdLabel lbl0, 0, 0x8000
mes "Window 0 : Message 0x8000"
mes "varuse " + varuse( lbl0 )
mes "type " + stat
GetOncmdLabel lbl1, 0, 0x8001
mes "Window 0 : Message 0x8001"
mes "varuse " + varuse( lbl1 )
mes "type " + stat
GetOncmdLabel lbl2, 0, 0x8002
mes "Window 0 : Message 0x8002"
mes "varuse " + varuse( lbl2 )
mes "type " + stat
gosub lbl1
goto lbl0
stop
*on_cmd0
mes "Receive Message 0"
stop
*on_cmd1
mes "Receive Message 1"
return
#endif
#if 0
#module mod1
#define WM_LBUTTONDOWN 0x0201
#deffunc cfgoncmdmod1
dimtype lbl_wmlbd, vartype( "label" ), 1
GetOncmdLabel lbl, ginfo_sel, WM_LBUTTONDOWN
if ( varuse( lbl ) ) { lbl_wmlbd = lbl : opt_wmlbd = stat }
oncmd gosub *msg_wmlbuttondown@mod1, WM_LBUTTONDOWN
return
*msg_wmlbuttondown@mod1
mes "mod1 : Receive WM_LBUTTONDOWN Message "
if ( varuse( lbl_wmlbd ) ) {
if ( opt_wmlbd == 2 ) : gosub lbl_wmlbd
}
return
#global
#module mod2
#define WM_LBUTTONDOWN 0x0201
#deffunc cfgoncmdmod2
dimtype lbl_wmlbd, vartype( "label" ), 1
GetOncmdLabel lbl, ginfo_sel, WM_LBUTTONDOWN
if ( varuse( lbl ) ) { lbl_wmlbd = lbl : opt_wmlbd = stat }
oncmd gosub *msg_wmlbuttondown@mod2, WM_LBUTTONDOWN
return
*msg_wmlbuttondown@mod2
mes "mod2 : Receive WM_LBUTTONDOWN Message "
if ( varuse( lbl_wmlbd ) ) {
if ( opt_wmlbd == 2 ) : gosub lbl_wmlbd
}
return
#global
#define WM_LBUTTONDOWN 0x0201
oncmd gosub *onwmd, WM_LBUTTONDOWN
cfgoncmdmod1
cfgoncmdmod2
stop
*onwmd
mes "main : Receive WM_LBUTTONDOWN Message "
return
#endif
|