xj qian
2024-06-25 58c129e8f21f79396a822eaeadd78edf281b52a0
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
#pragma once
#include "base.hpp"
 
/*
struct xevent
{
    int hWnd;
    int message;
    int wParam;
    int lParam;
    int time;
    xpoint scpt;
};
 
struct xeventcommand 
{
    xevent evt;
    string cmdid;
    void*   pfrom;
};
 
struct xeventmouse : public xevent
{
    int nFlags;
    xpoint pt;
};
 
struct NMHDR
{
    HWND hwndFrom;
    int idFrom;
    int code;
};
 
struct xeventnotify : public xevent
{
    int idCtrl;
    NMHDR*  pNMHDR;
};
*/
 
typedef unsigned int UINT;
    
typedef struct NMHDR
{
    HWND hwndFrom;
    UINT_PTR idFrom;
    int code;
} * LPNMHDR;
    
typedef struct tagEvent
{
    HWND    hWnd;
    DWORD    message;
    WPARAM    wParam;
    LPARAM    lParam;
    DWORD    time;
    POINT    pt;
    union
    {
        struct {
            int wmId    ;
            int wmEvent ;
            HWND hCtrl ;
        }command;
        struct
        {
            LPTSTR pStrID;
            void * pCmdFrom;
        }xcommand;
        struct {
            UINT nFlags;
            POINT point;
        } mouse;
        struct {
            UINT nFlags;
            POINT point;
        } size;
        struct {
            UINT nChar;
            UINT nRepCnt;
            UINT nFlags;
        }key;
        struct {
            HDC hdc;
        }paint;
        struct {
            HWND    hWnd ;
            UINT    nHitTest;
            UINT    mouseMsg;
        }cursor;
        struct {
            UINT nSBCode;
            UINT nPos;
            HWND hWndCtl;
        }scroll;
        struct {
            POINT point;
            UINT_PTR fwKeys;
            short zDelta;
        }wheel;
        struct {
            int idCtrl;
            LPNMHDR pnmh;
        }notify;
    };
    void * pSrcObject;
    LPARAM    dwRet;
} TEvent;
 
typedef TEvent TNotifyEvent;
/*
struct TEvent
{
    int        hWnd;
    int        message;
    int        wParam;
    int        lParam;
    int        time;
    xpoint    pt;
};
 
struct TMouseEvent : public TEvent
{
    int nFlags;
    xpoint point;
};
 
struct TKeyEvent :  public TEvent
{
    int nChar;
    int nRepCnt;
    int nFlags;
};
 
struct TXCommandEvent : public TEvent
{
    string pStrID;
};
 
struct TCommandEvent : public TEvent
{
    int wmId    ;
    int wmEvent ;
    int hCtrl ;
};
 
struct TPaintEvent :  public TEvent    
{
    int hdc;
};
 
struct TScrollEvent : public TEvent
{
    int nSBCode;
    int nPos;
    int hWndCtl;
};
 
struct TWheelEvent : public TEvent
{
    xpoint point;
    int fwKeys;
    short zDelta;
};
 
struct TNotifyEvent : public TEvent
{
    int idCtrl;
    NMHDR* pnmh; //ref
};
 
struct     DWASKSTYLENMHDR :  public NMHDR
{
    int row;
    int col;
    string colname;
    int mask;
    int indent;
    int imagelist;
    int image;
    int cximage;
    int cyimage;
    int imagerightindent;
    string cssstyle;
    string cssclass;
    string text;
    xrect    rt;
};    
*/
 
struct    IMGNNMHDR :  public NMHDR 
   string path; 
   string text;
   int nIndex;
};    
struct     PAGENMHDR :  public NMHDR
{
    int max;
    int cur;
};   
struct     LYSNMHDR : public NMHDR
{
    int nSheet;
};
 
struct xstruct
{
};
 
struct OVERLAPPED : public xstruct
    int Internal; 
    int InternalHigh; 
    int Offset; 
    int OffsetHigh; 
    int hEvent; 
};
 
struct OFSTRUCT : public xstruct
    int cBytes; 
    int fFixedDisk; 
    int nErrCode; 
    int Reserved1; 
    int Reserved2; 
    string szPathName; 
};
 
struct     CELLNMHDR : public NMHDR
{
    int currentrow;
    int currentcol;
    string data;
    int anchorrow;
    int anchorcol;
};
 
struct     DWNMHDR : public NMHDR
{
    void* dw;
    int row;
    int col;
    string data;
    int oldrow;
    int oldcol;
    string colname;
    string oldcolname;
};
 
struct     DWASKSTYLENMHDR : public NMHDR
{
    int row;
    int col;
    LPTSTR colname;
    int mask;
    int indent;
    int imagelist;
    int image;
    int cximage;
    int cyimage;
    int indent1;
    LPTSTR pCssStyle;
    LPTSTR pCssClass;
    RECT rt;
    LPTSTR pStr;
};
 
//typedef int FEvent(TEvent * evt, int p);