-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwindows.qdi
245 lines (193 loc) · 9.61 KB
/
windows.qdi
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
include "sys4win.qdi";
define IDI_APPLICATION 0x00007F00 // default icon
define IDI_WINLOGO 0x00007F05
define IDC_ARROW 0x00007F00 // arrow cusror
define IDC_WAIT 0x00007F02 // hourglass cusror
define IDC_CROSS 0x00007F03 // cross cusror
define CS_VREDRAW 0x00000001 // class styles
define CS_HREDRAW 0x00000002
define WS_MAXIMIZEBOX 0x00010000 // window styles
define WS_TABSTOP 0x00010000
define WS_MINIMIZEBOX 0x00020000
define WS_GROUP 0x00020000
define WS_THICKFRAME 0x00040000
define WS_SYSMENU 0x00080000
define WS_HSCROLL 0x00100000
define WS_VSCROLL 0x00200000
define WS_DLGFRAME 0x00400000
define WS_BORDER 0x00800000
define WS_CAPTION 0x00C00000 // WS_BORDER | WS_DLGFRAME
define WS_MAXIMIZE 0x01000000
define WS_CLIPCHILDREN 0x02000000
define WS_CLIPSIBLINGS 0x04000000
define WS_DISABLED 0x08000000
define WS_VISIBLE 0x10000000
define WS_MINIMIZE 0x20000000
define WS_CHILD 0x40000000
define ES_LEFT 0x00000000 // edit styles
define ES_CENTER 0x00000001
define ES_RIGHT 0x00000002
define ES_MULTILINE 0x00000004
define ES_UPPERCASE 0x00000008
define ES_LOWERCASE 0x00000010
define ES_PASSWORD 0x00000020
define ES_AUTOVSCROLL 0x00000040
define ES_AUTOHSCROLL 0x00000080
define ES_NOHIDESEL 0x00000100
define ES_OEMCONVERT 0x00000400
define ES_READONLY 0x00000800
define ES_WANTRETURN 0x00001000
define MF_STRING 0x00000000 // menu flags
define MF_POPUP 0x00000010
define MF_SEPARATOR 0x00000800
define SW_SHOWNORMAL 0x00000001 // ShowWindow flag
define WM_DESTROY 0x00000002 // messages
define WM_SIZE 0x00000005
define WM_PAINT 0x0000000F
define WM_ERASEBKGND 0x00000014
define WM_COMMAND 0x00000111
define SIZE_MINIMIZED 0x00000001
define MB_OK 0x00000000 // msgbox styles
define WHITE_BRUSH 0x00000000 // stock objects
define LTGRAY_BRUSH 0x00000001
define COLOR_WINDOW 0x00000005 // desktop colors
define LF_FACESIZE 32 // font attributes
define FW_BOLD 700
define DEFAULT_CHARSET 1
define OUT_DEFAULT_PRECIS 0
define CLIP_DEFAULT_PRECIS 0
define PROOF_QUALITY 2
define DEFAULT_PITCH 0
define TRANSPARENT 0
define FALSE 0
define TRUE 1
struct POINT of
LONG x;
LONG y;
end
struct RECT of
LONG left;
LONG top;
LONG right;
LONG bottom;
end
struct WNDCLASS of
UINT style;
void @lpfnWndProc;
int cbClsExtra;
int cbWndExtra;
HANDLE hInstance;
HICON hIcon;
HCURSOR hCursor;
HBRUSH hbrBackground;
char @lpszMenuName;
char @lpszClassName;
end
struct PAINTSTRUCT of
HDC hdc;
BOOL fErase;
RECT rcPaint;
BOOL fRestore;
BOOL fIncUpdate;
BYTE rgbReserved[32];
end
struct LOGFONT of
LONG lfHeight;
LONG lfWidth;
LONG lfEscapement;
LONG lfOrientation;
LONG lfWeight;
BYTE lfItalic;
BYTE lfUnderline;
BYTE lfStrikeOut;
BYTE lfCharSet;
BYTE lfOutPrecision;
BYTE lfClipPrecision;
BYTE lfQuality;
BYTE lfPitchAndFamily;
TCHAR lfFaceName[LF_FACESIZE];
end
struct SIZE of
LONG cx;
LONG cy;
end
struct MSG of
HWND hWnd;
UINT message;
WPARAM wParam;
LPARAM lParam;
DWORD time;
POINT pt;
end
BOOL GetEnvVariable (char @Name;
char @Buff;
word BuffLength) external KERNEL32.GetEnvironmentVariableA;
HANDLE GetModuleHandle (char @ModuleName) external KERNEL32.GetModuleHandleA;
HICON LoadIcon (HINSTANCE hInstance;
int IconID) external USER32.LoadIconA;
HICON LoadCursor (HINSTANCE hInstance;
int CursorID) external USER32.LoadCursorA;
ATOM RegisterClass (WNDCLASS @lpWndClass) external USER32.RegisterClassA;
HWND CreateWindowEx (DWORD dwExStyle; // extended window style
char @lpClassName; // pointer to registered class name
char @lpWindowName; // pointer to window name
DWORD dwStyle; // window style
int x; // horizontal position of window
int y; // vertical position of window
int nWidth; // window width
int nHeight; // window height
HWND hWndParent; // handle to parent or owner window
HMENU hMenu; // handle to menu or child-window identifier
HANDLE hInstance; // handle to application instance
void @lpParam) external USER32.CreateWindowExA;
HMENU CreateMenu () external USER32;
HMENU CreatePopupMenu () external USER32;
BOOL AppendMenu (HMENU hMenu; // handle to menu to be changed
UINT uFlags; // menu-item flags
UINT uIDNewItem; // menu-item identifier or handle of drop-down menu or submenu
char @lpNewItem) external USER32.AppendMenuA;
BOOL SetMenu (HWND hWnd;
HMENU hMenu) external USER32;
BOOL ShowWindow (HWND hWnd;
UINT nCmdShow) external USER32;
BOOL UpdateWindow (HWND hWnd) external USER32;
BOOL GetMessage (MSG @lpMsg;
HWND hWnd;
UINT wMsgFilterMin;
UINT wMsgFilterMax) external USER32.GetMessageA;
BOOL TranslateMessage (MSG @lpmsg) external USER32;
LONG DispatchMessage (MSG @lpmsg) external USER32.DispatchMessageA;
HDC BeginPaint (HWND hWnd;
PAINTSTRUCT @PS) external USER32;
BOOL EndPaint (HWND hWnd;
PAINTSTRUCT @PS) external USER32;
void PostQuitMessage (int nExitCode) external USER32;
LRESULT DefWindowProc (HWND hWnd;
UINT Msg;
WPARAM wParam;
LPARAM lParam) external USER32.DefWindowProcA;
int MessageBox (HWND hWnd;
char @lpText;
char @lpCaption;
UINT uType) external USER32.MessageBoxA;
HGDIOBJ GetStockObject (int fnObject) external GDI32;
HGDIOBJ SelectObject (HDC hDC;
HGDIOBJ hObj) external GDI32;
HFONT CreateFontIndirect(LOGFONT @lpfn) external GDI32.CreateFontIndirectA;
BOOL DeleteObject (HGDIOBJ hObj) external GDI32;
BOOL Rectangle (HDC hDC; // handle of device context
int nLeftRect; // x-coord. of bounding rectangle's upper-left corner
int nTopRect; // y-coord. of bounding rectangle's upper-left corner
int nRightRect; // x-coord. of bounding rectangle's lower-right corner
int nBottomRect) external GDI32;
int SetBkMode (HDC hdc; // handle of device context
int iBkMode) external GDI32;
BOOL TextOut (HDC hDC;
int nXStart;
int nYStart;
char @lpString;
int cbString) external GDI32.TextOutA;
BOOL GetTextExtentPoint(HDC hDC; // handle of device context
char @lpString; // address of text string
int cbString; // number of characters in string
SIZE @lpSize) external GDI32.GetTextExtentPointA;