|
|
1.1 root 1: /*++ BUILD Version: 0003 // Increment this if a change has global effects
2:
3: Copyright (c) 1985-91, Microsoft Corporation
4:
5: Module Name:
6:
7: winuser.h
8:
9: Abstract:
10:
11: Procedure declarations, constant definitions and macros for the User
12: component.
13:
14: --*/
15:
16: #ifndef _WINUSER_
17: #define _WINUSER_
18:
19: #ifndef NOUSER
20:
21: typedef HANDLE HDWP;
22: typedef PVOID LPMENUTEMPLATEA;
23: typedef PVOID LPMENUTEMPLATEW;
24: #ifdef UNICODE
25: #define LPMENUTEMPLATE LPMENUTEMPLATEW
26: #else
27: #define LPMENUTEMPLATE LPMENUTEMPLATEA
28: #endif // UNICODE
29:
30: typedef LRESULT (CALLBACK* WNDPROC)(HWND, UINT, WPARAM, LPARAM);
31: #ifdef STRICT
32: typedef BOOL (CALLBACK* DLGPROC)(HWND, UINT, WPARAM, LPARAM);
33: typedef VOID (CALLBACK* TIMERPROC)(HWND, UINT, UINT, DWORD);
34: typedef BOOL (CALLBACK* GRAYSTRINGPROC)(HDC, LPARAM, int);
35: typedef BOOL (CALLBACK* PROPENUMPROC)(HWND, LPCSTR, HANDLE);
36: typedef BOOL (CALLBACK* PROPENUMPROCEX)(HWND, LPTSTR, HANDLE, DWORD);
37: typedef BOOL (CALLBACK* WNDENUMPROC)(HWND, LPARAM);
38: typedef LRESULT (CALLBACK* HOOKPROC)(int code, WPARAM wParam, LPARAM lParam);
39: typedef int (CALLBACK* EDITWORDBREAKPROC)(LPSTR lpch, int ichCurrent, int cch, int code);
40: #else
41: typedef FARPROC DLGPROC;
42: typedef FARPROC TIMERPROC;
43: typedef FARPROC GRAYSTRINGPROC;
44: typedef FARPROC PROPENUMPROC;
45: typedef FARPROC WNDENUMPROC;
46: typedef FARPROC HOOKPROC;
47: typedef FARPROC EDITWORDBREAKPROC;
48: #endif
49:
50: #define MAKEINTRESOURCE(i) (LPTSTR)((DWORD)((WORD)(i)))
51:
52: #ifndef NORESOURCE
53:
54: /* Predefined Resource Types */
55: #define RT_CURSOR MAKEINTRESOURCE(1)
56: #define RT_BITMAP MAKEINTRESOURCE(2)
57: #define RT_ICON MAKEINTRESOURCE(3)
58: #define RT_MENU MAKEINTRESOURCE(4)
59: #define RT_DIALOG MAKEINTRESOURCE(5)
60: #define RT_STRING MAKEINTRESOURCE(6)
61: #define RT_FONTDIR MAKEINTRESOURCE(7)
62: #define RT_FONT MAKEINTRESOURCE(8)
63: #define RT_ACCELERATOR MAKEINTRESOURCE(9)
64: #define RT_RCDATA MAKEINTRESOURCE(10)
65: #define RT_MESSAGETABLE MAKEINTRESOURCE(11)
66:
67: #define DIFFERENCE 11
68:
69: /* NOTE: if any new resource types are introduced above this point, then the
70: ** value of DIFFERENCE must be changed.
71: ** (RT_GROUP_CURSOR - RT_CURSOR) must always be equal to DIFFERENCE
72: ** (RT_GROUP_ICON - RT_ICON) must always be equal to DIFFERENCE
73: */
74: #define RT_GROUP_CURSOR MAKEINTRESOURCE((DWORD)RT_CURSOR + DIFFERENCE)
75: /* The value RT_BITMAP+DIFFERENCE (13) is intentionally unused */
76: #define RT_GROUP_ICON MAKEINTRESOURCE((DWORD)RT_ICON + DIFFERENCE)
77: /* The value 15 is unused/obsolete */
78: #define RT_VERSION MAKEINTRESOURCE(16)
79: #define RT_DLGINCLUDE MAKEINTRESOURCE(17)
80:
81: #endif /* NORESOURCE */
82:
83: int WINAPI wvsprintfA(LPSTR, LPCSTR, CONST VOID *);
84: int WINAPI wvsprintfW(LPWSTR, LPCSTR, CONST VOID *);
85: #ifdef UNICODE
86: #define wvsprintf wvsprintfW
87: #else
88: #define wvsprintf wvsprintfA
89: #endif // !UNICODE
90:
91: int WINAPI wsprintfA(LPSTR, LPCSTR, ...);
92: int WINAPI wsprintfW(LPWSTR, LPCSTR, ...);
93: #ifdef UNICODE
94: #define wsprintf wsprintfW
95: #else
96: #define wsprintf wsprintfA
97: #endif // !UNICODE
98:
99: #ifndef NOSCROLL
100:
101: /* Scroll Bar Constants */
102: #define SB_HORZ 0
103: #define SB_VERT 1
104: #define SB_CTL 2
105: #define SB_BOTH 3
106: #define SB_MAX 3
107:
108: /* Scroll Bar Commands */
109: #define SB_LINEUP 0
110: #define SB_LINEDOWN 1
111: #define SB_PAGEUP 2
112: #define SB_PAGEDOWN 3
113: #define SB_THUMBPOSITION 4
114: #define SB_THUMBTRACK 5
115: #define SB_TOP 6
116: #define SB_BOTTOM 7
117: #define SB_ENDSCROLL 8
118: #define SB_CMD_MAX 8
119:
120: #endif /* NOSCROLL */
121:
122: #ifndef NOSHOWWINDOW
123:
124: /* ShowWindow() Commands */
125: #define SW_HIDE 0
126: #define SW_SHOWNORMAL 1
127: #define SW_NORMAL 1
128: #define SW_SHOWMINIMIZED 2
129: #define SW_SHOWMAXIMIZED 3
130: #define SW_MAXIMIZE 3
131: #define SW_SHOWNOACTIVATE 4
132: #define SW_SHOW 5
133: #define SW_MINIMIZE 6
134: #define SW_SHOWMINNOACTIVE 7
135: #define SW_SHOWNA 8
136: #define SW_RESTORE 9
137: #define SW_SHOWDEFAULT 10
138: #define SW_MAX 10
139:
140: /* Old ShowWindow() Commands */
141: #define HIDE_WINDOW 0
142: #define SHOW_OPENWINDOW 1
143: #define SHOW_ICONWINDOW 2
144: #define SHOW_FULLSCREEN 3
145: #define SHOW_OPENNOACTIVATE 4
146:
147: /* Identifiers for the WM_SHOWWINDOW message */
148: #define SW_PARENTCLOSING 1
149: #define SW_OTHERZOOM 2
150: #define SW_PARENTOPENING 3
151: #define SW_OTHERUNZOOM 4
152:
153: #endif /* NOSHOWWINDOW */
154:
155: #ifndef NOVIRTUALKEYCODES
156:
157: /* Virtual Keys, Standard Set */
158: #define VK_LBUTTON 0x01
159: #define VK_RBUTTON 0x02
160: #define VK_CANCEL 0x03
161: #define VK_MBUTTON 0x04 /* NOT contiguous with L & RBUTTON */
162:
163: #define VK_BACK 0x08
164: #define VK_TAB 0x09
165:
166: #define VK_CLEAR 0x0C
167: #define VK_RETURN 0x0D
168:
169: #define VK_SHIFT 0x10
170: #define VK_CONTROL 0x11
171: #define VK_MENU 0x12
172: #define VK_PAUSE 0x13
173: #define VK_CAPITAL 0x14
174:
175: #define VK_ESCAPE 0x1B
176:
177: #define VK_SPACE 0x20
178: #define VK_PRIOR 0x21
179: #define VK_NEXT 0x22
180: #define VK_END 0x23
181: #define VK_HOME 0x24
182: #define VK_LEFT 0x25
183: #define VK_UP 0x26
184: #define VK_RIGHT 0x27
185: #define VK_DOWN 0x28
186: #define VK_SELECT 0x29
187: #define VK_PRINT 0x2A
188: #define VK_EXECUTE 0x2B
189: #define VK_SNAPSHOT 0x2C
190: /* #define VK_COPY 0x2C not used by keyboards. */
191: #define VK_INSERT 0x2D
192: #define VK_DELETE 0x2E
193: #define VK_HELP 0x2F
194:
195: /* VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
196: /* VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
197:
198: #define VK_NUMPAD0 0x60
199: #define VK_NUMPAD1 0x61
200: #define VK_NUMPAD2 0x62
201: #define VK_NUMPAD3 0x63
202: #define VK_NUMPAD4 0x64
203: #define VK_NUMPAD5 0x65
204: #define VK_NUMPAD6 0x66
205: #define VK_NUMPAD7 0x67
206: #define VK_NUMPAD8 0x68
207: #define VK_NUMPAD9 0x69
208: #define VK_MULTIPLY 0x6A
209: #define VK_ADD 0x6B
210: #define VK_SEPARATOR 0x6C
211: #define VK_SUBTRACT 0x6D
212: #define VK_DECIMAL 0x6E
213: #define VK_DIVIDE 0x6F
214: #define VK_F1 0x70
215: #define VK_F2 0x71
216: #define VK_F3 0x72
217: #define VK_F4 0x73
218: #define VK_F5 0x74
219: #define VK_F6 0x75
220: #define VK_F7 0x76
221: #define VK_F8 0x77
222: #define VK_F9 0x78
223: #define VK_F10 0x79
224: #define VK_F11 0x7A
225: #define VK_F12 0x7B
226: #define VK_F13 0x7C
227: #define VK_F14 0x7D
228: #define VK_F15 0x7E
229: #define VK_F16 0x7F
230: #define VK_F17 0x80
231: #define VK_F18 0x81
232: #define VK_F19 0x82
233: #define VK_F20 0x83
234: #define VK_F21 0x84
235: #define VK_F22 0x85
236: #define VK_F23 0x86
237: #define VK_F24 0x87
238:
239: #define VK_NUMLOCK 0x90
240: #define VK_SCROLL 0x91
241:
242: /*
243: * VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.
244: * Used only as parameters to GetAsyncKeyState() and GetKeyState().
245: * No other API or message will distinguish left and right keys in this way.
246: */
247: #define VK_LSHIFT 0xA0
248: #define VK_RSHIFT 0xA1
249: #define VK_LCONTROL 0xA2
250: #define VK_RCONTROL 0xA3
251: #define VK_LMENU 0xA4
252: #define VK_RMENU 0xA5
253:
254: #define VK_ATTN 0xF6
255: #define VK_CRSEL 0xF7
256: #define VK_EXSEL 0xF8
257: #define VK_EREOF 0xF9
258: #define VK_PLAY 0xFA
259: #define VK_ZOOM 0xFB
260: #define VK_NONAME 0xFC
261: #define VK_PA1 0xFD
262: #define VK_OEM_CLEAR 0xFE
263:
264: #endif /* NOVIRTUALKEYCODES */
265:
266: #ifndef NOWH
267:
268: /* SetWindowsHook() codes */
269: #define WH_MIN (-1)
270: #define WH_MSGFILTER (-1)
271: #define WH_JOURNALRECORD 0
272: #define WH_JOURNALPLAYBACK 1
273: #define WH_KEYBOARD 2
274: #define WH_GETMESSAGE 3
275: #define WH_CALLWNDPROC 4
276: #define WH_CBT 5
277: #define WH_SYSMSGFILTER 6
278: #define WH_MOUSE 7
279: #define WH_HARDWARE 8
280: #define WH_DEBUG 9
281: #define WH_SHELL 10
282: #define WH_MAX 10
283:
284:
285: /* Obsolete hook codes (NO LONGER SUPPORTED) */
286: #define HC_GETLPLPFN (-3)
287: #define HC_LPLPFNNEXT (-2)
288: #define HC_LPFNNEXT (-1)
289:
290: /* Hook Codes */
291: #define HC_ACTION 0
292: #define HC_GETNEXT 1
293: #define HC_SKIP 2
294: #define HC_NOREMOVE 3
295: #define HC_NOREM HC_NOREMOVE
296: #define HC_SYSMODALON 4
297: #define HC_SYSMODALOFF 5
298:
299: /* CBT Hook Codes */
300: #define HCBT_MOVESIZE 0
301: #define HCBT_MINMAX 1
302: #define HCBT_QS 2
303: #define HCBT_CREATEWND 3
304: #define HCBT_DESTROYWND 4
305: #define HCBT_ACTIVATE 5
306: #define HCBT_CLICKSKIPPED 6
307: #define HCBT_KEYSKIPPED 7
308: #define HCBT_SYSCOMMAND 8
309: #define HCBT_SETFOCUS 9
310:
311: /*
312: * HCBT_CREATEWND parameters pointed to by lParam
313: */
314: typedef struct tagCBT_CREATEWNDA
315: {
316: struct tagCREATESTRUCTA *lpcs;
317: HWND hwndInsertAfter;
318: } CBT_CREATEWNDA, *LPCBT_CREATEWNDA;
319: /*
320: * HCBT_CREATEWND parameters pointed to by lParam
321: */
322: typedef struct tagCBT_CREATEWNDW
323: {
324: struct tagCREATESTRUCTW *lpcs;
325: HWND hwndInsertAfter;
326: } CBT_CREATEWNDW, *LPCBT_CREATEWNDW;
327: #ifdef UNICODE
328: #define CBT_CREATEWND CBT_CREATEWNDW
329: #define LPCBT_CREATEWND LPCBT_CREATEWNDW
330: #else
331: #define CBT_CREATEWND CBT_CREATEWNDA
332: #define LPCBT_CREATEWND LPCBT_CREATEWNDA
333: #endif // UNICODE
334:
335: /*
336: * HCBT_ACTIVATE structure pointed to by lParam
337: */
338: typedef struct tagCBTACTIVATESTRUCT
339: {
340: BOOL fMouse;
341: HWND hWndActive;
342: } CBTACTIVATESTRUCT, *LPCBTACTIVATESTRUCT;
343:
344: /* WH_MSGFILTER Filter Proc Codes */
345: #define MSGF_DIALOGBOX 0
346: #define MSGF_MESSAGEBOX 1
347: #define MSGF_MENU 2
348: #define MSGF_MOVE 3
349: #define MSGF_SIZE 4
350: #define MSGF_SCROLLBAR 5
351: #define MSGF_NEXTWINDOW 6
352: #define MSGF_MAINLOOP 8
353: #define MSGF_MAX 8
354: #define MSGF_USER 4096
355:
356: /* Shell support */
357: #define HSHELL_WINDOWCREATED 1
358: #define HSHELL_WINDOWDESTROYED 2
359: #define HSHELL_ACTIVATESHELLWINDOW 3
360:
361: /* Window Manager Hook Codes */
362: #define WC_INIT 1
363: #define WC_SWP 2
364: #define WC_DEFWINDOWPROC 3
365: #define WC_MINMAX 4
366: #define WC_MOVE 5
367: #define WC_SIZE 6
368: #define WC_DRAWCAPTION 7
369:
370: /* Message Structure used in Journaling */
371: typedef struct tagEVENTMSG {
372: UINT message;
373: UINT paramL;
374: UINT paramH;
375: DWORD time;
376: HWND hwnd;
377: } EVENTMSG, *PEVENTMSGMSG, NEAR *NPEVENTMSGMSG, FAR *LPEVENTMSGMSG;
378:
379: typedef struct tagEVENTMSG *PEVENTMSG, NEAR *NPEVENTMSG, FAR *LPEVENTMSG;
380:
381: /* Message structure used by WH_CALLWNDPROC */
382: typedef struct tagCWPSTRUCT {
383: LPARAM lParam;
384: WPARAM wParam;
385: DWORD message;
386: HWND hwnd;
387: } CWPSTRUCT, *PCWPSTRUCT, NEAR *NPCWPSTRUCT, FAR *LPCWPSTRUCT;
388:
389: /* Structure used by WH_DEBUG */
390: typedef struct tagDEBUGHOOKINFO
391: {
392: DWORD idThread;
393: LPARAM reserved;
394: LPARAM lParam;
395: WPARAM wParam;
396: int code;
397: } DEBUGHOOKINFO, *PDEBUGHOOKINFO, NEAR *NPDEBUGHOOKINFO, FAR* LPDEBUGHOOKINFO;
398:
399: typedef struct tagMOUSEHOOKSTRUCT {
400: POINT pt;
401: HWND hwnd;
402: UINT wHitTestCode;
403: DWORD dwExtraInfo;
404: } MOUSEHOOKSTRUCT, FAR *LPMOUSEHOOKSTRUCT, *PMOUSEHOOKSTRUCT;
405: #endif /* NOWH */
406:
407: /*
408: * Keyboard Layout API
409: */
410: #define HKL_PREV 0
411: #define HKL_NEXT 1
412:
413: #define KLF_ACTIVATE 0x1
414: #define KLF_SUBSTITUTE_OK 0x2
415: #define KLF_UNLOADPREVIOUS 0x4
416: #define KLF_REORDER 0x8
417:
418: /*
419: * Size of KeyboardLayoutName (number of characters), including nul terminator
420: */
421: #define KL_NAMELENGTH 9
422:
423: HKL LoadKeyboardLayoutA(LPCSTR pwszKLID, UINT Flags);
424: HKL LoadKeyboardLayoutW(LPCWSTR pwszKLID, UINT Flags);
425: #ifdef UNICODE
426: #define LoadKeyboardLayout LoadKeyboardLayoutW
427: #else
428: #define LoadKeyboardLayout LoadKeyboardLayoutA
429: #endif // !UNICODE
430: BOOL ActivateKeyboardLayout(HKL hkl, UINT Flags);
431: BOOL UnloadKeyboardLayout(HKL hkl);
432: BOOL GetKeyboardLayoutNameA(LPSTR pwszKLID);
433: BOOL GetKeyboardLayoutNameW(LPWSTR pwszKLID);
434: #ifdef UNICODE
435: #define GetKeyboardLayoutName GetKeyboardLayoutNameW
436: #else
437: #define GetKeyboardLayoutName GetKeyboardLayoutNameA
438: #endif // !UNICODE
439:
440: #ifndef NODESKTOP
441: /*
442: * Desktop-specific access flags
443: */
444: #define DESKTOP_ENUMWINDOWS 0x0001L
445: #define DESKTOP_CREATEWINDOW 0x0002L
446: #define DESKTOP_CREATEMENU 0x0004L
447: #define DESKTOP_HOOKCONTROL 0x0008L
448: #define DESKTOP_JOURNALRECORD 0x0010L
449: #define DESKTOP_JOURNALPLAYBACK 0x0020L
450: #define DESKTOP_ENUMERATE 0x0040L
451:
452: HDESK
453: WINAPI
454: GetThreadDesktop(
455: DWORD);
456:
457: #endif /* NODESKTOP */
458:
459: #ifndef NOWINDOWSTATION
460: /*
461: * Windowstation-specific access flags
462: */
463: #define WINSTA_ENUMDESKTOPS 0x0001L
464: #define WINSTA_READATTRIBUTES 0x0002L
465: #define WINSTA_ACCESSCLIPBOARD 0x0004L
466: #define WINSTA_CREATEDESKTOP 0x0008L
467: #define WINSTA_WRITEATTRIBUTES 0x0010L
468: #define WINSTA_ACCESSGLOBALATOMS 0x0020L
469: #define WINSTA_EXITWINDOWS 0x0040L
470: #define WINSTA_ENUMERATE 0x0100L
471: #define WINSTA_READSCREEN 0x0200L
472:
473: HWINSTA
474: WINAPI
475: GetProcessWindowStation(
476: VOID);
477: #endif /* NOWINDOWSTATION */
478:
479: #ifndef NOSECURITY
480: /*
481: * window-specific access flags
482: */
483: #define WIN_ACCESSWINDOW 0x0001L
484: #define WIN_ENUMERATE 0x0002L
485:
486: /*
487: * menu-specific access flags
488: */
489: #define MENU_ACCESSMENU 0x0001L
490:
491: BOOL
492: WINAPI
493: SetUserObjectSecurity(
494: HANDLE,
495: PSECURITY_INFORMATION,
496: PSECURITY_DESCRIPTOR);
497:
498: BOOL
499: WINAPI
500: GetUserObjectSecurity(
501: HANDLE,
502: PSECURITY_INFORMATION,
503: PSECURITY_DESCRIPTOR,
504: DWORD,
505: LPDWORD);
506:
507: #endif /* NOSECURITY */
508:
509: typedef struct tagWNDCLASSA {
510: UINT style;
511: WNDPROC lpfnWndProc;
512: int cbClsExtra;
513: int cbWndExtra;
514: HINSTANCE hInstance;
515: HICON hIcon;
516: HCURSOR hCursor;
517: HBRUSH hbrBackground;
518: LPCSTR lpszMenuName;
519: LPCSTR lpszClassName;
520: } WNDCLASSA, *PWNDCLASSA, NEAR *NPWNDCLASSA, FAR *LPWNDCLASSA;
521: typedef struct tagWNDCLASSW {
522: UINT style;
523: WNDPROC lpfnWndProc;
524: int cbClsExtra;
525: int cbWndExtra;
526: HINSTANCE hInstance;
527: HICON hIcon;
528: HCURSOR hCursor;
529: HBRUSH hbrBackground;
530: LPCWSTR lpszMenuName;
531: LPCWSTR lpszClassName;
532: } WNDCLASSW, *PWNDCLASSW, NEAR *NPWNDCLASSW, FAR *LPWNDCLASSW;
533: #ifdef UNICODE
534: #define WNDCLASS WNDCLASSW
535: #define PWNDCLASS PWNDCLASSW
536: #define NPWNDCLASS NPWNDCLASSW
537: #define LPWNDCLASS LPWNDCLASSW
538: #else
539: #define WNDCLASS WNDCLASSA
540: #define PWNDCLASS PWNDCLASSA
541: #define NPWNDCLASS NPWNDCLASSA
542: #define LPWNDCLASS LPWNDCLASSA
543: #endif // UNICODE
544:
545: #ifndef NOMSG
546:
547: /* Message structure */
548: typedef struct tagMSG {
549: HWND hwnd;
550: UINT message;
551: WPARAM wParam;
552: LPARAM lParam;
553: DWORD time;
554: POINT pt;
555: } MSG, *PMSG, NEAR *NPMSG, FAR *LPMSG;
556:
557: #define POINTSTOPOINT(pt,pts) {(pt).x = (SHORT)LOWORD(pts); \
558: (pt).y = (SHORT)HIWORD(pts);}
559: #define POINTTOPOINTS(pt) (MAKELONG((short)((pt).x), (short)((pt).y)))
560:
561:
562: #endif /* NOMSG */
563:
564: #ifndef NOWINOFFSETS
565:
566: /* Window field offsets for GetWindowLong() */
567: #define GWL_WNDPROC (-4)
568: #define GWL_HINSTANCE (-6)
569: #define GWL_HWNDPARENT (-8)
570: #define GWL_STYLE (-16)
571: #define GWL_EXSTYLE (-20)
572: #define GWL_USERDATA (-21)
573: #define GWL_ID (-12)
574:
575: /* Class field offsets for GetClassLong() */
576: #define GCL_MENUNAME (-8)
577: #define GCL_HBRBACKGROUND (-10)
578: #define GCL_HCURSOR (-12)
579: #define GCL_HICON (-14)
580: #define GCL_HMODULE (-16)
581: #define GCL_CBWNDEXTRA (-18)
582: #define GCL_CBCLSEXTRA (-20)
583: #define GCL_WNDPROC (-24)
584: #define GCL_STYLE (-26)
585: //!!!define GCW_ATOM (-32)
586:
587: #endif /* NOWINOFFSETS */
588:
589: #ifndef NOWINMESSAGES
590:
591: /* Window Messages */
592: #define WM_NULL 0x0000
593: #define WM_CREATE 0x0001
594: #define WM_DESTROY 0x0002
595: #define WM_MOVE 0x0003
596: #define WM_SIZE 0x0005
597: #define WM_ACTIVATE 0x0006
598: #define WM_SETFOCUS 0x0007
599: #define WM_KILLFOCUS 0x0008
600: #define WM_ENABLE 0x000A
601: #define WM_SETREDRAW 0x000B
602: #define WM_SETTEXT 0x000C
603: #define WM_GETTEXT 0x000D
604: #define WM_GETTEXTLENGTH 0x000E
605: #define WM_PAINT 0x000F
606: #define WM_CLOSE 0x0010
607: #define WM_QUERYENDSESSION 0x0011
608: #define WM_QUIT 0x0012
609: #define WM_QUERYOPEN 0x0013
610: #define WM_ERASEBKGND 0x0014
611: #define WM_SYSCOLORCHANGE 0x0015
612: #define WM_ENDSESSION 0x0016
613: #define WM_SHOWWINDOW 0x0018
614: #define WM_WININICHANGE 0x001A
615: #define WM_DEVMODECHANGE 0x001B
616: #define WM_ACTIVATEAPP 0x001C
617: #define WM_FONTCHANGE 0x001D
618: #define WM_TIMECHANGE 0x001E
619: #define WM_CANCELMODE 0x001F
620: #define WM_SETCURSOR 0x0020
621: #define WM_MOUSEACTIVATE 0x0021
622: #define WM_CHILDACTIVATE 0x0022
623: #define WM_QUEUESYNC 0x0023
624:
625: /*
626: * Struct pointed to by WM_GETMINMAXINFO lParam
627: */
628: typedef struct tagMINMAXINFO {
629: POINT ptReserved;
630: POINT ptMaxSize;
631: POINT ptMaxPosition;
632: POINT ptMinTrackSize;
633: POINT ptMaxTrackSize;
634: } MINMAXINFO, *PMINMAXINFO;
635: #define WM_GETMINMAXINFO 0x0024
636:
637:
638: #define WM_PAINTICON 0x0026
639: #define WM_ICONERASEBKGND 0x0027
640: #define WM_NEXTDLGCTL 0x0028
641: #define WM_SPOOLERSTATUS 0x002A
642: #define WM_DRAWITEM 0x002B
643: #define WM_MEASUREITEM 0x002C
644: #define WM_DELETEITEM 0x002D
645: #define WM_VKEYTOITEM 0x002E
646: #define WM_CHARTOITEM 0x002F
647: #define WM_SETFONT 0x0030
648: #define WM_GETFONT 0x0031
649: #define WM_SETHOTKEY 0x0032
650: #define WM_GETHOTKEY 0x0033
651: #define WM_QUERYDRAGICON 0x0037
652:
653: #define WM_COMPAREITEM 0x0039
654: #define WM_FULLSCREEN 0x003A
655:
656: #define WM_COMPACTING 0x0041
657: #define WM_OTHERWINDOWCREATED 0x0042
658: #define WM_OTHERWINDOWDESTROYED 0x0043
659: #define WM_COMMNOTIFY 0x0044
660: #define WM_HOTKEYEVENT 0x0045
661: #define WM_WINDOWPOSCHANGING 0x0046
662: #define WM_WINDOWPOSCHANGED 0x0047
663: #define WM_POWER 0x0048
664:
665: #define WM_NCCREATE 0x0081
666: #define WM_NCDESTROY 0x0082
667: #define WM_NCCALCSIZE 0x0083
668: #define WM_NCHITTEST 0x0084
669: #define WM_NCPAINT 0x0085
670: #define WM_NCACTIVATE 0x0086
671: #define WM_GETDLGCODE 0x0087
672: #define WM_NCMOUSEMOVE 0x00A0
673: #define WM_NCLBUTTONDOWN 0x00A1
674: #define WM_NCLBUTTONUP 0x00A2
675: #define WM_NCLBUTTONDBLCLK 0x00A3
676: #define WM_NCRBUTTONDOWN 0x00A4
677: #define WM_NCRBUTTONUP 0x00A5
678: #define WM_NCRBUTTONDBLCLK 0x00A6
679: #define WM_NCMBUTTONDOWN 0x00A7
680: #define WM_NCMBUTTONUP 0x00A8
681: #define WM_NCMBUTTONDBLCLK 0x00A9
682:
683: #define WM_KEYFIRST 0x0100
684: #define WM_KEYDOWN 0x0100
685: #define WM_KEYUP 0x0101
686: #define WM_CHAR 0x0102
687: #define WM_DEADCHAR 0x0103
688: #define WM_SYSKEYDOWN 0x0104
689: #define WM_SYSKEYUP 0x0105
690: #define WM_SYSCHAR 0x0106
691: #define WM_SYSDEADCHAR 0x0107
692: #define WM_KEYLAST 0x0108
693:
694: #define WM_INITDIALOG 0x0110
695: #define WM_COMMAND 0x0111
696: #define WM_SYSCOMMAND 0x0112
697: #define WM_TIMER 0x0113
698: #define WM_HSCROLL 0x0114
699: #define WM_VSCROLL 0x0115
700: #define WM_INITMENU 0x0116
701: #define WM_INITMENUPOPUP 0x0117
702: #define WM_MENUSELECT 0x011F
703: #define WM_MENUCHAR 0x0120
704: #define WM_ENTERIDLE 0x0121
705:
706: #define WM_CTLCOLORMSGBOX 0x0132
707: #define WM_CTLCOLOREDIT 0x0133
708: #define WM_CTLCOLORLISTBOX 0x0134
709: #define WM_CTLCOLORBTN 0x0135
710: #define WM_CTLCOLORDLG 0x0136
711: #define WM_CTLCOLORSCROLLBAR 0x0137
712: #define WM_CTLCOLORSTATIC 0x0138
713:
714: #define WM_MOUSEFIRST 0x0200
715: #define WM_MOUSEMOVE 0x0200
716: #define WM_LBUTTONDOWN 0x0201
717: #define WM_LBUTTONUP 0x0202
718: #define WM_LBUTTONDBLCLK 0x0203
719: #define WM_RBUTTONDOWN 0x0204
720: #define WM_RBUTTONUP 0x0205
721: #define WM_RBUTTONDBLCLK 0x0206
722: #define WM_MBUTTONDOWN 0x0207
723: #define WM_MBUTTONUP 0x0208
724: #define WM_MBUTTONDBLCLK 0x0209
725: #define WM_MOUSELAST 0x0209
726:
727: #define WM_PARENTNOTIFY 0x0210
728: #define WM_MDICREATE 0x0220
729: #define WM_MDIDESTROY 0x0221
730: #define WM_MDIACTIVATE 0x0222
731: #define WM_MDIRESTORE 0x0223
732: #define WM_MDINEXT 0x0224
733: #define WM_MDIMAXIMIZE 0x0225
734: #define WM_MDITILE 0x0226
735: #define WM_MDICASCADE 0x0227
736: #define WM_MDIICONARRANGE 0x0228
737: #define WM_MDIGETACTIVE 0x0229
738: #define WM_MDISETMENU 0x0230
739: #define WM_DROPFILES 0x0233
740: #define WM_MDIREFRESHMENU 0x0234
741:
742: #define WM_CUT 0x0300
743: #define WM_COPY 0x0301
744: #define WM_PASTE 0x0302
745: #define WM_CLEAR 0x0303
746: #define WM_UNDO 0x0304
747: #define WM_RENDERFORMAT 0x0305
748: #define WM_RENDERALLFORMATS 0x0306
749: #define WM_DESTROYCLIPBOARD 0x0307
750: #define WM_DRAWCLIPBOARD 0x0308
751: #define WM_PAINTCLIPBOARD 0x0309
752: #define WM_VSCROLLCLIPBOARD 0x030A
753: #define WM_SIZECLIPBOARD 0x030B
754: #define WM_ASKCBFORMATNAME 0x030C
755: #define WM_CHANGECBCHAIN 0x030D
756: #define WM_HSCROLLCLIPBOARD 0x030E
757: #define WM_QUERYNEWPALETTE 0x030F
758: #define WM_PALETTEISCHANGING 0x0310
759: #define WM_PALETTECHANGED 0x0311
760: #define WM_HOTKEY 0x0312
761:
762: /* PenWindows specific messages */
763: #define WM_PENWINFIRST 0x0380
764: #define WM_PENWINLAST 0x038F
765:
766: #define WM_MM_RESERVED_FIRST 0x03A0
767: #define WM_MM_RESERVED_LAST 0x03DF
768:
769: /* NOTE: All Message Numbers below 0x0400 are RESERVED. */
770:
771: /* Private Window Messages Start Here: */
772: #define WM_USER 0x0400
773:
774: #ifndef NONCMESSAGES
775:
776: /* WM_SYNCTASK Commands */
777: #define ST_BEGINSWP 0
778: #define ST_ENDSWP 1
779:
780: /* WinWhere() Area Codes */
781: #define HTERROR (-2)
782: #define HTTRANSPARENT (-1)
783: #define HTNOWHERE 0
784: #define HTCLIENT 1
785: #define HTCAPTION 2
786: #define HTSYSMENU 3
787: #define HTGROWBOX 4
788: #define HTSIZE HTGROWBOX
789: #define HTMENU 5
790: #define HTHSCROLL 6
791: #define HTVSCROLL 7
792: #define HTMINBUTTON 8
793: #define HTMAXBUTTON 9
794: #define HTLEFT 10
795: #define HTRIGHT 11
796: #define HTTOP 12
797: #define HTTOPLEFT 13
798: #define HTTOPRIGHT 14
799: #define HTBOTTOM 15
800: #define HTBOTTOMLEFT 16
801: #define HTBOTTOMRIGHT 17
802: #define HTBORDER 18
803: #define HTREDUCE HTMINBUTTON
804: #define HTZOOM HTMAXBUTTON
805: #define HTSIZEFIRST HTLEFT
806: #define HTSIZELAST HTBOTTOMRIGHT
807:
808: #endif /* NONCMESSAGES */
809:
810: /* WM_MOUSEACTIVATE Return Codes */
811: #define MA_ACTIVATE 1
812: #define MA_ACTIVATEANDEAT 2
813: #define MA_NOACTIVATE 3
814: #define MA_NOACTIVATEANDEAT 4
815:
816: UINT
817: WINAPI
818: RegisterWindowMessageA(
819: LPCSTR lpString);
820: UINT
821: WINAPI
822: RegisterWindowMessageW(
823: LPCWSTR lpString);
824: #ifdef UNICODE
825: #define RegisterWindowMessage RegisterWindowMessageW
826: #else
827: #define RegisterWindowMessage RegisterWindowMessageA
828: #endif // !UNICODE
829:
830: /* WM_SIZE message wParam values */
831: #define SIZE_RESTORED 0
832: #define SIZE_MINIMIZED 1
833: #define SIZE_MAXIMIZED 2
834: #define SIZE_MAXSHOW 3
835: #define SIZE_MAXHIDE 4
836:
837: /* Obsolete constant names */
838: #define SIZENORMAL SIZE_RESTORED
839: #define SIZEICONIC SIZE_MINIMIZED
840: #define SIZEFULLSCREEN SIZE_MAXIMIZED
841: #define SIZEZOOMSHOW SIZE_MAXSHOW
842: #define SIZEZOOMHIDE SIZE_MAXHIDE
843:
844: /* WM_WINDOWPOSCHANGING/CHANGED struct pointed to by lParam */
845: typedef struct tagWINDOWPOS {
846: HWND hwnd;
847: HWND hwndInsertAfter;
848: int x;
849: int y;
850: int cx;
851: int cy;
852: UINT flags;
853: } WINDOWPOS, *LPWINDOWPOS, *PWINDOWPOS;
854:
855: /* WM_NCCALCSIZE parameter structure */
856: typedef struct tagNCCALCSIZE_PARAMS {
857: RECT rgrc[3];
858: PWINDOWPOS lppos;
859: } NCCALCSIZE_PARAMS, *LPNCCALCSIZE_PARAMS;
860:
861: /* WM_NCCALCSIZE "window valid rect" return values */
862: #define WVR_ALIGNTOP 0x0010
863: #define WVR_ALIGNLEFT 0x0020
864: #define WVR_ALIGNBOTTOM 0x0040
865: #define WVR_ALIGNRIGHT 0x0080
866: #define WVR_HREDRAW 0x0100
867: #define WVR_VREDRAW 0x0200
868: #define WVR_REDRAW (WVR_HREDRAW | WVR_VREDRAW)
869: #define WVR_VALIDRECTS 0x0400
870:
871:
872: #ifndef NOKEYSTATES
873:
874: /* Key State Masks for Mouse Messages */
875: #define MK_LBUTTON 0x0001
876: #define MK_RBUTTON 0x0002
877: #define MK_SHIFT 0x0004
878: #define MK_CONTROL 0x0008
879: #define MK_MBUTTON 0x0010
880:
881: #endif /* NOKEYSTATES */
882:
883: #endif /* NOWINMESSAGES */
884:
885: #ifndef NOWINSTYLES
886:
887: /* Window Styles */
888: #define WS_OVERLAPPED 0x00000000L
889: #define WS_POPUP 0x80000000L
890: #define WS_CHILD 0x40000000L
891: #define WS_MINIMIZE 0x20000000L
892: #define WS_VISIBLE 0x10000000L
893: #define WS_DISABLED 0x08000000L
894: #define WS_CLIPSIBLINGS 0x04000000L
895: #define WS_CLIPCHILDREN 0x02000000L
896: #define WS_MAXIMIZE 0x01000000L
897: #define WS_CAPTION 0x00C00000L /* WS_BORDER | WS_DLGFRAME */
898: #define WS_BORDER 0x00800000L
899: #define WS_DLGFRAME 0x00400000L
900: #define WS_VSCROLL 0x00200000L
901: #define WS_HSCROLL 0x00100000L
902: #define WS_SYSMENU 0x00080000L
903: #define WS_THICKFRAME 0x00040000L
904: #define WS_GROUP 0x00020000L
905: #define WS_TABSTOP 0x00010000L
906:
907: #define WS_MINIMIZEBOX 0x00020000L
908: #define WS_MAXIMIZEBOX 0x00010000L
909:
910: #define WS_TILED WS_OVERLAPPED
911: #define WS_ICONIC WS_MINIMIZE
912: #define WS_SIZEBOX WS_THICKFRAME
913: #define WS_TILEDWINDOW WS_OVERLAPPEDWINDOW
914:
915: /* Common Window Styles */
916: #define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX)
917: #define WS_POPUPWINDOW (WS_POPUP | WS_BORDER | WS_SYSMENU)
918: #define WS_CHILDWINDOW (WS_CHILD)
919:
920: /* Extended Window Styles */
921: #define WS_EX_DLGMODALFRAME 0x00000001L
922: #define WS_EX_NOPARENTNOTIFY 0x00000004L
923: #define WS_EX_TOPMOST 0x00000008L
924: #define WS_EX_ACCEPTFILES 0x00000010L
925: #define WS_EX_TRANSPARENT 0x00000020L
926:
927: /* Class styles */
928: #define CS_VREDRAW 0x0001
929: #define CS_HREDRAW 0x0002
930: #define CS_KEYCVTWINDOW 0x0004
931: #define CS_DBLCLKS 0x0008
932: /* 0x0010 - reserved (see user\server\usersrv.h) */
933: #define CS_OWNDC 0x0020
934: #define CS_CLASSDC 0x0040
935: #define CS_PARENTDC 0x0080
936: #define CS_NOKEYCVT 0x0100
937: #define CS_NOCLOSE 0x0200
938: #define CS_SAVEBITS 0x0800
939: #define CS_BYTEALIGNCLIENT 0x1000
940: #define CS_BYTEALIGNWINDOW 0x2000
941: #define CS_GLOBALCLASS 0x4000 /* Global window class */
942:
943: #endif /* NOWINSTYLES */
944:
945: #ifndef NOCLIPBOARD
946:
947: /* Predefined Clipboard Formats */
948: #define CF_TEXT 1
949: #define CF_BITMAP 2
950: #define CF_METAFILEPICT 3
951: #define CF_SYLK 4
952: #define CF_DIF 5
953: #define CF_TIFF 6
954: #define CF_OEMTEXT 7
955: #define CF_DIB 8
956: #define CF_PALETTE 9
957: #define CF_PENDATA 10
958: #define CF_RIFF 11
959: #define CF_WAVE 12
960: #define CF_UNICODETEXT 13
961: #define CF_ENHMETAFILE 14
962:
963: #define CF_OWNERDISPLAY 0x0080
964: #define CF_DSPTEXT 0x0081
965: #define CF_DSPBITMAP 0x0082
966: #define CF_DSPMETAFILEPICT 0x0083
967: #define CF_DSPENHMETAFILE 0x008E
968:
969: /* "Private" formats don't get GlobalFree()'d */
970: #define CF_PRIVATEFIRST 0x0200
971: #define CF_PRIVATELAST 0x02FF
972:
973: /* "GDIOBJ" formats do get DeleteObject()'d */
974: #define CF_GDIOBJFIRST 0x0300
975: #define CF_GDIOBJLAST 0x03FF
976:
977: #endif /* NOCLIPBOARD */
978:
979: /*
980: * Defines for the fVirt field of the Accelerator table structure.
981: */
982: #define FVIRTKEY TRUE /* Assumed to be == TRUE */
983: #define FNOINVERT 0x02
984: #define FSHIFT 0x04
985: #define FCONTROL 0x08
986: #define FALT 0x10
987:
988: typedef struct tagACCEL {
989: BYTE fVirt; /* Also called the flags field */
990: WORD key;
991: WORD cmd;
992: } ACCEL, *LPACCEL;
993:
994: typedef struct tagPAINTSTRUCT {
995: HDC hdc;
996: BOOL fErase;
997: RECT rcPaint;
998: BOOL fRestore;
999: BOOL fIncUpdate;
1000: BYTE rgbReserved[32];
1001: } PAINTSTRUCT, *PPAINTSTRUCT, *NPPAINTSTRUCT, *LPPAINTSTRUCT;
1002:
1003: typedef struct tagCREATESTRUCTA {
1004: LPVOID lpCreateParams;
1005: HINSTANCE hInstance;
1006: HMENU hMenu;
1007: HWND hwndParent;
1008: int cy;
1009: int cx;
1010: int y;
1011: int x;
1012: LONG style;
1013: LPCSTR lpszName;
1014: LPCSTR lpszClass;
1015: DWORD dwExStyle;
1016: } CREATESTRUCTA, *LPCREATESTRUCTA;
1017: typedef struct tagCREATESTRUCTW {
1018: LPVOID lpCreateParams;
1019: HINSTANCE hInstance;
1020: HMENU hMenu;
1021: HWND hwndParent;
1022: int cy;
1023: int cx;
1024: int y;
1025: int x;
1026: LONG style;
1027: LPCWSTR lpszName;
1028: LPCWSTR lpszClass;
1029: DWORD dwExStyle;
1030: } CREATESTRUCTW, *LPCREATESTRUCTW;
1031: #ifdef UNICODE
1032: #define CREATESTRUCT CREATESTRUCTW
1033: #define LPCREATESTRUCT LPCREATESTRUCTW
1034: #else
1035: #define CREATESTRUCT CREATESTRUCTA
1036: #define LPCREATESTRUCT LPCREATESTRUCTA
1037: #endif // UNICODE
1038:
1039: typedef struct tagWINDOWPLACEMENT {
1040: UINT length;
1041: UINT flags;
1042: UINT showCmd;
1043: POINT ptMinPosition;
1044: POINT ptMaxPosition;
1045: RECT rcNormalPosition;
1046: } WINDOWPLACEMENT;
1047: typedef WINDOWPLACEMENT *PWINDOWPLACEMENT;
1048:
1049: #define WPF_SETMINPOSITION 0x0001
1050: #define WPF_RESTORETOMAXIMIZED 0x0002
1051:
1052: /* Owner draw control types */
1053: #define ODT_MENU 1
1054: #define ODT_LISTBOX 2
1055: #define ODT_COMBOBOX 3
1056: #define ODT_BUTTON 4
1057:
1058: /* Owner draw actions */
1059: #define ODA_DRAWENTIRE 0x0001
1060: #define ODA_SELECT 0x0002
1061: #define ODA_FOCUS 0x0004
1062:
1063: /* Owner draw state */
1064: #define ODS_SELECTED 0x0001
1065: #define ODS_GRAYED 0x0002
1066: #define ODS_DISABLED 0x0004
1067: #define ODS_CHECKED 0x0008
1068: #define ODS_FOCUS 0x0010
1069:
1070: /* MEASUREITEMSTRUCT for ownerdraw */
1071: typedef struct tagMEASUREITEMSTRUCT {
1072: UINT CtlType;
1073: UINT CtlID;
1074: UINT itemID;
1075: UINT itemWidth;
1076: UINT itemHeight;
1077: DWORD itemData;
1078: } MEASUREITEMSTRUCT, NEAR *PMEASUREITEMSTRUCT, FAR *LPMEASUREITEMSTRUCT;
1079:
1080:
1081: /* DRAWITEMSTRUCT for ownerdraw */
1082: typedef struct tagDRAWITEMSTRUCT {
1083: UINT CtlType;
1084: UINT CtlID;
1085: UINT itemID;
1086: UINT itemAction;
1087: UINT itemState;
1088: HWND hwndItem;
1089: HDC hDC;
1090: RECT rcItem;
1091: DWORD itemData;
1092: } DRAWITEMSTRUCT, NEAR *PDRAWITEMSTRUCT, FAR *LPDRAWITEMSTRUCT;
1093:
1094: /* DELETEITEMSTRUCT for ownerdraw */
1095: typedef struct tagDELETEITEMSTRUCT {
1096: UINT CtlType;
1097: UINT CtlID;
1098: UINT itemID;
1099: HWND hwndItem;
1100: UINT itemData;
1101: } DELETEITEMSTRUCT, NEAR *PDELETEITEMSTRUCT, FAR *LPDELETEITEMSTRUCT;
1102:
1103: /* COMPAREITEMSTUCT for ownerdraw sorting */
1104: typedef struct tagCOMPAREITEMSTRUCT {
1105: UINT CtlType;
1106: UINT CtlID;
1107: HWND hwndItem;
1108: UINT itemID1;
1109: DWORD itemData1;
1110: UINT itemID2;
1111: DWORD itemData2;
1112: DWORD dwLocaleId;
1113: } COMPAREITEMSTRUCT, NEAR *PCOMPAREITEMSTRUCT, FAR *LPCOMPAREITEMSTRUCT;
1114:
1115: #ifndef NOMSG
1116:
1117: /* Message Function Templates */
1118: BOOL
1119: WINAPI
1120: GetMessageA(
1121: LPMSG lpMsg,
1122: HWND hWnd ,
1123: UINT wMsgFilterMin,
1124: UINT wMsgFilterMax);
1125: /* Message Function Templates */
1126: BOOL
1127: WINAPI
1128: GetMessageW(
1129: LPMSG lpMsg,
1130: HWND hWnd ,
1131: UINT wMsgFilterMin,
1132: UINT wMsgFilterMax);
1133: #ifdef UNICODE
1134: #define GetMessage GetMessageW
1135: #else
1136: #define GetMessage GetMessageA
1137: #endif // !UNICODE
1138:
1139: BOOL
1140: WINAPI
1141: TranslateMessage(
1142: CONST MSG *lpMsg);
1143:
1144: LONG
1145: WINAPI
1146: DispatchMessageA(
1147: CONST MSG *lpMsg);
1148: LONG
1149: WINAPI
1150: DispatchMessageW(
1151: CONST MSG *lpMsg);
1152: #ifdef UNICODE
1153: #define DispatchMessage DispatchMessageW
1154: #else
1155: #define DispatchMessage DispatchMessageA
1156: #endif // !UNICODE
1157:
1158: BOOL
1159: WINAPI
1160: PeekMessageA(
1161: LPMSG lpMsg,
1162: HWND hWnd ,
1163: UINT wMsgFilterMin,
1164: UINT wMsgFilterMax,
1165: UINT wRemoveMsg);
1166: BOOL
1167: WINAPI
1168: PeekMessageW(
1169: LPMSG lpMsg,
1170: HWND hWnd ,
1171: UINT wMsgFilterMin,
1172: UINT wMsgFilterMax,
1173: UINT wRemoveMsg);
1174: #ifdef UNICODE
1175: #define PeekMessage PeekMessageW
1176: #else
1177: #define PeekMessage PeekMessageA
1178: #endif // !UNICODE
1179:
1180: /* PeekMessage() Options */
1181: #define PM_NOREMOVE 0x0000
1182: #define PM_REMOVE 0x0001
1183: #define PM_NOYIELD 0x0002
1184:
1185: #endif /* NOMSG */
1186:
1187: BOOL
1188: WINAPI
1189: RegisterHotKey(
1190: HWND hwnd ,
1191: int id,
1192: UINT fsModifiers,
1193: UINT vk);
1194:
1195: BOOL
1196: WINAPI
1197: UnregisterHotKey(
1198: HWND hwnd,
1199: int id);
1200:
1201: #define MOD_ALT 0x0001
1202: #define MOD_CONTROL 0x0002
1203: #define MOD_SHIFT 0x0004
1204:
1205: #define IDHOT_SNAPWINDOW (-1) /* SHIFT-PRINTSCRN */
1206: #define IDHOT_SNAPDESKTOP (-2) /* PRINTSCRN */
1207:
1208: #ifdef WIN_INTERNAL
1209: #ifndef LSTRING
1210: #define NOLSTRING
1211: #endif
1212: #ifndef LFILEIO
1213: #define NOLFILEIO
1214: #endif
1215: #endif
1216:
1217:
1218: #define EWX_LOGOFF 0
1219: #define EWX_SHUTDOWN 1
1220: #define EWX_REBOOT 2
1221: #define EWX_FORCE 4
1222:
1223:
1224: #define ExitWindows(dwReserved, Code) ExitWindowsEx(EWX_LOGOFF, (-1))
1225:
1226: BOOL
1227: WINAPI
1228: ExitWindowsEx(
1229: UINT uFlags,
1230: DWORD ForceTimeout);
1231:
1232: BOOL
1233: WINAPI
1234: SwapMouseButton(
1235: BOOL);
1236:
1237: DWORD
1238: WINAPI
1239: GetMessagePos(
1240: VOID);
1241:
1242: LONG
1243: WINAPI
1244: GetMessageTime(
1245: VOID);
1246:
1247: LONG
1248: WINAPI
1249: GetMessageExtraInfo(
1250: VOID);
1251:
1252: LRESULT
1253: WINAPI
1254: SendMessageA(
1255: HWND hWnd,
1256: UINT Msg,
1257: WPARAM wParam,
1258: LPARAM lParam);
1259: LRESULT
1260: WINAPI
1261: SendMessageW(
1262: HWND hWnd,
1263: UINT Msg,
1264: WPARAM wParam,
1265: LPARAM lParam);
1266: #ifdef UNICODE
1267: #define SendMessage SendMessageW
1268: #else
1269: #define SendMessage SendMessageA
1270: #endif // !UNICODE
1271:
1272: BOOL
1273: WINAPI
1274: SendNotifyMessageA(
1275: HWND hwnd,
1276: UINT Msg,
1277: WPARAM wParam,
1278: LPARAM lParam);
1279: BOOL
1280: WINAPI
1281: SendNotifyMessageW(
1282: HWND hwnd,
1283: UINT Msg,
1284: WPARAM wParam,
1285: LPARAM lParam);
1286: #ifdef UNICODE
1287: #define SendNotifyMessage SendNotifyMessageW
1288: #else
1289: #define SendNotifyMessage SendNotifyMessageA
1290: #endif // !UNICODE
1291:
1292: BOOL
1293: WINAPI
1294: PostMessageA(
1295: HWND hWnd,
1296: UINT Msg,
1297: WPARAM wParam,
1298: LPARAM lParam);
1299: BOOL
1300: WINAPI
1301: PostMessageW(
1302: HWND hWnd,
1303: UINT Msg,
1304: WPARAM wParam,
1305: LPARAM lParam);
1306: #ifdef UNICODE
1307: #define PostMessage PostMessageW
1308: #else
1309: #define PostMessage PostMessageA
1310: #endif // !UNICODE
1311:
1312: BOOL
1313: WINAPI
1314: PostThreadMessageA(
1315: DWORD idThread,
1316: UINT Msg,
1317: WPARAM wParam,
1318: LPARAM lParam);
1319: BOOL
1320: WINAPI
1321: PostThreadMessageW(
1322: DWORD idThread,
1323: UINT Msg,
1324: WPARAM wParam,
1325: LPARAM lParam);
1326: #ifdef UNICODE
1327: #define PostThreadMessage PostThreadMessageW
1328: #else
1329: #define PostThreadMessage PostThreadMessageA
1330: #endif // !UNICODE
1331:
1332: #define PostAppMessageA(idThread, wMsg, wParam, lParam)\
1333: PostThreadMessageA((DWORD)idThread, wMsg, wParam, lParam)
1334: #define PostAppMessageW(idThread, wMsg, wParam, lParam)\
1335: PostThreadMessageW((DWORD)idThread, wMsg, wParam, lParam)
1336: #ifdef UNICODE
1337: #define PostAppMessage PostAppMessageW
1338: #else
1339: #define PostAppMessage PostAppMessageA
1340: #endif // !UNICODE
1341:
1342: /* Special HWND value for use with PostMessage() and SendMessage() */
1343: #define HWND_BROADCAST ((HWND)0xffff)
1344:
1345: BOOL
1346: WINAPI
1347: AttachThreadInput(
1348: DWORD idAttach,
1349: DWORD idAttachTo,
1350: BOOL fAttach);
1351:
1352:
1353: BOOL
1354: WINAPI
1355: ReplyMessage(
1356: LRESULT);
1357:
1358: BOOL
1359: WINAPI
1360: WaitMessage(
1361: VOID);
1362:
1363: DWORD
1364: WINAPI
1365: WaitForInputIdle(
1366: HANDLE hProcess,
1367: DWORD dwMilliseconds);
1368:
1369: LRESULT
1370: WINAPI
1371: DefWindowProcA(
1372: HWND hWnd,
1373: UINT Msg,
1374: WPARAM wParam,
1375: LPARAM lParam);
1376: LRESULT
1377: WINAPI
1378: DefWindowProcW(
1379: HWND hWnd,
1380: UINT Msg,
1381: WPARAM wParam,
1382: LPARAM lParam);
1383: #ifdef UNICODE
1384: #define DefWindowProc DefWindowProcW
1385: #else
1386: #define DefWindowProc DefWindowProcA
1387: #endif // !UNICODE
1388:
1389: VOID
1390: WINAPI
1391: PostQuitMessage(
1392: int nExitCode);
1393:
1394: LRESULT
1395: WINAPI
1396: CallWindowProcA(
1397: WNDPROC lpPrevWndFunc,
1398: HWND hWnd,
1399: UINT Msg,
1400: WPARAM wParam,
1401: LPARAM lParam);
1402: LRESULT
1403: WINAPI
1404: CallWindowProcW(
1405: WNDPROC lpPrevWndFunc,
1406: HWND hWnd,
1407: UINT Msg,
1408: WPARAM wParam,
1409: LPARAM lParam);
1410: #ifdef UNICODE
1411: #define CallWindowProc CallWindowProcW
1412: #else
1413: #define CallWindowProc CallWindowProcA
1414: #endif // !UNICODE
1415:
1416: BOOL
1417: WINAPI
1418: InSendMessage(
1419: VOID);
1420:
1421: UINT
1422: WINAPI
1423: GetDoubleClickTime(
1424: VOID);
1425:
1426: BOOL
1427: WINAPI
1428: SetDoubleClickTime(
1429: UINT);
1430:
1431: ATOM
1432: WINAPI
1433: RegisterClassA(
1434: LPWNDCLASSA lpWndClass);
1435: ATOM
1436: WINAPI
1437: RegisterClassW(
1438: LPWNDCLASSW lpWndClass);
1439: #ifdef UNICODE
1440: #define RegisterClass RegisterClassW
1441: #else
1442: #define RegisterClass RegisterClassA
1443: #endif // !UNICODE
1444:
1445: BOOL
1446: WINAPI
1447: UnregisterClassA(
1448: LPCSTR lpClassName,
1449: HINSTANCE hInstance);
1450: BOOL
1451: WINAPI
1452: UnregisterClassW(
1453: LPCWSTR lpClassName,
1454: HINSTANCE hInstance);
1455: #ifdef UNICODE
1456: #define UnregisterClass UnregisterClassW
1457: #else
1458: #define UnregisterClass UnregisterClassA
1459: #endif // !UNICODE
1460:
1461: BOOL
1462: WINAPI
1463: GetClassInfoA(
1464: HINSTANCE hInstance ,
1465: LPCSTR lpClassName,
1466: LPWNDCLASSA lpWndClass);
1467: BOOL
1468: WINAPI
1469: GetClassInfoW(
1470: HINSTANCE hInstance ,
1471: LPCWSTR lpClassName,
1472: LPWNDCLASSW lpWndClass);
1473: #ifdef UNICODE
1474: #define GetClassInfo GetClassInfoW
1475: #else
1476: #define GetClassInfo GetClassInfoA
1477: #endif // !UNICODE
1478:
1479: #define CW_USEDEFAULT ((int)0x80000000)
1480:
1481: /* Special value for CreateWindow, et al. */
1482: #define HWND_DESKTOP ((HWND)0)
1483:
1484: HWND
1485: WINAPI
1486: CreateWindowExA(
1487: DWORD dwExStyle,
1488: LPCSTR lpClassName,
1489: LPCSTR lpWindowName,
1490: DWORD dwStyle,
1491: int X,
1492: int Y,
1493: int nWidth,
1494: int nHeight,
1495: HWND hWndParent ,
1496: HMENU hMenu,
1497: HINSTANCE hInstance,
1498: LPVOID lpParam);
1499: HWND
1500: WINAPI
1501: CreateWindowExW(
1502: DWORD dwExStyle,
1503: LPCWSTR lpClassName,
1504: LPCWSTR lpWindowName,
1505: DWORD dwStyle,
1506: int X,
1507: int Y,
1508: int nWidth,
1509: int nHeight,
1510: HWND hWndParent ,
1511: HMENU hMenu,
1512: HINSTANCE hInstance,
1513: LPVOID lpParam);
1514: #ifdef UNICODE
1515: #define CreateWindowEx CreateWindowExW
1516: #else
1517: #define CreateWindowEx CreateWindowExA
1518: #endif // !UNICODE
1519:
1520: #define CreateWindowA(lpClassName, lpWindowName, dwStyle, x, y,\
1521: nWidth, nHeight, hwndParent, hMenu, hInstance, lpParam)\
1522: CreateWindowExA(0L, lpClassName, lpWindowName, dwStyle, x, y,\
1523: nWidth, nHeight, hwndParent, hMenu, hInstance, lpParam)
1524: #define CreateWindowW(lpClassName, lpWindowName, dwStyle, x, y,\
1525: nWidth, nHeight, hwndParent, hMenu, hInstance, lpParam)\
1526: CreateWindowExW(0L, lpClassName, lpWindowName, dwStyle, x, y,\
1527: nWidth, nHeight, hwndParent, hMenu, hInstance, lpParam)
1528: #ifdef UNICODE
1529: #define CreateWindow CreateWindowW
1530: #else
1531: #define CreateWindow CreateWindowA
1532: #endif // !UNICODE
1533:
1534: BOOL
1535: WINAPI
1536: IsWindow(
1537: HWND hWnd);
1538:
1539: BOOL
1540: WINAPI
1541: IsChild(
1542: HWND hWndParent,
1543: HWND hWnd);
1544:
1545: BOOL
1546: WINAPI
1547: DestroyWindow(
1548: HWND hWnd);
1549:
1550: BOOL
1551: WINAPI
1552: ShowWindow(
1553: HWND hWnd,
1554: int nCmdShow);
1555:
1556: BOOL
1557: WINAPI
1558: FlashWindow(
1559: HWND hWnd,
1560: BOOL bInvert);
1561:
1562: BOOL
1563: WINAPI
1564: ShowOwnedPopups(
1565: HWND hWnd,
1566: BOOL fShow);
1567:
1568: BOOL
1569: WINAPI
1570: OpenIcon(
1571: HWND hWnd);
1572:
1573: BOOL
1574: WINAPI
1575: CloseWindow(
1576: HWND hWnd);
1577:
1578: BOOL
1579: WINAPI
1580: MoveWindow(
1581: HWND hWnd,
1582: int X,
1583: int Y,
1584: int nWidth,
1585: int nHeight,
1586: BOOL bRepaint);
1587:
1588: BOOL
1589: WINAPI
1590: SetWindowPos(
1591: HWND hWnd,
1592: HWND hWndInsertAfter ,
1593: int X,
1594: int Y,
1595: int cx,
1596: int cy,
1597: UINT uFlags);
1598:
1599: BOOL
1600: WINAPI
1601: GetWindowPlacement(
1602: HWND hwnd,
1603: WINDOWPLACEMENT *lpwndpl);
1604:
1605: BOOL
1606: WINAPI
1607: SetWindowPlacement(
1608: HWND hwnd,
1609: CONST WINDOWPLACEMENT *lpwndpl);
1610:
1611:
1612: #ifndef NODEFERWINDOWPOS
1613:
1614: HDWP
1615: WINAPI
1616: BeginDeferWindowPos(
1617: int nNumWindows);
1618:
1619: HDWP
1620: WINAPI
1621: DeferWindowPos(
1622: HDWP hWinPosInfo,
1623: HWND hWnd,
1624: HWND hWndInsertAfter ,
1625: int x,
1626: int y,
1627: int cx,
1628: int cy,
1629: UINT uFlags);
1630:
1631: BOOL
1632: WINAPI
1633: EndDeferWindowPos(
1634: HDWP hWinPosInfo);
1635:
1636: #endif /* NODEFERWINDOWPOS */
1637:
1638: BOOL
1639: WINAPI
1640: IsWindowVisible(
1641: HWND hWnd);
1642:
1643: BOOL
1644: WINAPI
1645: IsIconic(
1646: HWND hWnd);
1647:
1648: BOOL
1649: WINAPI
1650: AnyPopup(
1651: VOID);
1652:
1653: BOOL
1654: WINAPI
1655: BringWindowToTop(
1656: HWND hWnd);
1657:
1658: BOOL
1659: WINAPI
1660: IsZoomed(
1661: HWND hWnd);
1662:
1663: /* SetWindowPos Flags */
1664: #define SWP_NOSIZE 0x0001
1665: #define SWP_NOMOVE 0x0002
1666: #define SWP_NOZORDER 0x0004
1667: #define SWP_NOREDRAW 0x0008
1668: #define SWP_NOACTIVATE 0x0010
1669: #define SWP_FRAMECHANGED 0x0020 /* The frame changed: send WM_NCCALCSIZE */
1670: #define SWP_SHOWWINDOW 0x0040
1671: #define SWP_HIDEWINDOW 0x0080
1672: #define SWP_NOCOPYBITS 0x0100
1673: #define SWP_NOOWNERZORDER 0x0200 /* Don't do owner Z ordering */
1674:
1675: #define SWP_DRAWFRAME SWP_FRAMECHANGED
1676: #define SWP_NOREPOSITION SWP_NOOWNERZORDER
1677:
1678:
1679: #define HWND_TOP ((HWND)0)
1680: #define HWND_BOTTOM ((HWND)1)
1681: #define HWND_TOPMOST ((HWND)-1)
1682: #define HWND_NOTOPMOST ((HWND)-2)
1683:
1684: #ifndef NOCTLMGR
1685:
1686: #ifndef RC_INVOKED // RC can't handle #pragmas
1687:
1688: /*
1689: * WARNING:
1690: * The following structures must NOT be DWORD padded because they are
1691: * followed by strings, etc that do not have to be DWORD aligned.
1692: */
1693: #pragma pack(2)
1694:
1695: typedef struct {
1696: DWORD style;
1697: DWORD dwExtendedStyle;
1698: WORD cdit;
1699: WORD x;
1700: WORD y;
1701: WORD cx;
1702: WORD cy;
1703: } DLGTEMPLATE;
1704: typedef DLGTEMPLATE *LPDLGTEMPLATEA;
1705: typedef DLGTEMPLATE *LPDLGTEMPLATEW;
1706: #ifdef UNICODE
1707: #define LPDLGTEMPLATE LPDLGTEMPLATEW
1708: #else
1709: #define LPDLGTEMPLATE LPDLGTEMPLATEA
1710: #endif // UNICODE
1711: typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEA;
1712: typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEW;
1713: #ifdef UNICODE
1714: #define LPCDLGTEMPLATE LPCDLGTEMPLATEW
1715: #else
1716: #define LPCDLGTEMPLATE LPCDLGTEMPLATEA
1717: #endif // UNICODE
1718:
1719: /*
1720: * Dialog item template (dit)
1721: */
1722: typedef struct {
1723: DWORD style;
1724: DWORD dwExtendedStyle;
1725: WORD x;
1726: WORD y;
1727: WORD cx;
1728: WORD cy;
1729: WORD id;
1730: } DLGITEMTEMPLATE;
1731: typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEA;
1732: typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEW;
1733: #ifdef UNICODE
1734: #define PDLGITEMTEMPLATE PDLGITEMTEMPLATEW
1735: #else
1736: #define PDLGITEMTEMPLATE PDLGITEMTEMPLATEA
1737: #endif // UNICODE
1738: typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEA;
1739: typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEW;
1740: #ifdef UNICODE
1741: #define LPDLGITEMTEMPLATE LPDLGITEMTEMPLATEW
1742: #else
1743: #define LPDLGITEMTEMPLATE LPDLGITEMTEMPLATEA
1744: #endif // UNICODE
1745:
1746: #pragma pack() // Resume normal packing
1747: #endif // !RC_INVOKED
1748:
1749: HWND
1750: WINAPI
1751: CreateDialogParamA(
1752: HINSTANCE hInstance,
1753: LPCSTR lpTemplateName,
1754: HWND hWndParent ,
1755: DLGPROC lpDialogFunc,
1756: LPARAM dwInitParam);
1757: HWND
1758: WINAPI
1759: CreateDialogParamW(
1760: HINSTANCE hInstance,
1761: LPCWSTR lpTemplateName,
1762: HWND hWndParent ,
1763: DLGPROC lpDialogFunc,
1764: LPARAM dwInitParam);
1765: #ifdef UNICODE
1766: #define CreateDialogParam CreateDialogParamW
1767: #else
1768: #define CreateDialogParam CreateDialogParamA
1769: #endif // !UNICODE
1770:
1771: HWND
1772: WINAPI
1773: CreateDialogIndirectParamA(
1774: HINSTANCE hInstance,
1775: LPCDLGTEMPLATEA lpTemplate,
1776: HWND hwndParent,
1777: DLGPROC lpDialogFunc,
1778: LPARAM dwInitParam);
1779: HWND
1780: WINAPI
1781: CreateDialogIndirectParamW(
1782: HINSTANCE hInstance,
1783: LPCDLGTEMPLATEW lpTemplate,
1784: HWND hwndParent,
1785: DLGPROC lpDialogFunc,
1786: LPARAM dwInitParam);
1787: #ifdef UNICODE
1788: #define CreateDialogIndirectParam CreateDialogIndirectParamW
1789: #else
1790: #define CreateDialogIndirectParam CreateDialogIndirectParamA
1791: #endif // !UNICODE
1792:
1793: #define CreateDialogA(hInstance, lpName, hwndParent, lpDialogFunc) \
1794: CreateDialogParamA(hInstance, lpName, hwndParent, lpDialogFunc, 0L)
1795: #define CreateDialogW(hInstance, lpName, hwndParent, lpDialogFunc) \
1796: CreateDialogParamW(hInstance, lpName, hwndParent, lpDialogFunc, 0L)
1797: #ifdef UNICODE
1798: #define CreateDialog CreateDialogW
1799: #else
1800: #define CreateDialog CreateDialogA
1801: #endif // !UNICODE
1802:
1803: #define CreateDialogIndirectA(hInstance, lpTemplate, hwndParent, lpDialogFunc) \
1804: CreateDialogIndirectParamA(hInstance, lpTemplate, hwndParent, lpDialogFunc, 0L)
1805: #define CreateDialogIndirectW(hInstance, lpTemplate, hwndParent, lpDialogFunc) \
1806: CreateDialogIndirectParamW(hInstance, lpTemplate, hwndParent, lpDialogFunc, 0L)
1807: #ifdef UNICODE
1808: #define CreateDialogIndirect CreateDialogIndirectW
1809: #else
1810: #define CreateDialogIndirect CreateDialogIndirectA
1811: #endif // !UNICODE
1812:
1813: int
1814: WINAPI
1815: DialogBoxParamA(
1816: HINSTANCE hInstance,
1817: LPCSTR lpTemplateName,
1818: HWND hWndParent ,
1819: DLGPROC lpDialogFunc,
1820: LPARAM dwInitParam);
1821: int
1822: WINAPI
1823: DialogBoxParamW(
1824: HINSTANCE hInstance,
1825: LPCWSTR lpTemplateName,
1826: HWND hWndParent ,
1827: DLGPROC lpDialogFunc,
1828: LPARAM dwInitParam);
1829: #ifdef UNICODE
1830: #define DialogBoxParam DialogBoxParamW
1831: #else
1832: #define DialogBoxParam DialogBoxParamA
1833: #endif // !UNICODE
1834:
1835: int
1836: WINAPI
1837: DialogBoxIndirectParamA(
1838: HINSTANCE hInstance,
1839: LPDLGTEMPLATEA hDialogTemplate,
1840: HWND hWndParent ,
1841: DLGPROC lpDialogFunc,
1842: LPARAM dwInitParam);
1843: int
1844: WINAPI
1845: DialogBoxIndirectParamW(
1846: HINSTANCE hInstance,
1847: LPDLGTEMPLATEW hDialogTemplate,
1848: HWND hWndParent ,
1849: DLGPROC lpDialogFunc,
1850: LPARAM dwInitParam);
1851: #ifdef UNICODE
1852: #define DialogBoxIndirectParam DialogBoxIndirectParamW
1853: #else
1854: #define DialogBoxIndirectParam DialogBoxIndirectParamA
1855: #endif // !UNICODE
1856:
1857: #define DialogBoxA(hInstance, lpTemplate, hwndParent, lpDialogFunc) \
1858: DialogBoxParamA(hInstance, lpTemplate, hwndParent, lpDialogFunc, 0L)
1859: #define DialogBoxW(hInstance, lpTemplate, hwndParent, lpDialogFunc) \
1860: DialogBoxParamW(hInstance, lpTemplate, hwndParent, lpDialogFunc, 0L)
1861: #ifdef UNICODE
1862: #define DialogBox DialogBoxW
1863: #else
1864: #define DialogBox DialogBoxA
1865: #endif // !UNICODE
1866:
1867: #define DialogBoxIndirectA(hInstance, lpTemplate, hwndParent, lpDialogFunc) \
1868: DialogBoxIndirectParamA(hInstance, lpTemplate, hwndParent, lpDialogFunc, 0L)
1869: #define DialogBoxIndirectW(hInstance, lpTemplate, hwndParent, lpDialogFunc) \
1870: DialogBoxIndirectParamW(hInstance, lpTemplate, hwndParent, lpDialogFunc, 0L)
1871: #ifdef UNICODE
1872: #define DialogBoxIndirect DialogBoxIndirectW
1873: #else
1874: #define DialogBoxIndirect DialogBoxIndirectA
1875: #endif // !UNICODE
1876:
1877: BOOL
1878: WINAPI
1879: EndDialog(
1880: HWND hDlg,
1881: int nResult);
1882:
1883: HWND
1884: WINAPI
1885: GetDlgItem(
1886: HWND hDlg,
1887: int nIDDlgItem);
1888:
1889: BOOL
1890: WINAPI
1891: SetDlgItemInt(
1892: HWND hDlg,
1893: int nIDDlgItem,
1894: UINT uValue,
1895: BOOL bSigned);
1896:
1897: UINT
1898: WINAPI
1899: GetDlgItemInt(
1900: HWND hDlg,
1901: int nIDDlgItem,
1902: BOOL *lpTranslated,
1903: BOOL bSigned);
1904:
1905: BOOL
1906: WINAPI
1907: SetDlgItemTextA(
1908: HWND hDlg,
1909: int nIDDlgItem,
1910: LPCSTR lpString);
1911: BOOL
1912: WINAPI
1913: SetDlgItemTextW(
1914: HWND hDlg,
1915: int nIDDlgItem,
1916: LPCWSTR lpString);
1917: #ifdef UNICODE
1918: #define SetDlgItemText SetDlgItemTextW
1919: #else
1920: #define SetDlgItemText SetDlgItemTextA
1921: #endif // !UNICODE
1922:
1923: UINT
1924: WINAPI
1925: GetDlgItemTextA(
1926: HWND hDlg,
1927: int nIDDlgItem,
1928: LPSTR lpString,
1929: int nMaxCount);
1930: UINT
1931: WINAPI
1932: GetDlgItemTextW(
1933: HWND hDlg,
1934: int nIDDlgItem,
1935: LPWSTR lpString,
1936: int nMaxCount);
1937: #ifdef UNICODE
1938: #define GetDlgItemText GetDlgItemTextW
1939: #else
1940: #define GetDlgItemText GetDlgItemTextA
1941: #endif // !UNICODE
1942:
1943: BOOL
1944: WINAPI
1945: CheckDlgButton(
1946: HWND hDlg,
1947: int nIDButton,
1948: UINT uCheck);
1949:
1950: BOOL
1951: WINAPI
1952: CheckRadioButton(
1953: HWND hDlg,
1954: int nIDFirstButton,
1955: int nIDLastButton,
1956: int nIDCheckButton);
1957:
1958: UINT
1959: WINAPI
1960: IsDlgButtonChecked(
1961: HWND hDlg,
1962: int nIDButton);
1963:
1964: LONG
1965: WINAPI
1966: SendDlgItemMessageA(
1967: HWND hDlg,
1968: int nIDDlgItem,
1969: UINT Msg,
1970: WPARAM wParam,
1971: LPARAM lParam);
1972: LONG
1973: WINAPI
1974: SendDlgItemMessageW(
1975: HWND hDlg,
1976: int nIDDlgItem,
1977: UINT Msg,
1978: WPARAM wParam,
1979: LPARAM lParam);
1980: #ifdef UNICODE
1981: #define SendDlgItemMessage SendDlgItemMessageW
1982: #else
1983: #define SendDlgItemMessage SendDlgItemMessageA
1984: #endif // !UNICODE
1985:
1986: HWND
1987: WINAPI
1988: GetNextDlgGroupItem(
1989: HWND hDlg,
1990: HWND hCtl,
1991: BOOL bPrevious);
1992:
1993: HWND
1994: WINAPI
1995: GetNextDlgTabItem(
1996: HWND hDlg,
1997: HWND hCtl,
1998: BOOL bPrevious);
1999:
2000: int
2001: WINAPI
2002: GetDlgCtrlID(
2003: HWND hWnd);
2004:
2005: long
2006: WINAPI
2007: GetDialogBaseUnits(VOID);
2008:
2009: LRESULT
2010: WINAPI
2011: DefDlgProcA(
2012: HWND hDlg,
2013: UINT Msg,
2014: WPARAM wParam,
2015: LPARAM lParam);
2016: LRESULT
2017: WINAPI
2018: DefDlgProcW(
2019: HWND hDlg,
2020: UINT Msg,
2021: WPARAM wParam,
2022: LPARAM lParam);
2023: #ifdef UNICODE
2024: #define DefDlgProc DefDlgProcW
2025: #else
2026: #define DefDlgProc DefDlgProcA
2027: #endif // !UNICODE
2028:
2029: /*
2030: * Window extra byted needed for private dialog classes.
2031: */
2032: #define DLGWINDOWEXTRA 30
2033:
2034: #endif /* NOCTLMGR */
2035:
2036: #ifndef NOMSG
2037: BOOL
2038: WINAPI
2039: CallMsgFilter(
2040: LPMSG lpMsg,
2041: int nCode);
2042: #endif
2043:
2044: #ifndef NOCLIPBOARD
2045:
2046: /* Clipboard Manager Functions */
2047: BOOL
2048: WINAPI
2049: OpenClipboard(
2050: HWND hWnd);
2051:
2052: BOOL
2053: WINAPI
2054: CloseClipboard(
2055: VOID);
2056:
2057: HWND
2058: WINAPI
2059: GetClipboardOwner(
2060: VOID);
2061:
2062: HWND
2063: WINAPI
2064: SetClipboardViewer(
2065: HWND );
2066:
2067: HWND
2068: WINAPI
2069: GetClipboardViewer(VOID);
2070:
2071: BOOL
2072: WINAPI
2073: ChangeClipboardChain(
2074: HWND,
2075: HWND);
2076:
2077: HANDLE
2078: WINAPI
2079: SetClipboardData(
2080: UINT uFormat,
2081: HANDLE hMem);
2082:
2083: HANDLE
2084: WINAPI
2085: GetClipboardData(
2086: UINT uFormat);
2087:
2088: UINT
2089: WINAPI
2090: RegisterClipboardFormatA(
2091: LPCSTR);
2092: UINT
2093: WINAPI
2094: RegisterClipboardFormatW(
2095: LPCWSTR);
2096: #ifdef UNICODE
2097: #define RegisterClipboardFormat RegisterClipboardFormatW
2098: #else
2099: #define RegisterClipboardFormat RegisterClipboardFormatA
2100: #endif // !UNICODE
2101:
2102: int
2103: WINAPI
2104: CountClipboardFormats(
2105: VOID);
2106:
2107: UINT
2108: WINAPI
2109: EnumClipboardFormats(
2110: UINT);
2111:
2112: int
2113: WINAPI
2114: GetClipboardFormatNameA(
2115: UINT,
2116: LPSTR,
2117: int);
2118: int
2119: WINAPI
2120: GetClipboardFormatNameW(
2121: UINT,
2122: LPWSTR,
2123: int);
2124: #ifdef UNICODE
2125: #define GetClipboardFormatName GetClipboardFormatNameW
2126: #else
2127: #define GetClipboardFormatName GetClipboardFormatNameA
2128: #endif // !UNICODE
2129:
2130: BOOL
2131: WINAPI
2132: EmptyClipboard(
2133: VOID);
2134:
2135: BOOL
2136: WINAPI
2137: IsClipboardFormatAvailable(
2138: UINT);
2139:
2140: int
2141: WINAPI
2142: GetPriorityClipboardFormat(
2143: UINT *,
2144: int);
2145:
2146: HWND
2147: WINAPI
2148: GetOpenClipboardWindow(
2149: VOID);
2150:
2151: #endif /* NOCLIPBOARD */
2152:
2153: /* Character Translation Routines */
2154:
2155: BOOL
2156: WINAPI
2157: CharToOemA(
2158: LPCSTR,
2159: LPSTR);
2160: BOOL
2161: WINAPI
2162: CharToOemW(
2163: LPCWSTR,
2164: LPSTR);
2165: #ifdef UNICODE
2166: #define CharToOem CharToOemW
2167: #else
2168: #define CharToOem CharToOemA
2169: #endif // !UNICODE
2170:
2171: BOOL
2172: WINAPI
2173: OemToCharA(
2174: LPCSTR,
2175: LPSTR);
2176: BOOL
2177: WINAPI
2178: OemToCharW(
2179: LPCSTR,
2180: LPWSTR);
2181: #ifdef UNICODE
2182: #define OemToChar OemToCharW
2183: #else
2184: #define OemToChar OemToCharA
2185: #endif // !UNICODE
2186:
2187: BOOL
2188: WINAPI
2189: CharToOemBuffA(
2190: LPCSTR,
2191: LPSTR,
2192: DWORD);
2193: BOOL
2194: WINAPI
2195: CharToOemBuffW(
2196: LPCWSTR,
2197: LPSTR,
2198: DWORD);
2199: #ifdef UNICODE
2200: #define CharToOemBuff CharToOemBuffW
2201: #else
2202: #define CharToOemBuff CharToOemBuffA
2203: #endif // !UNICODE
2204:
2205: BOOL
2206: WINAPI
2207: OemToCharBuffA(
2208: LPCSTR,
2209: LPSTR,
2210: DWORD);
2211: BOOL
2212: WINAPI
2213: OemToCharBuffW(
2214: LPCSTR,
2215: LPWSTR,
2216: DWORD);
2217: #ifdef UNICODE
2218: #define OemToCharBuff OemToCharBuffW
2219: #else
2220: #define OemToCharBuff OemToCharBuffA
2221: #endif // !UNICODE
2222:
2223: LPSTR
2224: WINAPI
2225: CharUpperA(
2226: LPSTR);
2227: LPWSTR
2228: WINAPI
2229: CharUpperW(
2230: LPWSTR);
2231: #ifdef UNICODE
2232: #define CharUpper CharUpperW
2233: #else
2234: #define CharUpper CharUpperA
2235: #endif // !UNICODE
2236:
2237: DWORD
2238: WINAPI
2239: CharUpperBuffA(
2240: LPSTR,
2241: DWORD);
2242: DWORD
2243: WINAPI
2244: CharUpperBuffW(
2245: LPWSTR,
2246: DWORD);
2247: #ifdef UNICODE
2248: #define CharUpperBuff CharUpperBuffW
2249: #else
2250: #define CharUpperBuff CharUpperBuffA
2251: #endif // !UNICODE
2252:
2253: LPSTR
2254: WINAPI
2255: CharLowerA(
2256: LPSTR);
2257: LPWSTR
2258: WINAPI
2259: CharLowerW(
2260: LPWSTR);
2261: #ifdef UNICODE
2262: #define CharLower CharLowerW
2263: #else
2264: #define CharLower CharLowerA
2265: #endif // !UNICODE
2266:
2267: DWORD
2268: WINAPI
2269: CharLowerBuffA(
2270: LPSTR,
2271: DWORD);
2272: DWORD
2273: WINAPI
2274: CharLowerBuffW(
2275: LPWSTR,
2276: DWORD);
2277: #ifdef UNICODE
2278: #define CharLowerBuff CharLowerBuffW
2279: #else
2280: #define CharLowerBuff CharLowerBuffA
2281: #endif // !UNICODE
2282:
2283: LPSTR
2284: WINAPI
2285: CharNextA(
2286: LPCSTR);
2287: LPWSTR
2288: WINAPI
2289: CharNextW(
2290: LPCWSTR);
2291: #ifdef UNICODE
2292: #define CharNext CharNextW
2293: #else
2294: #define CharNext CharNextA
2295: #endif // !UNICODE
2296:
2297: LPSTR
2298: WINAPI
2299: CharPrevA(
2300: LPCSTR,
2301: LPCSTR);
2302: LPWSTR
2303: WINAPI
2304: CharPrevW(
2305: LPCWSTR,
2306: LPCWSTR);
2307: #ifdef UNICODE
2308: #define CharPrev CharPrevW
2309: #else
2310: #define CharPrev CharPrevA
2311: #endif // !UNICODE
2312:
2313: /* Compatibility defines for character translation routines */
2314: #define AnsiToOem CharToOemA
2315: #define OemToAnsi OemToCharA
2316: #define AnsiToOemBuff CharToOemBuffA
2317: #define OemToAnsiBuff OemToCharBuffA
2318: #define AnsiUpper CharUpperA
2319: #define AnsiUpperBuff CharUpperBuffA
2320: #define AnsiLower CharLowerA
2321: #define AnsiLowerBuff CharLowerBuffA
2322: #define AnsiNext CharNextA
2323: #define AnsiPrev CharPrevA
2324:
2325: #ifndef NOLANGUAGE
2326: /* Language dependent Routines */
2327:
2328: BOOL
2329: WINAPI
2330: IsCharAlphaA(
2331: CHAR);
2332: BOOL
2333: WINAPI
2334: IsCharAlphaW(
2335: WCHAR);
2336: #ifdef UNICODE
2337: #define IsCharAlpha IsCharAlphaW
2338: #else
2339: #define IsCharAlpha IsCharAlphaA
2340: #endif // !UNICODE
2341:
2342: BOOL
2343: WINAPI
2344: IsCharAlphaNumericA(
2345: CHAR);
2346: BOOL
2347: WINAPI
2348: IsCharAlphaNumericW(
2349: WCHAR);
2350: #ifdef UNICODE
2351: #define IsCharAlphaNumeric IsCharAlphaNumericW
2352: #else
2353: #define IsCharAlphaNumeric IsCharAlphaNumericA
2354: #endif // !UNICODE
2355:
2356: BOOL
2357: WINAPI
2358: IsCharUpperA(
2359: CHAR);
2360: BOOL
2361: WINAPI
2362: IsCharUpperW(
2363: WCHAR);
2364: #ifdef UNICODE
2365: #define IsCharUpper IsCharUpperW
2366: #else
2367: #define IsCharUpper IsCharUpperA
2368: #endif // !UNICODE
2369:
2370: BOOL
2371: WINAPI
2372: IsCharLowerA(
2373: CHAR);
2374: BOOL
2375: WINAPI
2376: IsCharLowerW(
2377: WCHAR);
2378: #ifdef UNICODE
2379: #define IsCharLower IsCharLowerW
2380: #else
2381: #define IsCharLower IsCharLowerA
2382: #endif // !UNICODE
2383:
2384: #endif
2385:
2386: HWND
2387: WINAPI
2388: SetFocus(
2389: HWND hWnd);
2390:
2391: HWND
2392: WINAPI
2393: GetActiveWindow(
2394: VOID);
2395:
2396: HWND
2397: WINAPI
2398: GetFocus(
2399: VOID);
2400:
2401: UINT
2402: WINAPI
2403: GetKBCodePage(
2404: VOID);
2405:
2406: SHORT
2407: WINAPI
2408: GetKeyState(
2409: int nVirtKey);
2410:
2411: SHORT
2412: WINAPI
2413: GetAsyncKeyState(
2414: int vKey);
2415:
2416: BOOL
2417: WINAPI
2418: GetKeyboardState(
2419: PBYTE lpKeyState);
2420:
2421: BOOL
2422: WINAPI
2423: SetKeyboardState(
2424: LPBYTE lpKeyState);
2425:
2426: int
2427: WINAPI
2428: GetKeyNameTextA(
2429: LONG lParam,
2430: LPSTR lpString,
2431: int nSize
2432: );
2433: int
2434: WINAPI
2435: GetKeyNameTextW(
2436: LONG lParam,
2437: LPWSTR lpString,
2438: int nSize
2439: );
2440: #ifdef UNICODE
2441: #define GetKeyNameText GetKeyNameTextW
2442: #else
2443: #define GetKeyNameText GetKeyNameTextA
2444: #endif // !UNICODE
2445:
2446: int
2447: WINAPI
2448: GetKeyboardType(
2449: int nTypeFlag);
2450:
2451: int
2452: WINAPI
2453: ToAscii(
2454: UINT uVirtKey,
2455: UINT uScanCode,
2456: PBYTE lpKeyState,
2457: LPWORD lpChar,
2458: UINT uFlags);
2459:
2460: int
2461: WINAPI
2462: ToUnicode(
2463: UINT wVirtKey,
2464: UINT wScanCode,
2465: PBYTE lpKeyState,
2466: LPDWORD lpChar,
2467: UINT wFlags);
2468:
2469: SHORT
2470: WINAPI
2471: VkKeyScanA(
2472: CHAR cChar);
2473: SHORT
2474: WINAPI
2475: VkKeyScanW(
2476: WCHAR cChar);
2477: #ifdef UNICODE
2478: #define VkKeyScan VkKeyScanW
2479: #else
2480: #define VkKeyScan VkKeyScanA
2481: #endif // !UNICODE
2482:
2483: UINT
2484: WINAPI
2485: MapVirtualKey(
2486: UINT uCode,
2487: UINT uMapType);
2488:
2489: BOOL
2490: WINAPI
2491: GetInputState(
2492: VOID);
2493:
2494: DWORD
2495: WINAPI
2496: GetQueueStatus(
2497: UINT flags);
2498:
2499: HWND
2500: WINAPI
2501: GetCapture(VOID);
2502:
2503: HWND
2504: WINAPI
2505: SetCapture(
2506: HWND hWnd);
2507:
2508: BOOL
2509: WINAPI
2510: ReleaseCapture(
2511: VOID);
2512:
2513: DWORD
2514: WINAPI
2515: MsgWaitForMultipleObjects(
2516: DWORD nCount,
2517: LPHANDLE pHandles,
2518: BOOL fWaitAll,
2519: DWORD dwMilliseconds,
2520: DWORD dwWakeMask);
2521:
2522: /* Queue status flags for GetQueueStatus() and MsgWaitForMultipleObjects() */
2523: #define QS_KEY 0x01
2524: #define QS_MOUSEMOVE 0x02
2525: #define QS_MOUSEBUTTON 0x04
2526: #define QS_MOUSE (QS_MOUSEMOVE | QS_MOUSEBUTTON)
2527: #define QS_POSTMESSAGE 0x08
2528: #define QS_TIMER 0x10
2529: #define QS_PAINT 0x20
2530: #define QS_SENDMESSAGE 0x40
2531: #define QS_HOTKEY 0x80
2532: #define QS_INPUT (QS_MOUSE | QS_KEY)
2533: #define QS_ALLEVENTS (QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY)
2534:
2535:
2536: UINT
2537: WINAPI
2538: GetSysInputMode(
2539: VOID);
2540:
2541: /* GetSysInputMode return values */
2542: #define IMD_NONE 0
2543: #define IMD_MENU 1
2544: #define IMD_DIALOGBOX 2
2545: #define IMD_NEXTWINDOW 3
2546: #define IMD_SCROLLBAR 4
2547: #define IMD_TITLEBUTTONTRACK 5
2548: #define IMD_MOVESIZETRACK 6
2549: #define IMD_SYSERRDLG 7
2550: #define IMD_DRAGOBJECT 8
2551: #define IMD_DRAGDETECT 9
2552:
2553:
2554: /* Windows Functions */
2555: UINT
2556: WINAPI
2557: SetTimer(
2558: HWND hwnd ,
2559: UINT nIDEvent,
2560: UINT uElapse,
2561: TIMERPROC lpTimerFunc);
2562:
2563: BOOL
2564: WINAPI
2565: KillTimer(
2566: HWND hWnd,
2567: UINT uIDEvent);
2568:
2569: BOOL
2570: WINAPI
2571: IsWindowUnicode(
2572: HWND hWnd);
2573:
2574: BOOL
2575: WINAPI
2576: EnableWindow(
2577: HWND hWnd,
2578: BOOL bEnable);
2579:
2580: BOOL
2581: WINAPI
2582: IsWindowEnabled(
2583: HWND hWnd);
2584:
2585: HACCEL
2586: WINAPI
2587: LoadAcceleratorsA(
2588: HINSTANCE hInstance,
2589: LPCSTR lpTableName);
2590: HACCEL
2591: WINAPI
2592: LoadAcceleratorsW(
2593: HINSTANCE hInstance,
2594: LPCWSTR lpTableName);
2595: #ifdef UNICODE
2596: #define LoadAccelerators LoadAcceleratorsW
2597: #else
2598: #define LoadAccelerators LoadAcceleratorsA
2599: #endif // !UNICODE
2600:
2601: HACCEL
2602: WINAPI
2603: CreateAcceleratorTable(
2604: LPACCEL, int);
2605:
2606: BOOL
2607: WINAPI
2608: DestroyAcceleratorTable(
2609: HACCEL);
2610:
2611: int
2612: WINAPI
2613: CopyAcceleratorTable(
2614: HACCEL,
2615: LPACCEL ,
2616: int);
2617:
2618: #ifndef NOMSG
2619: int
2620: WINAPI
2621: TranslateAccelerator(
2622: HWND hWnd,
2623: HACCEL hAccTable,
2624: LPMSG lpMsg);
2625: #endif
2626:
2627: #ifndef NOSYSMETRICS
2628:
2629: /* GetSystemMetrics() codes */
2630: #define SM_CXSCREEN 0
2631: #define SM_CYSCREEN 1
2632: #define SM_CXVSCROLL 2
2633: #define SM_CYHSCROLL 3
2634: #define SM_CYCAPTION 4
2635: #define SM_CXBORDER 5
2636: #define SM_CYBORDER 6
2637: #define SM_CXDLGFRAME 7
2638: #define SM_CYDLGFRAME 8
2639: #define SM_CYVTHUMB 9
2640: #define SM_CXHTHUMB 10
2641: #define SM_CXICON 11
2642: #define SM_CYICON 12
2643: #define SM_CXCURSOR 13
2644: #define SM_CYCURSOR 14
2645: #define SM_CYMENU 15
2646: #define SM_CXFULLSCREEN 16
2647: #define SM_CYFULLSCREEN 17
2648: #define SM_CYKANJIWINDOW 18
2649: #define SM_MOUSEPRESENT 19
2650: #define SM_CYVSCROLL 20
2651: #define SM_CXHSCROLL 21
2652: #define SM_DEBUG 22
2653: #define SM_SWAPBUTTON 23
2654: #define SM_RESERVED1 24
2655: #define SM_RESERVED2 25
2656: #define SM_RESERVED3 26
2657: #define SM_RESERVED4 27
2658: #define SM_CXMIN 28
2659: #define SM_CYMIN 29
2660: #define SM_CXSIZE 30
2661: #define SM_CYSIZE 31
2662: #define SM_CXFRAME 32
2663: #define SM_CYFRAME 33
2664: #define SM_CXMINTRACK 34
2665: #define SM_CYMINTRACK 35
2666: #define SM_CXDOUBLECLK 36
2667: #define SM_CYDOUBLECLK 37
2668: #define SM_CXICONSPACING 38
2669: #define SM_CYICONSPACING 39
2670: #define SM_MENUDROPALIGNMENT 40
2671: #define SM_PENWINDOWS 41
2672: #define SM_DBCSENABLED 42
2673: #define SM_CMOUSEBUTTONS 43
2674: #define SM_MAX 43
2675: #define SM_CMETRICS 44
2676:
2677: int
2678: WINAPI
2679: GetSystemMetrics(
2680: int nIndex);
2681:
2682: #endif /* NOSYSMETRICS */
2683:
2684: #ifndef NOMENUS
2685:
2686: HMENU
2687: WINAPI
2688: LoadMenuA(
2689: HINSTANCE hInstance,
2690: LPCSTR lpMenuName);
2691: HMENU
2692: WINAPI
2693: LoadMenuW(
2694: HINSTANCE hInstance,
2695: LPCWSTR lpMenuName);
2696: #ifdef UNICODE
2697: #define LoadMenu LoadMenuW
2698: #else
2699: #define LoadMenu LoadMenuA
2700: #endif // !UNICODE
2701:
2702: HMENU
2703: WINAPI
2704: LoadMenuIndirectA(
2705: LPMENUTEMPLATEA lpMenuTemplate);
2706: HMENU
2707: WINAPI
2708: LoadMenuIndirectW(
2709: LPMENUTEMPLATEW lpMenuTemplate);
2710: #ifdef UNICODE
2711: #define LoadMenuIndirect LoadMenuIndirectW
2712: #else
2713: #define LoadMenuIndirect LoadMenuIndirectA
2714: #endif // !UNICODE
2715:
2716: HMENU
2717: WINAPI
2718: GetMenu(
2719: HWND hWnd);
2720:
2721: BOOL
2722: WINAPI
2723: SetMenu(
2724: HWND hWnd,
2725: HMENU hMenu);
2726:
2727: BOOL
2728: WINAPI
2729: ChangeMenuA(
2730: HMENU,
2731: UINT,
2732: LPCTSTR,
2733: UINT,
2734: UINT);
2735: BOOL
2736: WINAPI
2737: ChangeMenuW(
2738: HMENU,
2739: UINT,
2740: LPCTSTR,
2741: UINT,
2742: UINT);
2743: #ifdef UNICODE
2744: #define ChangeMenu ChangeMenuW
2745: #else
2746: #define ChangeMenu ChangeMenuA
2747: #endif // !UNICODE
2748:
2749: BOOL
2750: WINAPI
2751: HiliteMenuItem(
2752: HWND hWnd,
2753: HMENU hMenu,
2754: UINT uIDHiliteItem,
2755: UINT uHilite);
2756:
2757: int
2758: WINAPI
2759: GetMenuStringA(
2760: HMENU hMenu,
2761: UINT uIDItem,
2762: LPSTR lpString,
2763: int nMaxCount,
2764: UINT uFlag);
2765: int
2766: WINAPI
2767: GetMenuStringW(
2768: HMENU hMenu,
2769: UINT uIDItem,
2770: LPWSTR lpString,
2771: int nMaxCount,
2772: UINT uFlag);
2773: #ifdef UNICODE
2774: #define GetMenuString GetMenuStringW
2775: #else
2776: #define GetMenuString GetMenuStringA
2777: #endif // !UNICODE
2778:
2779: UINT
2780: WINAPI
2781: GetMenuState(
2782: HMENU hMenu,
2783: UINT uId,
2784: UINT uFlags);
2785:
2786: BOOL
2787: WINAPI
2788: DrawMenuBar(
2789: HWND hWnd);
2790:
2791: HMENU
2792: WINAPI
2793: GetSystemMenu(
2794: HWND hWnd,
2795: BOOL bRevert);
2796:
2797: HMENU
2798: WINAPI
2799: CreateMenu(
2800: VOID);
2801:
2802: HMENU
2803: WINAPI
2804: CreatePopupMenu(
2805: VOID);
2806:
2807: BOOL
2808: WINAPI
2809: DestroyMenu(
2810: HMENU hMenu);
2811:
2812: DWORD
2813: WINAPI
2814: CheckMenuItem(
2815: HMENU hMenu,
2816: UINT uIDCheckItem,
2817: UINT uCheck);
2818:
2819: BOOL
2820: WINAPI
2821: EnableMenuItem(
2822: HMENU hMenu,
2823: UINT uIDEnableItem,
2824: UINT uEnable);
2825:
2826: HMENU
2827: WINAPI
2828: GetSubMenu(
2829: HMENU hMenu,
2830: int nPos);
2831:
2832: UINT
2833: WINAPI
2834: GetMenuItemID(
2835: HMENU hMenu,
2836: int nPos);
2837:
2838: int
2839: WINAPI
2840: GetMenuItemCount(
2841: HMENU hMenu);
2842:
2843: BOOL
2844: WINAPI
2845: InsertMenuA(
2846: HMENU hMenu,
2847: UINT uPosition,
2848: UINT uFlags,
2849: UINT uIDNewItem,
2850: LPCSTR lpNewItem
2851: );
2852: BOOL
2853: WINAPI
2854: InsertMenuW(
2855: HMENU hMenu,
2856: UINT uPosition,
2857: UINT uFlags,
2858: UINT uIDNewItem,
2859: LPCWSTR lpNewItem
2860: );
2861: #ifdef UNICODE
2862: #define InsertMenu InsertMenuW
2863: #else
2864: #define InsertMenu InsertMenuA
2865: #endif // !UNICODE
2866:
2867: BOOL
2868: WINAPI
2869: AppendMenuA(
2870: HMENU hMenu,
2871: UINT uFlags,
2872: UINT uIDNewItem,
2873: LPCSTR lpNewItem
2874: );
2875: BOOL
2876: WINAPI
2877: AppendMenuW(
2878: HMENU hMenu,
2879: UINT uFlags,
2880: UINT uIDNewItem,
2881: LPCWSTR lpNewItem
2882: );
2883: #ifdef UNICODE
2884: #define AppendMenu AppendMenuW
2885: #else
2886: #define AppendMenu AppendMenuA
2887: #endif // !UNICODE
2888:
2889: BOOL
2890: WINAPI
2891: ModifyMenuA(
2892: HMENU hMnu,
2893: UINT uPosition,
2894: UINT uFlags,
2895: UINT uIDNewItem,
2896: LPCSTR lpNewItem
2897: );
2898: BOOL
2899: WINAPI
2900: ModifyMenuW(
2901: HMENU hMnu,
2902: UINT uPosition,
2903: UINT uFlags,
2904: UINT uIDNewItem,
2905: LPCWSTR lpNewItem
2906: );
2907: #ifdef UNICODE
2908: #define ModifyMenu ModifyMenuW
2909: #else
2910: #define ModifyMenu ModifyMenuA
2911: #endif // !UNICODE
2912:
2913: BOOL
2914: WINAPI RemoveMenu(
2915: HMENU hMenu,
2916: UINT uPosition,
2917: UINT uFlags);
2918:
2919: BOOL
2920: WINAPI
2921: DeleteMenu(
2922: HMENU hMenu,
2923: UINT uPosition,
2924: UINT uFlags);
2925:
2926: BOOL
2927: WINAPI
2928: SetMenuItemBitmaps(
2929: HMENU hMenu,
2930: UINT uPosition,
2931: UINT uFlags,
2932: HBITMAP hBitmapUnchecked,
2933: HBITMAP hBitmapChecked);
2934:
2935: LONG
2936: WINAPI
2937: GetMenuCheckMarkDimensions(
2938: VOID);
2939:
2940: BOOL
2941: WINAPI
2942: TrackPopupMenu(
2943: HMENU hMenu,
2944: UINT uFlags,
2945: int x,
2946: int y,
2947: int nReserved,
2948: HWND hWnd,
2949: CONST RECT *prcRect);
2950:
2951: /* Flags for TrackPopupMenu */
2952: #define TPM_LEFTBUTTON 0x0000L
2953: #define TPM_RIGHTBUTTON 0x0002L
2954: #define TPM_LEFTALIGN 0x0000L
2955: #define TPM_CENTERALIGN 0x0004L
2956: #define TPM_RIGHTALIGN 0x0008L
2957:
2958: #endif /* NOMENUS */
2959:
2960: BOOL
2961: WINAPI
2962: DrawIcon(
2963: HDC,
2964: int,
2965: int,
2966: HICON);
2967:
2968: #ifndef NODRAWTEXT
2969:
2970: /* DrawText() Format Flags */
2971: #define DT_TOP 0x0000
2972: #define DT_LEFT 0x0000
2973: #define DT_CENTER 0x0001
2974: #define DT_RIGHT 0x0002
2975: #define DT_VCENTER 0x0004
2976: #define DT_BOTTOM 0x0008
2977: #define DT_WORDBREAK 0x0010
2978: #define DT_SINGLELINE 0x0020
2979: #define DT_EXPANDTABS 0x0040
2980: #define DT_TABSTOP 0x0080
2981: #define DT_NOCLIP 0x0100
2982: #define DT_EXTERNALLEADING 0x0200
2983: #define DT_CALCRECT 0x0400
2984: #define DT_NOPREFIX 0x0800
2985: #define DT_INTERNAL 0x1000
2986:
2987: #endif /* NODRAWTEXT */
2988:
2989: int
2990: WINAPI DrawTextA(
2991: HDC hDC,
2992: LPCSTR lpString,
2993: int nCount,
2994: LPRECT lpRect,
2995: UINT uFormat);
2996: int
2997: WINAPI DrawTextW(
2998: HDC hDC,
2999: LPCWSTR lpString,
3000: int nCount,
3001: LPRECT lpRect,
3002: UINT uFormat);
3003: #ifdef UNICODE
3004: #define DrawText DrawTextW
3005: #else
3006: #define DrawText DrawTextA
3007: #endif // !UNICODE
3008:
3009: BOOL
3010: WINAPI
3011: GrayStringA(
3012: HDC hDC,
3013: HBRUSH hBrush,
3014: GRAYSTRINGPROC lpOutputFunc,
3015: LPARAM lpData,
3016: int nCount,
3017: int X,
3018: int Y,
3019: int nWidth,
3020: int nHeight);
3021: BOOL
3022: WINAPI
3023: GrayStringW(
3024: HDC hDC,
3025: HBRUSH hBrush,
3026: GRAYSTRINGPROC lpOutputFunc,
3027: LPARAM lpData,
3028: int nCount,
3029: int X,
3030: int Y,
3031: int nWidth,
3032: int nHeight);
3033: #ifdef UNICODE
3034: #define GrayString GrayStringW
3035: #else
3036: #define GrayString GrayStringA
3037: #endif // !UNICODE
3038:
3039: LONG
3040: WINAPI
3041: TabbedTextOutA(
3042: HDC hDC,
3043: int X,
3044: int Y,
3045: LPCSTR lpString,
3046: int nCount,
3047: int nTabPositions,
3048: LPINT lpnTabStopPositions,
3049: int nTabOrigin);
3050: LONG
3051: WINAPI
3052: TabbedTextOutW(
3053: HDC hDC,
3054: int X,
3055: int Y,
3056: LPCWSTR lpString,
3057: int nCount,
3058: int nTabPositions,
3059: LPINT lpnTabStopPositions,
3060: int nTabOrigin);
3061: #ifdef UNICODE
3062: #define TabbedTextOut TabbedTextOutW
3063: #else
3064: #define TabbedTextOut TabbedTextOutA
3065: #endif // !UNICODE
3066:
3067: DWORD
3068: WINAPI
3069: GetTabbedTextExtentA(
3070: HDC hDC,
3071: LPCSTR lpString,
3072: int nCount,
3073: int nTabPositions,
3074: LPINT lpnTabStopPositions);
3075: DWORD
3076: WINAPI
3077: GetTabbedTextExtentW(
3078: HDC hDC,
3079: LPCWSTR lpString,
3080: int nCount,
3081: int nTabPositions,
3082: LPINT lpnTabStopPositions);
3083: #ifdef UNICODE
3084: #define GetTabbedTextExtent GetTabbedTextExtentW
3085: #else
3086: #define GetTabbedTextExtent GetTabbedTextExtentA
3087: #endif // !UNICODE
3088:
3089: BOOL
3090: WINAPI
3091: UpdateWindow(
3092: HWND hWnd);
3093:
3094: HWND
3095: WINAPI
3096: SetActiveWindow(
3097: HWND hWnd );
3098:
3099: HWND
3100: WINAPI
3101: GetForegroundWindow(
3102: VOID);
3103:
3104: BOOL
3105: WINAPI
3106: SetForegroundWindow(
3107: HWND hWnd);
3108:
3109: HWND
3110: WINAPI
3111: WindowFromDC(
3112: HDC hdc);
3113:
3114: HDC
3115: WINAPI
3116: GetDC(
3117: HWND hWnd );
3118:
3119: HDC
3120: WINAPI
3121: GetDCEx(
3122: HWND hwnd ,
3123: HRGN hrgnClip,
3124: DWORD flags);
3125:
3126: /* GetDCEx() flags */
3127: #define DCX_WINDOW 0x00000001L
3128: #define DCX_CACHE 0x00000002L
3129: #define DCX_NORESETATTRS 0x00000004L
3130: #define DCX_CLIPCHILDREN 0x00000008L
3131: #define DCX_CLIPSIBLINGS 0x00000010L
3132: #define DCX_PARENTCLIP 0x00000020L
3133:
3134: #define DCX_EXCLUDERGN 0x00000040L
3135: #define DCX_INTERSECTRGN 0x00000080L
3136:
3137: #define DCX_EXCLUDEUPDATE 0x00000100L
3138: #define DCX_INTERSECTUPDATE 0x00000200L
3139:
3140: #define DCX_LOCKWINDOWUPDATE 0x00000400L
3141:
3142:
3143: #define DCX_USESTYLE 0x00010000L
3144: #define DCX_NORECOMPUTE 0x00100000L
3145: #define DCX_VALIDATE 0x00200000L
3146:
3147:
3148: HDC
3149: WINAPI
3150: GetWindowDC(
3151: HWND hWnd );
3152:
3153: int
3154: WINAPI
3155: ReleaseDC(
3156: HWND hWnd,
3157: HDC hDC);
3158:
3159: HDC
3160: WINAPI
3161: BeginPaint(
3162: HWND hWnd,
3163: LPPAINTSTRUCT lpPaint);
3164:
3165: BOOL
3166: WINAPI
3167: EndPaint(
3168: HWND hWnd,
3169: LPPAINTSTRUCT lpPaint);
3170:
3171: BOOL
3172: WINAPI
3173: GetUpdateRect(
3174: HWND hWnd,
3175: LPRECT lpRect,
3176: BOOL bErase);
3177:
3178: int
3179: WINAPI
3180: GetUpdateRgn(
3181: HWND hWnd,
3182: HRGN hRgn,
3183: BOOL bErase);
3184:
3185: int
3186: WINAPI
3187: ExcludeUpdateRgn(
3188: HDC hDC,
3189: HWND hWnd);
3190:
3191: BOOL
3192: WINAPI
3193: InvalidateRect(
3194: HWND hWnd ,
3195: CONST RECT *lpRect,
3196: BOOL bErase);
3197:
3198: BOOL
3199: WINAPI
3200: ValidateRect(
3201: HWND hWnd ,
3202: CONST RECT *lpRect);
3203:
3204: BOOL
3205: WINAPI
3206: InvalidateRgn(
3207: HWND hWnd,
3208: HRGN hRgn,
3209: BOOL bErase);
3210:
3211: BOOL
3212: WINAPI
3213: ValidateRgn(
3214: HWND hWnd,
3215: HRGN hRgn);
3216:
3217:
3218: BOOL WINAPI RedrawWindow(
3219: HWND hwnd,
3220: CONST RECT *lprcUpdate,
3221: HRGN hrgnUpdate,
3222: UINT flags);
3223:
3224: /* RedrawWindow() flags */
3225: #define RDW_INVALIDATE 0x0001
3226: #define RDW_INTERNALPAINT 0x0002
3227: #define RDW_ERASE 0x0004
3228:
3229: #define RDW_VALIDATE 0x0008
3230: #define RDW_NOINTERNALPAINT 0x0010
3231: #define RDW_NOERASE 0x0020
3232:
3233: #define RDW_NOCHILDREN 0x0040
3234: #define RDW_ALLCHILDREN 0x0080
3235:
3236: #define RDW_UPDATENOW 0x0100
3237: #define RDW_ERASENOW 0x0200
3238:
3239:
3240: /* LockWindowUpdate API */
3241: BOOL
3242: WINAPI
3243: LockWindowUpdate(
3244: HWND hwndLock);
3245:
3246: BOOL
3247: WINAPI
3248: ScrollWindow(
3249: HWND hWnd,
3250: int XAmount,
3251: int YAmount,
3252: CONST RECT *lpRect,
3253: CONST RECT *lpClipRect);
3254:
3255: BOOL
3256: WINAPI
3257: ScrollDC(
3258: HDC hDC,
3259: int dx,
3260: int dy,
3261: CONST RECT *lprcScroll,
3262: CONST RECT *lprcClip ,
3263: HRGN hrgnUpdate,
3264: LPRECT lprcUpdate);
3265:
3266: int
3267: WINAPI
3268: ScrollWindowEx(
3269: HWND hwnd,
3270: int dx,
3271: int dy,
3272: CONST RECT *prcScroll,
3273: CONST RECT *prcClip ,
3274: HRGN hrgnUpdate,
3275: LPRECT prcUpdate,
3276: UINT flags);
3277:
3278: #define SW_SCROLLCHILDREN 0x0001 /* Scroll children within *lprcScroll. */
3279: #define SW_INVALIDATE 0x0002 /* Invalidate after scrolling */
3280: #define SW_ERASE 0x0004 /* If SW_INVALIDATE, don't send WM_ERASEBACKGROUND */
3281:
3282:
3283: #ifndef NOSCROLL
3284: int
3285: WINAPI
3286: SetScrollPos(
3287: HWND hWnd,
3288: int nBar,
3289: int nPos,
3290: BOOL bRedraw);
3291:
3292: int
3293: WINAPI
3294: GetScrollPos(
3295: HWND hWnd,
3296: int nBar);
3297:
3298: BOOL
3299: WINAPI
3300: SetScrollRange(
3301: HWND hWnd,
3302: int nBar,
3303: int nMinPos,
3304: int nMaxPos,
3305: BOOL bRedraw);
3306:
3307: BOOL
3308: WINAPI
3309: GetScrollRange(
3310: HWND hWnd,
3311: int nBar,
3312: LPINT lpMinPos,
3313: LPINT lpMaxPos);
3314:
3315: BOOL
3316: WINAPI
3317: ShowScrollBar(
3318: HWND hWnd,
3319: int wBar,
3320: BOOL bShow);
3321:
3322: BOOL
3323: WINAPI
3324: EnableScrollBar(
3325: HWND hwnd,
3326: UINT wSBflags,
3327: UINT wArrows);
3328: #endif
3329:
3330: BOOL
3331: WINAPI
3332: SetPropA(
3333: HWND hWnd,
3334: LPCSTR lpString,
3335: HANDLE hData);
3336: BOOL
3337: WINAPI
3338: SetPropW(
3339: HWND hWnd,
3340: LPCWSTR lpString,
3341: HANDLE hData);
3342: #ifdef UNICODE
3343: #define SetProp SetPropW
3344: #else
3345: #define SetProp SetPropA
3346: #endif // !UNICODE
3347:
3348: HANDLE
3349: WINAPI
3350: GetPropA(
3351: HWND hWnd,
3352: LPCSTR lpString);
3353: HANDLE
3354: WINAPI
3355: GetPropW(
3356: HWND hWnd,
3357: LPCWSTR lpString);
3358: #ifdef UNICODE
3359: #define GetProp GetPropW
3360: #else
3361: #define GetProp GetPropA
3362: #endif // !UNICODE
3363:
3364: HANDLE
3365: WINAPI
3366: RemovePropA(
3367: HWND hWnd,
3368: LPCSTR lpString);
3369: HANDLE
3370: WINAPI
3371: RemovePropW(
3372: HWND hWnd,
3373: LPCWSTR lpString);
3374: #ifdef UNICODE
3375: #define RemoveProp RemovePropW
3376: #else
3377: #define RemoveProp RemovePropA
3378: #endif // !UNICODE
3379:
3380: int
3381: WINAPI
3382: EnumPropsExA(
3383: HWND hWnd,
3384: PROPENUMPROC lpEnumFunc,
3385: LPARAM lParam);
3386: int
3387: WINAPI
3388: EnumPropsExW(
3389: HWND hWnd,
3390: PROPENUMPROC lpEnumFunc,
3391: LPARAM lParam);
3392: #ifdef UNICODE
3393: #define EnumPropsEx EnumPropsExW
3394: #else
3395: #define EnumPropsEx EnumPropsExA
3396: #endif // !UNICODE
3397:
3398: int
3399: WINAPI
3400: EnumPropsA(
3401: HWND hWnd,
3402: PROPENUMPROC lpEnumFunc);
3403: int
3404: WINAPI
3405: EnumPropsW(
3406: HWND hWnd,
3407: PROPENUMPROC lpEnumFunc);
3408: #ifdef UNICODE
3409: #define EnumProps EnumPropsW
3410: #else
3411: #define EnumProps EnumPropsA
3412: #endif // !UNICODE
3413:
3414: BOOL
3415: WINAPI
3416: SetWindowTextA(
3417: HWND hWnd,
3418: LPCSTR lpString);
3419: BOOL
3420: WINAPI
3421: SetWindowTextW(
3422: HWND hWnd,
3423: LPCWSTR lpString);
3424: #ifdef UNICODE
3425: #define SetWindowText SetWindowTextW
3426: #else
3427: #define SetWindowText SetWindowTextA
3428: #endif // !UNICODE
3429:
3430: int
3431: WINAPI
3432: GetWindowTextA(
3433: HWND hWnd,
3434: LPSTR lpString,
3435: int nMaxCount);
3436: int
3437: WINAPI
3438: GetWindowTextW(
3439: HWND hWnd,
3440: LPWSTR lpString,
3441: int nMaxCount);
3442: #ifdef UNICODE
3443: #define GetWindowText GetWindowTextW
3444: #else
3445: #define GetWindowText GetWindowTextA
3446: #endif // !UNICODE
3447:
3448: int
3449: WINAPI
3450: GetWindowTextLengthA(
3451: HWND hWnd);
3452: int
3453: WINAPI
3454: GetWindowTextLengthW(
3455: HWND hWnd);
3456: #ifdef UNICODE
3457: #define GetWindowTextLength GetWindowTextLengthW
3458: #else
3459: #define GetWindowTextLength GetWindowTextLengthA
3460: #endif // !UNICODE
3461:
3462: BOOL
3463: WINAPI
3464: GetClientRect(
3465: HWND hWnd,
3466: LPRECT lpRect);
3467:
3468: BOOL
3469: WINAPI
3470: GetWindowRect(
3471: HWND hWnd,
3472: LPRECT lpRect);
3473:
3474: BOOL
3475: WINAPI
3476: AdjustWindowRect(
3477: LPRECT lpRect,
3478: DWORD dwStyle,
3479: BOOL bMenu);
3480:
3481: BOOL
3482: WINAPI
3483: AdjustWindowRectEx(
3484: LPRECT lpRect,
3485: DWORD dwStyle,
3486: BOOL bMenu,
3487: DWORD dwExStyle);
3488:
3489: #ifndef NOMB
3490:
3491: /* MessageBox() Flags */
3492: #define MB_OK 0x0000L
3493: #define MB_OKCANCEL 0x0001L
3494: #define MB_ABORTRETRYIGNORE 0x0002L
3495: #define MB_YESNOCANCEL 0x0003L
3496: #define MB_YESNO 0x0004L
3497: #define MB_RETRYCANCEL 0x0005L
3498:
3499: #define MB_ICONHAND 0x0010L
3500: #define MB_ICONQUESTION 0x0020L
3501: #define MB_ICONEXCLAMATION 0x0030L
3502: #define MB_ICONASTERISK 0x0040L
3503:
3504: #define MB_ICONINFORMATION MB_ICONASTERISK
3505: #define MB_ICONSTOP MB_ICONHAND
3506:
3507: #define MB_DEFBUTTON1 0x0000L
3508: #define MB_DEFBUTTON2 0x0100L
3509: #define MB_DEFBUTTON3 0x0200L
3510:
3511: #define MB_APPLMODAL 0x0000L
3512: #define MB_SYSTEMMODAL 0x1000L
3513: #define MB_TASKMODAL 0x2000L
3514:
3515: #define MB_NOFOCUS 0x8000L
3516: #define MB_SETFOREGROUND 0x10000L
3517:
3518: #define MB_TYPEMASK 0x000FL
3519: #define MB_ICONMASK 0x00F0L
3520: #define MB_DEFMASK 0x0F00L
3521: #define MB_MODEMASK 0x3000L
3522: #define MB_MISCMASK 0xC000L
3523:
3524: int
3525: WINAPI
3526: MessageBoxExA(
3527: HWND hWnd ,
3528: LPCSTR lpText,
3529: LPCSTR lpCaption ,
3530: UINT uType,
3531: WORD wLanguageId);
3532: int
3533: WINAPI
3534: MessageBoxExW(
3535: HWND hWnd ,
3536: LPCWSTR lpText,
3537: LPCWSTR lpCaption ,
3538: UINT uType,
3539: WORD wLanguageId);
3540: #ifdef UNICODE
3541: #define MessageBoxEx MessageBoxExW
3542: #else
3543: #define MessageBoxEx MessageBoxExA
3544: #endif // !UNICODE
3545:
3546: #define MessageBoxA(hWnd, lpText, lpCaption, uType) \
3547: MessageBoxExA(hWnd, lpText, lpCaption, uType, 0)
3548: #define MessageBoxW(hWnd, lpText, lpCaption, uType) \
3549: MessageBoxExW(hWnd, lpText, lpCaption, uType, 0)
3550: #ifdef UNICODE
3551: #define MessageBox MessageBoxW
3552: #else
3553: #define MessageBox MessageBoxA
3554: #endif // !UNICODE
3555:
3556: BOOL
3557: WINAPI
3558: MessageBeep(
3559: UINT uType);
3560:
3561: #endif /* NOMB */
3562:
3563: int
3564: WINAPI
3565: ShowCursor(
3566: BOOL bShow);
3567:
3568: BOOL
3569: WINAPI
3570: SetCursorPos(
3571: int X,
3572: int Y);
3573:
3574: HCURSOR
3575: WINAPI
3576: SetCursor(
3577: HCURSOR hCursor );
3578:
3579: BOOL
3580: WINAPI
3581: GetCursorPos(
3582: LPPOINT lpPoint);
3583:
3584: BOOL
3585: WINAPI
3586: ClipCursor(
3587: CONST RECT *lpRect );
3588:
3589: BOOL
3590: WINAPI
3591: GetClipCursor(
3592: LPRECT lpRect);
3593:
3594: HCURSOR
3595: WINAPI
3596: GetCursor(
3597: VOID);
3598:
3599: BOOL
3600: WINAPI
3601: CreateCaret(
3602: HWND hWnd,
3603: HBITMAP hBitmap ,
3604: int nWidth,
3605: int nHeight);
3606:
3607: UINT
3608: WINAPI
3609: GetCaretBlinkTime(
3610: VOID);
3611:
3612: BOOL
3613: WINAPI
3614: SetCaretBlinkTime(
3615: UINT uMSeconds);
3616:
3617: BOOL
3618: WINAPI
3619: DestroyCaret(
3620: VOID);
3621:
3622: BOOL
3623: WINAPI
3624: HideCaret(
3625: HWND hWnd );
3626:
3627: BOOL
3628: WINAPI
3629: ShowCaret(
3630: HWND hWnd );
3631:
3632: BOOL
3633: WINAPI
3634: SetCaretPos(
3635: int X,
3636: int Y);
3637:
3638: BOOL
3639: WINAPI
3640: GetCaretPos(
3641: LPPOINT lpPoint);
3642:
3643: BOOL
3644: WINAPI
3645: ClientToScreen(
3646: HWND hWnd,
3647: LPPOINT lpPoint);
3648:
3649: BOOL
3650: WINAPI
3651: ScreenToClient(
3652: HWND hWnd,
3653: LPPOINT lpPoint);
3654:
3655: int
3656: WINAPI
3657: MapWindowPoints(
3658: HWND hWndFrom,
3659: HWND hWndTo,
3660: LPPOINT lpPoints,
3661: UINT cPoints);
3662:
3663: HWND
3664: WINAPI
3665: WindowFromPoint(
3666: POINT Point);
3667:
3668: HWND
3669: WINAPI
3670: ChildWindowFromPoint(
3671: HWND hWndParent,
3672: POINT Point);
3673:
3674: #ifndef NOCOLOR
3675:
3676: /* Color Types */
3677: #define CTLCOLOR_MSGBOX 0
3678: #define CTLCOLOR_EDIT 1
3679: #define CTLCOLOR_LISTBOX 2
3680: #define CTLCOLOR_BTN 3
3681: #define CTLCOLOR_DLG 4
3682: #define CTLCOLOR_SCROLLBAR 5
3683: #define CTLCOLOR_STATIC 6
3684: #define CTLCOLOR_MAX 8 /* three bits max */
3685:
3686: #define COLOR_SCROLLBAR 0
3687: #define COLOR_BACKGROUND 1
3688: #define COLOR_ACTIVECAPTION 2
3689: #define COLOR_INACTIVECAPTION 3
3690: #define COLOR_MENU 4
3691: #define COLOR_WINDOW 5
3692: #define COLOR_WINDOWFRAME 6
3693: #define COLOR_MENUTEXT 7
3694: #define COLOR_WINDOWTEXT 8
3695: #define COLOR_CAPTIONTEXT 9
3696: #define COLOR_ACTIVEBORDER 10
3697: #define COLOR_INACTIVEBORDER 11
3698: #define COLOR_APPWORKSPACE 12
3699: #define COLOR_HIGHLIGHT 13
3700: #define COLOR_HIGHLIGHTTEXT 14
3701: #define COLOR_BTNFACE 15
3702: #define COLOR_BTNSHADOW 16
3703: #define COLOR_GRAYTEXT 17
3704: #define COLOR_BTNTEXT 18
3705: #define COLOR_INACTIVECAPTIONTEXT 19
3706: #define COLOR_BTNHIGHLIGHT 20
3707: #define COLOR_ENDCOLORS COLOR_BTNHIGHLIGHT
3708: #define COLOR_MAX 20
3709:
3710: DWORD
3711: WINAPI
3712: GetSysColor(
3713: int nIndex);
3714:
3715: BOOL
3716: WINAPI
3717: SetSysColors(
3718: int,
3719: CONST INT *,
3720: CONST COLORREF *);
3721:
3722: #endif /* NOCOLOR */
3723:
3724: BOOL
3725: WINAPI
3726: DrawFocusRect(
3727: HDC,
3728: CONST RECT *);
3729:
3730: int
3731: WINAPI
3732: FillRect(
3733: HDC hdc,
3734: CONST RECT *lprc,
3735: HBRUSH hbr);
3736:
3737: int
3738: WINAPI
3739: FrameRect(
3740: HDC hdc,
3741: CONST RECT *lprc,
3742: HBRUSH hbr);
3743:
3744: BOOL
3745: WINAPI
3746: InvertRect(
3747: HDC hdc,
3748: CONST RECT *lprc);
3749:
3750: BOOL
3751: WINAPI
3752: SetRect(
3753: LPRECT,
3754: int,
3755: int,
3756: int,
3757: int);
3758:
3759: BOOL
3760: WINAPI
3761: SetRectEmpty(
3762: LPRECT);
3763:
3764: int
3765: WINAPI
3766: CopyRect(
3767: LPRECT,
3768: CONST RECT *);
3769:
3770: BOOL
3771: WINAPI
3772: InflateRect(
3773: LPRECT,
3774: int,
3775: int);
3776:
3777: int
3778: WINAPI
3779: IntersectRect(
3780: LPRECT,
3781: CONST RECT *,
3782: CONST RECT *);
3783:
3784: BOOL
3785: WINAPI
3786: UnionRect(
3787: LPRECT,
3788: CONST RECT *,
3789: CONST RECT *);
3790:
3791: BOOL
3792: WINAPI
3793: OffsetRect(
3794: LPRECT,
3795: int,
3796: int);
3797:
3798: BOOL
3799: WINAPI
3800: IsRectEmpty(
3801: CONST RECT *lprc);
3802:
3803: BOOL
3804: WINAPI
3805: EqualRect(
3806: CONST RECT *,
3807: CONST RECT *);
3808:
3809: BOOL
3810: WINAPI
3811: PtInRect(
3812: CONST RECT *,
3813: POINT);
3814:
3815: #ifndef NOWINOFFSETS
3816:
3817: WORD
3818: WINAPI
3819: GetWindowWord(
3820: HWND hWnd,
3821: int nIndex);
3822:
3823: WORD
3824: WINAPI
3825: SetWindowWord(
3826: HWND hWnd,
3827: int nIndex,
3828: WORD wNewWord);
3829:
3830: LONG
3831: WINAPI
3832: GetWindowLongA(
3833: HWND hWnd,
3834: int nIndex);
3835: LONG
3836: WINAPI
3837: GetWindowLongW(
3838: HWND hWnd,
3839: int nIndex);
3840: #ifdef UNICODE
3841: #define GetWindowLong GetWindowLongW
3842: #else
3843: #define GetWindowLong GetWindowLongA
3844: #endif // !UNICODE
3845:
3846: LONG
3847: WINAPI
3848: SetWindowLongA(
3849: HWND hWnd,
3850: int nIndex,
3851: LONG dwNewLong);
3852: LONG
3853: WINAPI
3854: SetWindowLongW(
3855: HWND hWnd,
3856: int nIndex,
3857: LONG dwNewLong);
3858: #ifdef UNICODE
3859: #define SetWindowLong SetWindowLongW
3860: #else
3861: #define SetWindowLong SetWindowLongA
3862: #endif // !UNICODE
3863:
3864: WORD
3865: WINAPI
3866: GetClassWord(
3867: HWND hWnd,
3868: int nIndex);
3869:
3870: WORD
3871: WINAPI
3872: SetClassWord(
3873: HWND hWnd,
3874: int nIndex,
3875: WORD wNewWord);
3876:
3877: DWORD
3878: WINAPI
3879: GetClassLongA(
3880: HWND hWnd,
3881: int nIndex);
3882: DWORD
3883: WINAPI
3884: GetClassLongW(
3885: HWND hWnd,
3886: int nIndex);
3887: #ifdef UNICODE
3888: #define GetClassLong GetClassLongW
3889: #else
3890: #define GetClassLong GetClassLongA
3891: #endif // !UNICODE
3892:
3893: DWORD
3894: WINAPI
3895: SetClassLongA(
3896: HWND hWnd,
3897: int nIndex,
3898: LONG dwNewLong);
3899: DWORD
3900: WINAPI
3901: SetClassLongW(
3902: HWND hWnd,
3903: int nIndex,
3904: LONG dwNewLong);
3905: #ifdef UNICODE
3906: #define SetClassLong SetClassLongW
3907: #else
3908: #define SetClassLong SetClassLongA
3909: #endif // !UNICODE
3910:
3911: HWND
3912: WINAPI
3913: GetDesktopWindow(
3914: VOID);
3915:
3916: BOOL
3917: WINAPI
3918: SetDeskWallpaper(
3919: LPSTR lpString );
3920:
3921: #endif /* NOWINOFFSETS */
3922:
3923: HWND
3924: WINAPI
3925: GetParent(
3926: HWND hWnd);
3927:
3928: HWND
3929: WINAPI
3930: SetParent(
3931: HWND hWndChild,
3932: HWND hWndNewParent);
3933:
3934: BOOL
3935: WINAPI
3936: EnumChildWindows(
3937: HWND hWndParent,
3938: WNDENUMPROC lpEnumFunc,
3939: LPARAM lParam);
3940:
3941: HWND
3942: WINAPI
3943: FindWindowA(
3944: LPCSTR lpClassName ,
3945: LPCSTR lpWindowName);
3946: HWND
3947: WINAPI
3948: FindWindowW(
3949: LPCWSTR lpClassName ,
3950: LPCWSTR lpWindowName);
3951: #ifdef UNICODE
3952: #define FindWindow FindWindowW
3953: #else
3954: #define FindWindow FindWindowA
3955: #endif // !UNICODE
3956:
3957: BOOL
3958: WINAPI
3959: EnumWindows(
3960: WNDENUMPROC lpEnumFunc,
3961: LPARAM lParam);
3962:
3963: BOOL
3964: WINAPI
3965: EnumThreadWindows(
3966: DWORD dwThreadId,
3967: WNDENUMPROC lpfn,
3968: LPARAM lParam);
3969:
3970: #define EnumTaskWindows(hTask, lpfn, lParam) EnumThreadWindows((DWORD)hTask, lpfn, lParam)
3971:
3972: int
3973: WINAPI
3974: GetClassNameA(
3975: HWND hWnd,
3976: LPSTR lpClassName,
3977: int nMaxCount);
3978: int
3979: WINAPI
3980: GetClassNameW(
3981: HWND hWnd,
3982: LPWSTR lpClassName,
3983: int nMaxCount);
3984: #ifdef UNICODE
3985: #define GetClassName GetClassNameW
3986: #else
3987: #define GetClassName GetClassNameA
3988: #endif // !UNICODE
3989:
3990: HWND
3991: WINAPI
3992: GetTopWindow(
3993: HWND hWnd);
3994:
3995: #define GetNextWindow(hwnd, wCmd) GetWindow(hwnd, wCmd)
3996: #define GetSysModalWindow() (NULL)
3997: #define SetSysModalWindow(hwnd) (NULL)
3998:
3999: DWORD
4000: WINAPI
4001: GetWindowThreadProcessId(
4002: HWND hWnd,
4003: LPDWORD lpdwProcessId );
4004:
4005: #define GetWindowTask(hwnd)\
4006: ((HANDLE)GetWindowThreadProcessId(hwnd, NULL))
4007:
4008: HWND
4009: WINAPI
4010: GetLastActivePopup(
4011: HWND hWnd);
4012:
4013: /* GetWindow() Constants */
4014: #define GW_HWNDFIRST 0
4015: #define GW_HWNDLAST 1
4016: #define GW_HWNDNEXT 2
4017: #define GW_HWNDPREV 3
4018: #define GW_OWNER 4
4019: #define GW_CHILD 5
4020: #define GW_MAX 5
4021:
4022: HWND
4023: WINAPI
4024: GetWindow(
4025: HWND hWnd,
4026: UINT uCmd);
4027:
4028: #ifndef NOWH
4029:
4030: HHOOK
4031: WINAPI
4032: SetWindowsHookA(
4033: int nFilterType,
4034: HOOKPROC pfnFilterProc);
4035: HHOOK
4036: WINAPI
4037: SetWindowsHookW(
4038: int nFilterType,
4039: HOOKPROC pfnFilterProc);
4040: #ifdef UNICODE
4041: #define SetWindowsHook SetWindowsHookW
4042: #else
4043: #define SetWindowsHook SetWindowsHookA
4044: #endif // !UNICODE
4045:
4046: BOOL
4047: WINAPI
4048: UnhookWindowsHook(
4049: int nCode,
4050: HOOKPROC pfnFilterProc);
4051:
4052: HHOOK
4053: WINAPI
4054: SetWindowsHookExA(
4055: int idHook,
4056: HOOKPROC lpfn,
4057: HINSTANCE hmod,
4058: DWORD dwThreadId);
4059: HHOOK
4060: WINAPI
4061: SetWindowsHookExW(
4062: int idHook,
4063: HOOKPROC lpfn,
4064: HINSTANCE hmod,
4065: DWORD dwThreadId);
4066: #ifdef UNICODE
4067: #define SetWindowsHookEx SetWindowsHookExW
4068: #else
4069: #define SetWindowsHookEx SetWindowsHookExA
4070: #endif // !UNICODE
4071:
4072: BOOL
4073: WINAPI
4074: UnhookWindowsHookEx(
4075: HHOOK hhk);
4076:
4077: LRESULT
4078: WINAPI CallNextHookEx(
4079: HHOOK hhk,
4080: int nCode,
4081: WPARAM wParam,
4082: LPARAM lParam);
4083:
4084: /*
4085: * Macros for source-level compatibility with old functions.
4086: */
4087: #define DefHookProc(nCode, wParam, lParam, phhk)\
4088: CallNextHookEx(*phhk, nCode, wParam, lParam)
4089: #endif
4090:
4091: #ifndef NOMENUS
4092:
4093: /* Menu flags for Add/Check/EnableMenuItem() */
4094: #define MF_INSERT 0x00000000L
4095: #define MF_CHANGE 0x00000080L
4096: #define MF_APPEND 0x00000100L
4097: #define MF_DELETE 0x00000200L
4098: #define MF_REMOVE 0x00001000L
4099:
4100: #define MF_BYCOMMAND 0x00000000L
4101: #define MF_BYPOSITION 0x00000400L
4102:
4103:
4104: #define MF_SEPARATOR 0x00000800L
4105:
4106: #define MF_ENABLED 0x00000000L
4107: #define MF_GRAYED 0x00000001L
4108: #define MF_DISABLED 0x00000002L
4109:
4110: #define MF_UNCHECKED 0x00000000L
4111: #define MF_CHECKED 0x00000008L
4112: #define MF_USECHECKBITMAPS 0x00000200L
4113:
4114: #define MF_STRING 0x00000000L
4115: #define MF_BITMAP 0x00000004L
4116: #define MF_OWNERDRAW 0x00000100L
4117:
4118: #define MF_POPUP 0x00000010L
4119: #define MF_MENUBARBREAK 0x00000020L
4120: #define MF_MENUBREAK 0x00000040L
4121:
4122: #define MF_UNHILITE 0x00000000L
4123: #define MF_HILITE 0x00000080L
4124:
4125: #define MF_SYSMENU 0x00002000L
4126: #define MF_HELP 0x00004000L
4127: #define MF_MOUSESELECT 0x00008000L
4128:
4129: /* Menu item resource format */
4130: typedef struct {
4131: WORD versionNumber;
4132: WORD offset;
4133: } MENUITEMTEMPLATEHEADER;
4134:
4135: typedef struct {
4136: WORD mtOption;
4137: WORD mtID;
4138: char mtString[1];
4139: } MENUITEMTEMPLATE;
4140:
4141: #define MF_END 0x00000080L
4142:
4143: #endif /* NOMENUS */
4144:
4145: #ifndef NOSYSCOMMANDS
4146:
4147: /* System Menu Command Values */
4148: #define SC_SIZE 0xF000
4149: #define SC_MOVE 0xF010
4150: #define SC_MINIMIZE 0xF020
4151: #define SC_MAXIMIZE 0xF030
4152: #define SC_NEXTWINDOW 0xF040
4153: #define SC_PREVWINDOW 0xF050
4154: #define SC_CLOSE 0xF060
4155: #define SC_VSCROLL 0xF070
4156: #define SC_HSCROLL 0xF080
4157: #define SC_MOUSEMENU 0xF090
4158: #define SC_KEYMENU 0xF100
4159: #define SC_ARRANGE 0xF110
4160: #define SC_RESTORE 0xF120
4161: #define SC_TASKLIST 0xF130
4162: #define SC_SCREENSAVE 0xF140
4163: #define SC_HOTKEY 0xF150
4164:
4165: /* Obsolete names */
4166: #define SC_ICON SC_MINIMIZE
4167: #define SC_ZOOM SC_MAXIMIZE
4168:
4169: #endif /* NOSYSCOMMANDS */
4170:
4171: /* Resource Loading Routines */
4172:
4173: HBITMAP
4174: WINAPI
4175: LoadBitmapA(
4176: HINSTANCE hInstance,
4177: LPCSTR lpBitmapName);
4178: HBITMAP
4179: WINAPI
4180: LoadBitmapW(
4181: HINSTANCE hInstance,
4182: LPCWSTR lpBitmapName);
4183: #ifdef UNICODE
4184: #define LoadBitmap LoadBitmapW
4185: #else
4186: #define LoadBitmap LoadBitmapA
4187: #endif // !UNICODE
4188:
4189: HCURSOR
4190: WINAPI
4191: LoadCursorA(
4192: HINSTANCE hInstance,
4193: LPCSTR lpCursorName);
4194: HCURSOR
4195: WINAPI
4196: LoadCursorW(
4197: HINSTANCE hInstance,
4198: LPCWSTR lpCursorName);
4199: #ifdef UNICODE
4200: #define LoadCursor LoadCursorW
4201: #else
4202: #define LoadCursor LoadCursorA
4203: #endif // !UNICODE
4204:
4205: HCURSOR
4206: WINAPI
4207: CreateCursor(
4208: HINSTANCE,
4209: int,
4210: int,
4211: int,
4212: int,
4213: CONST VOID *,
4214: CONST VOID *);
4215:
4216: BOOL
4217: WINAPI
4218: DestroyCursor(
4219: HCURSOR);
4220:
4221: #define CopyCursor(pcur) ((HCURSOR)CopyIcon((HICON)(pcur)))
4222:
4223: /* Standard Cursor IDs */
4224: #define IDC_ARROW MAKEINTRESOURCE(32512)
4225: #define IDC_IBEAM MAKEINTRESOURCE(32513)
4226: #define IDC_WAIT MAKEINTRESOURCE(32514)
4227: #define IDC_CROSS MAKEINTRESOURCE(32515)
4228: #define IDC_UPARROW MAKEINTRESOURCE(32516)
4229: #define IDC_SIZE MAKEINTRESOURCE(32640)
4230: #define IDC_ICON MAKEINTRESOURCE(32641)
4231: #define IDC_SIZENWSE MAKEINTRESOURCE(32642)
4232: #define IDC_SIZENESW MAKEINTRESOURCE(32643)
4233: #define IDC_SIZEWE MAKEINTRESOURCE(32644)
4234: #define IDC_SIZENS MAKEINTRESOURCE(32645)
4235: #define IDC_SIZEALL MAKEINTRESOURCE(32646) //not in win3.1
4236: #define IDC_NO MAKEINTRESOURCE(32648) //not in win3.1
4237:
4238: typedef struct _ICONINFO {
4239: BOOL fIcon;
4240: DWORD xHotspot;
4241: DWORD yHotspot;
4242: HBITMAP hbmMask;
4243: HBITMAP hbmColor;
4244: } ICONINFO;
4245: typedef ICONINFO *PICONINFO;
4246:
4247: HICON
4248: WINAPI
4249: LoadIconA(
4250: HINSTANCE hInstance,
4251: LPCSTR lpIconName);
4252: HICON
4253: WINAPI
4254: LoadIconW(
4255: HINSTANCE hInstance,
4256: LPCWSTR lpIconName);
4257: #ifdef UNICODE
4258: #define LoadIcon LoadIconW
4259: #else
4260: #define LoadIcon LoadIconA
4261: #endif // !UNICODE
4262:
4263: HICON
4264: WINAPI
4265: CreateIcon(
4266: HINSTANCE,
4267: int,
4268: int,
4269: BYTE,
4270: BYTE,
4271: CONST BYTE *,
4272: CONST BYTE *);
4273:
4274: BOOL
4275: WINAPI
4276: DestroyIcon(
4277: HICON);
4278:
4279: int
4280: WINAPI
4281: LookupIconIdFromDirectory(
4282: PBYTE presbits,
4283: BOOL fIcon);
4284:
4285: HICON
4286: WINAPI
4287: CreateIconFromResource(
4288: PBYTE presbits,
4289: DWORD dwResSize,
4290: BOOL fIcon,
4291: DWORD dwVer);
4292:
4293: HICON
4294: WINAPI
4295: CreateIconIndirect(
4296: PICONINFO piconinfo);
4297:
4298: HICON
4299: WINAPI
4300: CopyIcon(
4301: HICON);
4302:
4303: BOOL
4304: WINAPI
4305: GetIconInfo(
4306: HICON hIcon,
4307: PICONINFO piconinfo);
4308:
4309: #ifdef OEMRESOURCE
4310:
4311: /* OEM Resource Ordinal Numbers */
4312: #define OBM_CLOSE 32754
4313: #define OBM_UPARROW 32753
4314: #define OBM_DNARROW 32752
4315: #define OBM_RGARROW 32751
4316: #define OBM_LFARROW 32750
4317: #define OBM_REDUCE 32749
4318: #define OBM_ZOOM 32748
4319: #define OBM_RESTORE 32747
4320: #define OBM_REDUCED 32746
4321: #define OBM_ZOOMD 32745
4322: #define OBM_RESTORED 32744
4323: #define OBM_UPARROWD 32743
4324: #define OBM_DNARROWD 32742
4325: #define OBM_RGARROWD 32741
4326: #define OBM_LFARROWD 32740
4327: #define OBM_MNARROW 32739
4328: #define OBM_COMBO 32738
4329: #define OBM_UPARROWI 32737
4330: #define OBM_DNARROWI 32736
4331: #define OBM_RGARROWI 32735
4332: #define OBM_LFARROWI 32734
4333:
4334: #define OBM_OLD_CLOSE 32767
4335: #define OBM_SIZE 32766
4336: #define OBM_OLD_UPARROW 32765
4337: #define OBM_OLD_DNARROW 32764
4338: #define OBM_OLD_RGARROW 32763
4339: #define OBM_OLD_LFARROW 32762
4340: #define OBM_BTSIZE 32761
4341: #define OBM_CHECK 32760
4342: #define OBM_CHECKBOXES 32759
4343: #define OBM_BTNCORNERS 32758
4344: #define OBM_OLD_REDUCE 32757
4345: #define OBM_OLD_ZOOM 32756
4346: #define OBM_OLD_RESTORE 32755
4347:
4348: #define OCR_NORMAL 32512
4349: #define OCR_IBEAM 32513
4350: #define OCR_WAIT 32514
4351: #define OCR_CROSS 32515
4352: #define OCR_UP 32516
4353: #define OCR_SIZE 32640
4354: #define OCR_ICON 32641
4355: #define OCR_SIZENWSE 32642
4356: #define OCR_SIZENESW 32643
4357: #define OCR_SIZEWE 32644
4358: #define OCR_SIZENS 32645
4359: #define OCR_SIZEALL 32646
4360: #define OCR_ICOCUR 32647
4361: #define OCR_NO 32648 //not in win3.1
4362:
4363: #define OIC_SAMPLE 32512
4364: #define OIC_HAND 32513
4365: #define OIC_QUES 32514
4366: #define OIC_BANG 32515
4367: #define OIC_NOTE 32516
4368:
4369: #endif /* OEMRESOURCE */
4370:
4371: #define ORD_LANGDRIVER 1 /* The ordinal number for the entry point of
4372: ** language drivers.
4373: */
4374:
4375: #ifndef NOICONS
4376:
4377: /* Standard Icon IDs */
4378: #define IDI_APPLICATION MAKEINTRESOURCE(32512)
4379: #define IDI_HAND MAKEINTRESOURCE(32513)
4380: #define IDI_QUESTION MAKEINTRESOURCE(32514)
4381: #define IDI_EXCLAMATION MAKEINTRESOURCE(32515)
4382: #define IDI_ASTERISK MAKEINTRESOURCE(32516)
4383:
4384: #endif /* NOICONS */
4385:
4386: int
4387: WINAPI
4388: LoadStringA(
4389: HINSTANCE hInstance,
4390: UINT uID,
4391: LPSTR lpBuffer,
4392: int nBufferMax);
4393: int
4394: WINAPI
4395: LoadStringW(
4396: HINSTANCE hInstance,
4397: UINT uID,
4398: LPWSTR lpBuffer,
4399: int nBufferMax);
4400: #ifdef UNICODE
4401: #define LoadString LoadStringW
4402: #else
4403: #define LoadString LoadStringA
4404: #endif // !UNICODE
4405:
4406: /* Dialog Box Command IDs */
4407: #define IDOK 1
4408: #define IDCANCEL 2
4409: #define IDABORT 3
4410: #define IDRETRY 4
4411: #define IDIGNORE 5
4412: #define IDYES 6
4413: #define IDNO 7
4414:
4415: #ifndef NOCTLMGR
4416:
4417: /* Control Manager Structures and Definitions */
4418:
4419: #ifndef NOWINSTYLES
4420:
4421: /* Edit Control Styles */
4422: #define ES_LEFT 0x0000L
4423: #define ES_CENTER 0x0001L
4424: #define ES_RIGHT 0x0002L
4425: #define ES_MULTILINE 0x0004L
4426: #define ES_UPPERCASE 0x0008L
4427: #define ES_LOWERCASE 0x0010L
4428: #define ES_PASSWORD 0x0020L
4429: #define ES_AUTOVSCROLL 0x0040L
4430: #define ES_AUTOHSCROLL 0x0080L
4431: #define ES_NOHIDESEL 0x0100L
4432: #define ES_OEMCONVERT 0x0400L
4433: #define ES_READONLY 0x0800L
4434: #define ES_WANTRETURN 0x1000L
4435:
4436:
4437: #endif /* NOWINSTYLES */
4438:
4439: /* Edit Control Notification Codes */
4440: #define EN_SETFOCUS 0x0100
4441: #define EN_KILLFOCUS 0x0200
4442: #define EN_CHANGE 0x0300
4443: #define EN_UPDATE 0x0400
4444: #define EN_ERRSPACE 0x0500
4445: #define EN_MAXTEXT 0x0501
4446: #define EN_HSCROLL 0x0601
4447: #define EN_VSCROLL 0x0602
4448:
4449: #ifndef NOWINMESSAGES
4450:
4451: /* Edit Control Messages */
4452: #define EM_GETSEL 0x00B0
4453: #define EM_SETSEL 0x00B1
4454: #define EM_GETRECT 0x00B2
4455: #define EM_SETRECT 0x00B3
4456: #define EM_SETRECTNP 0x00B4
4457: #define EM_SCROLL 0x00B5
4458: #define EM_LINESCROLL 0x00B6
4459: #define EM_SCROLLCARET 0x00B7
4460: #define EM_GETMODIFY 0x00B8
4461: #define EM_SETMODIFY 0x00B9
4462: #define EM_GETLINECOUNT 0x00BA
4463: #define EM_LINEINDEX 0x00BB
4464: #define EM_SETHANDLE 0x00BC
4465: #define EM_GETHANDLE 0x00BD
4466: #define EM_GETTHUMB 0x00BE
4467: #define EM_LINELENGTH 0x00C1
4468: #define EM_REPLACESEL 0x00C2
4469: #define EM_SETFONT 0x00C3
4470: #define EM_GETLINE 0x00C4
4471: #define EM_LIMITTEXT 0x00C5
4472: #define EM_CANUNDO 0x00C6
4473: #define EM_UNDO 0x00C7
4474: #define EM_FMTLINES 0x00C8
4475: #define EM_LINEFROMCHAR 0x00C9
4476: #define EM_SETWORDBREAK 0x00CA
4477: #define EM_SETTABSTOPS 0x00CB
4478: #define EM_SETPASSWORDCHAR 0x00CC
4479: #define EM_EMPTYUNDOBUFFER 0x00CD
4480: #define EM_GETFIRSTVISIBLELINE 0x00CE
4481: #define EM_SETREADONLY 0x00CF
4482: #define EM_SETWORDBREAKPROC 0x00D0
4483: #define EM_GETWORDBREAKPROC 0x00D1
4484: #define EM_GETPASSWORDCHAR 0x00D2
4485: #define EM_MSGMAX 0x00D3
4486:
4487: #endif /* NOWINMESSAGES */
4488:
4489: /* EDITWORDBREAKPROC code values */
4490: #define WB_LEFT 0
4491: #define WB_RIGHT 1
4492: #define WB_ISDELIMITER 2
4493:
4494: /* Button Control Styles */
4495: #define BS_PUSHBUTTON 0x00L
4496: #define BS_DEFPUSHBUTTON 0x01L
4497: #define BS_CHECKBOX 0x02L
4498: #define BS_AUTOCHECKBOX 0x03L
4499: #define BS_RADIOBUTTON 0x04L
4500: #define BS_3STATE 0x05L
4501: #define BS_AUTO3STATE 0x06L
4502: #define BS_GROUPBOX 0x07L
4503: #define BS_USERBUTTON 0x08L
4504: #define BS_AUTORADIOBUTTON 0x09L
4505: #define BS_PUSHBOX 0x0AL
4506: #define BS_OWNERDRAW 0x0BL
4507: #define BS_LEFTTEXT 0x20L
4508:
4509:
4510: /* User Button Notification Codes */
4511: #define BN_CLICKED 0
4512: #define BN_PAINT 1
4513: #define BN_HILITE 2
4514: #define BN_UNHILITE 3
4515: #define BN_DISABLE 4
4516: #define BN_DOUBLECLICKED 5
4517:
4518: /* Button Control Messages */
4519: #define BM_GETCHECK 0x00F0
4520: #define BM_SETCHECK 0x00F1
4521: #define BM_GETSTATE 0x00F2
4522: #define BM_SETSTATE 0x00F3
4523: #define BM_SETSTYLE 0x00F4
4524:
4525: /* Static Control Constants */
4526: #define SS_LEFT 0x00L
4527: #define SS_CENTER 0x01L
4528: #define SS_RIGHT 0x02L
4529: #define SS_ICON 0x03L
4530: #define SS_BLACKRECT 0x04L
4531: #define SS_GRAYRECT 0x05L
4532: #define SS_WHITERECT 0x06L
4533: #define SS_BLACKFRAME 0x07L
4534: #define SS_GRAYFRAME 0x08L
4535: #define SS_WHITEFRAME 0x09L
4536: #define SS_USERITEM 0x0AL
4537: #define SS_SIMPLE 0x0BL
4538: #define SS_LEFTNOWORDWRAP 0x0CL
4539: #define SS_NOPREFIX 0x80L /* Don't do "&" character translation */
4540:
4541: #ifndef NOWINMESSAGES
4542: /* Static Control Mesages */
4543: #define STM_SETICON 0x170
4544: #define STM_GETICON 0x171
4545: #define STM_MSGMAX 0x172
4546: #endif /* NOWINMESSAGES */
4547: /* Dialog Manager Routines */
4548:
4549: #ifndef NOMSG
4550: BOOL
4551: WINAPI
4552: IsDialogMessage(
4553: HWND hDlg,
4554: LPMSG lpMsg);
4555: #endif
4556:
4557: BOOL
4558: WINAPI
4559: MapDialogRect(
4560: HWND hDlg,
4561: LPRECT lpRect);
4562:
4563: int
4564: WINAPI
4565: DlgDirListA(
4566: HWND hDlg,
4567: LPSTR lpPathSpec,
4568: int nIDListBox,
4569: int nIDStaticPath,
4570: UINT uFileType);
4571: int
4572: WINAPI
4573: DlgDirListW(
4574: HWND hDlg,
4575: LPWSTR lpPathSpec,
4576: int nIDListBox,
4577: int nIDStaticPath,
4578: UINT uFileType);
4579: #ifdef UNICODE
4580: #define DlgDirList DlgDirListW
4581: #else
4582: #define DlgDirList DlgDirListA
4583: #endif // !UNICODE
4584:
4585: BOOL
4586: WINAPI
4587: DlgDirSelectExA(
4588: HWND hDlg,
4589: LPSTR lpString,
4590: int nCount,
4591: int nIDListBox);
4592: BOOL
4593: WINAPI
4594: DlgDirSelectExW(
4595: HWND hDlg,
4596: LPWSTR lpString,
4597: int nCount,
4598: int nIDListBox);
4599: #ifdef UNICODE
4600: #define DlgDirSelectEx DlgDirSelectExW
4601: #else
4602: #define DlgDirSelectEx DlgDirSelectExA
4603: #endif // !UNICODE
4604:
4605: int
4606: WINAPI
4607: DlgDirListComboBoxA(
4608: HWND hDlg,
4609: LPSTR lpPathSpec,
4610: int nIDComboBox,
4611: int nIDStaticPath,
4612: UINT uFiletype);
4613: int
4614: WINAPI
4615: DlgDirListComboBoxW(
4616: HWND hDlg,
4617: LPWSTR lpPathSpec,
4618: int nIDComboBox,
4619: int nIDStaticPath,
4620: UINT uFiletype);
4621: #ifdef UNICODE
4622: #define DlgDirListComboBox DlgDirListComboBoxW
4623: #else
4624: #define DlgDirListComboBox DlgDirListComboBoxA
4625: #endif // !UNICODE
4626:
4627: BOOL
4628: WINAPI
4629: DlgDirSelectComboBoxExA(
4630: HWND hDlg,
4631: LPSTR lpString,
4632: int nCount,
4633: int nIDComboBox);
4634: BOOL
4635: WINAPI
4636: DlgDirSelectComboBoxExW(
4637: HWND hDlg,
4638: LPWSTR lpString,
4639: int nCount,
4640: int nIDComboBox);
4641: #ifdef UNICODE
4642: #define DlgDirSelectComboBoxEx DlgDirSelectComboBoxExW
4643: #else
4644: #define DlgDirSelectComboBoxEx DlgDirSelectComboBoxExA
4645: #endif // !UNICODE
4646:
4647:
4648: /* Dialog Styles */
4649: #define DS_ABSALIGN 0x01L
4650: #define DS_SYSMODAL 0x02L
4651: #define DS_LOCALEDIT 0x20L /* Edit items get Local storage. */
4652: #define DS_SETFONT 0x40L /* User specified font for Dlg controls */
4653: #define DS_MODALFRAME 0x80L /* Can be combined with WS_CAPTION */
4654: #define DS_NOIDLEMSG 0x100L /* WM_ENTERIDLE message will not be sent */
4655: #define DS_SETFOREGROUND 0x200L //not in win3.1
4656:
4657: #define DM_GETDEFID (WM_USER+0)
4658: #define DM_SETDEFID (WM_USER+1)
4659: #define DC_HASDEFID 0x534B //not in win3.1
4660:
4661: /* Dialog Codes */
4662: #define DLGC_WANTARROWS 0x0001 /* Control wants arrow keys */
4663: #define DLGC_WANTTAB 0x0002 /* Control wants tab keys */
4664: #define DLGC_WANTALLKEYS 0x0004 /* Control wants all keys */
4665: #define DLGC_WANTMESSAGE 0x0004 /* Pass message to control */
4666: #define DLGC_HASSETSEL 0x0008 /* Understands EM_SETSEL message */
4667: #define DLGC_DEFPUSHBUTTON 0x0010 /* Default pushbutton */
4668: #define DLGC_UNDEFPUSHBUTTON 0x0020 /* Non-default pushbutton */
4669: #define DLGC_RADIOBUTTON 0x0040 /* Radio button */
4670: #define DLGC_WANTCHARS 0x0080 /* Want WM_CHAR messages */
4671: #define DLGC_STATIC 0x0100 /* Static item: don't include */
4672: #define DLGC_BUTTON 0x2000 /* Button item: can be checked */
4673:
4674: #define LB_CTLCODE 0L
4675:
4676: /* Listbox Return Values */
4677: #define LB_OKAY 0
4678: #define LB_ERR (-1)
4679: #define LB_ERRSPACE (-2)
4680:
4681: /*
4682: ** The idStaticPath parameter to DlgDirList can have the following values
4683: ** ORed if the list box should show other details of the files along with
4684: ** the name of the files;
4685: */
4686: /* all other details also will be returned */
4687:
4688:
4689: /* Listbox Notification Codes */
4690: #define LBN_ERRSPACE (-2)
4691: #define LBN_SELCHANGE 1
4692: #define LBN_DBLCLK 2
4693: #define LBN_SELCANCEL 3
4694: #define LBN_SETFOCUS 4
4695: #define LBN_KILLFOCUS 5
4696:
4697:
4698:
4699: #ifndef NOWINMESSAGES
4700:
4701: /* Listbox messages */
4702: #define LB_ADDSTRING 0x0180
4703: #define LB_INSERTSTRING 0x0181
4704: #define LB_DELETESTRING 0x0182
4705: #define LB_RESETCONTENT 0x0184
4706: #define LB_SETSEL 0x0185
4707: #define LB_SETCURSEL 0x0186
4708: #define LB_GETSEL 0x0187
4709: #define LB_GETCURSEL 0x0188
4710: #define LB_GETTEXT 0x0189
4711: #define LB_GETTEXTLEN 0x018A
4712: #define LB_GETCOUNT 0x018B
4713: #define LB_SELECTSTRING 0x018C
4714: #define LB_DIR 0x018D
4715: #define LB_GETTOPINDEX 0x018E
4716: #define LB_FINDSTRING 0x018F
4717: #define LB_GETSELCOUNT 0x0190
4718: #define LB_GETSELITEMS 0x0191
4719: #define LB_SETTABSTOPS 0x0192
4720: #define LB_GETHORIZONTALEXTENT 0x0193
4721: #define LB_SETHORIZONTALEXTENT 0x0194
4722: #define LB_SETCOLUMNWIDTH 0x0195
4723: #define LB_ADDFILE 0x0196
4724: #define LB_SETTOPINDEX 0x0197
4725: #define LB_GETITEMRECT 0x0198
4726: #define LB_GETITEMDATA 0x0199
4727: #define LB_SETITEMDATA 0x019A
4728: #define LB_SELITEMRANGE 0x019B
4729: #define LB_SETANCHORINDEX 0x019C
4730: #define LB_GETANCHORINDEX 0x019D
4731: #define LB_SETCARETINDEX 0x019E
4732: #define LB_GETCARETINDEX 0x019F
4733: #define LB_SETITEMHEIGHT 0x01A0
4734: #define LB_GETITEMHEIGHT 0x01A1
4735: #define LB_FINDSTRINGEXACT 0x01A2
4736: #define LBCB_CARETON 0x01A3
4737: #define LBCB_CARETOFF 0x01A4
4738: #define LB_SETLOCALE 0x01A5
4739: #define LB_GETLOCALE 0x01A6
4740: #define LB_SETCOUNT 0x01A7
4741: #define LB_MSGMAX 0x01A8
4742:
4743: #endif /* NOWINMESSAGES */
4744:
4745: #ifndef NOWINSTYLES
4746:
4747: /* Listbox Styles */
4748: #define LBS_NOTIFY 0x0001L
4749: #define LBS_SORT 0x0002L
4750: #define LBS_NOREDRAW 0x0004L
4751: #define LBS_MULTIPLESEL 0x0008L
4752: #define LBS_OWNERDRAWFIXED 0x0010L
4753: #define LBS_OWNERDRAWVARIABLE 0x0020L
4754: #define LBS_HASSTRINGS 0x0040L
4755: #define LBS_USETABSTOPS 0x0080L
4756: #define LBS_NOINTEGRALHEIGHT 0x0100L
4757: #define LBS_MULTICOLUMN 0x0200L
4758: #define LBS_WANTKEYBOARDINPUT 0x0400L
4759: #define LBS_EXTENDEDSEL 0x0800L
4760: #define LBS_DISABLENOSCROLL 0x1000L
4761: #define LBS_NODATA 0x2000L
4762: #define LBS_STANDARD (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER)
4763:
4764: #endif /* NOWINSTYLES */
4765:
4766:
4767: /* Combo Box return Values */
4768: #define CB_OKAY 0
4769: #define CB_ERR (-1)
4770: #define CB_ERRSPACE (-2)
4771:
4772:
4773: /* Combo Box Notification Codes */
4774: #define CBN_ERRSPACE (-1)
4775: #define CBN_SELCHANGE 1
4776: #define CBN_DBLCLK 2
4777: #define CBN_SETFOCUS 3
4778: #define CBN_KILLFOCUS 4
4779: #define CBN_EDITCHANGE 5
4780: #define CBN_EDITUPDATE 6
4781: #define CBN_DROPDOWN 7
4782: #define CBN_CLOSEUP 8
4783: #define CBN_SELENDOK 9
4784: #define CBN_SELENDCANCEL 10
4785:
4786: /* Combo Box styles */
4787: #ifndef NOWINSTYLES
4788: #define CBS_SIMPLE 0x0001L
4789: #define CBS_DROPDOWN 0x0002L
4790: #define CBS_DROPDOWNLIST 0x0003L
4791: #define CBS_OWNERDRAWFIXED 0x0010L
4792: #define CBS_OWNERDRAWVARIABLE 0x0020L
4793: #define CBS_AUTOHSCROLL 0x0040L
4794: #define CBS_OEMCONVERT 0x0080L
4795: #define CBS_SORT 0x0100L
4796: #define CBS_HASSTRINGS 0x0200L
4797: #define CBS_NOINTEGRALHEIGHT 0x0400L
4798: #define CBS_DISABLENOSCROLL 0x0800L
4799: #endif /* NOWINSTYLES */
4800:
4801:
4802: /* Combo Box messages */
4803: #ifndef NOWINMESSAGES
4804: #define CB_GETEDITSEL 0x0140
4805: #define CB_LIMITTEXT 0x0141
4806: #define CB_SETEDITSEL 0x0142
4807: #define CB_ADDSTRING 0x0143
4808: #define CB_DELETESTRING 0x0144
4809: #define CB_DIR 0x0145
4810: #define CB_GETCOUNT 0x0146
4811: #define CB_GETCURSEL 0x0147
4812: #define CB_GETLBTEXT 0x0148
4813: #define CB_GETLBTEXTLEN 0x0149
4814: #define CB_INSERTSTRING 0x014A
4815: #define CB_RESETCONTENT 0x014B
4816: #define CB_FINDSTRING 0x014C
4817: #define CB_SELECTSTRING 0x014D
4818: #define CB_SETCURSEL 0x014E
4819: #define CB_SHOWDROPDOWN 0x014F
4820: #define CB_GETITEMDATA 0x0150
4821: #define CB_SETITEMDATA 0x0151
4822: #define CB_GETDROPPEDCONTROLRECT 0x0152
4823: #define CB_SETITEMHEIGHT 0x0153
4824: #define CB_GETITEMHEIGHT 0x0154
4825: #define CB_SETEXTENDEDUI 0x0155
4826: #define CB_GETEXTENDEDUI 0x0156
4827: #define CB_GETDROPPEDSTATE 0x0157
4828: #define CB_FINDSTRINGEXACT 0x0158
4829: #define CB_SETLOCALE 0x0159
4830: #define CB_GETLOCALE 0x015a
4831: #define CB_MSGMAX 0x015b
4832: #endif /* NOWINMESSAGES */
4833:
4834:
4835:
4836: #ifndef NOWINSTYLES
4837:
4838: /* Scroll Bar Styles */
4839: #define SBS_HORZ 0x0000L
4840: #define SBS_VERT 0x0001L
4841: #define SBS_TOPALIGN 0x0002L
4842: #define SBS_LEFTALIGN 0x0002L
4843: #define SBS_BOTTOMALIGN 0x0004L
4844: #define SBS_RIGHTALIGN 0x0004L
4845: #define SBS_SIZEBOXTOPLEFTALIGN 0x0002L
4846: #define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004L
4847: #define SBS_SIZEBOX 0x0008L
4848: #endif /* NOWINSTYLES */
4849:
4850: /* Scroll bar messages */
4851: #ifndef NOWINMESSAGES
4852: #define SBM_SETPOS 0x00E0 //not in win3.1
4853: #define SBM_GETPOS 0x00E1 //not in win3.1
4854: #define SBM_SETRANGE 0x00E2 //not in win3.1
4855: #define SBM_GETRANGE 0x00E3 //not in win3.1
4856: #define SBM_ENABLE_ARROWS 0x00E4 //not in win3.1
4857: #endif
4858: #endif /* NOCTLMGR */
4859:
4860: #ifndef NOMDI
4861:
4862: /* MDI client style bits */
4863: #define MDIS_ALLCHILDSTYLES 0x0001
4864:
4865: /* wParam Flags for WM_MDITILE and WM_MDICASCADE messages. */
4866: #define MDITILE_VERTICAL 0x0000 //not in win3.1
4867: #define MDITILE_HORIZONTAL 0x0001 //not in win3.1
4868: #define MDITILE_SKIPDISABLED 0x0002 //not in win3.1
4869:
4870: typedef struct tagMDICREATESTRUCTA {
4871: LPCSTR szClass;
4872: LPCSTR szTitle;
4873: HANDLE hOwner;
4874: int x;
4875: int y;
4876: int cx;
4877: int cy;
4878: DWORD style;
4879: LPARAM lParam; /* app-defined stuff */
4880: } MDICREATESTRUCTA, *LPMDICREATESTRUCTA;
4881: typedef struct tagMDICREATESTRUCTW {
4882: LPCWSTR szClass;
4883: LPCWSTR szTitle;
4884: HANDLE hOwner;
4885: int x;
4886: int y;
4887: int cx;
4888: int cy;
4889: DWORD style;
4890: LPARAM lParam; /* app-defined stuff */
4891: } MDICREATESTRUCTW, *LPMDICREATESTRUCTW;
4892: #ifdef UNICODE
4893: #define MDICREATESTRUCT MDICREATESTRUCTW
4894: #define LPMDICREATESTRUCT LPMDICREATESTRUCTW
4895: #else
4896: #define MDICREATESTRUCT MDICREATESTRUCTA
4897: #define LPMDICREATESTRUCT LPMDICREATESTRUCTA
4898: #endif // UNICODE
4899:
4900: typedef struct tagCLIENTCREATESTRUCT {
4901: HANDLE hWindowMenu;
4902: UINT idFirstChild;
4903: } CLIENTCREATESTRUCT, *LPCLIENTCREATESTRUCT;
4904:
4905: LRESULT
4906: WINAPI
4907: DefFrameProcA(
4908: HWND hWnd,
4909: HWND hWndMDIClient ,
4910: UINT uMsg,
4911: WPARAM wParam,
4912: LPARAM lParam);
4913: LRESULT
4914: WINAPI
4915: DefFrameProcW(
4916: HWND hWnd,
4917: HWND hWndMDIClient ,
4918: UINT uMsg,
4919: WPARAM wParam,
4920: LPARAM lParam);
4921: #ifdef UNICODE
4922: #define DefFrameProc DefFrameProcW
4923: #else
4924: #define DefFrameProc DefFrameProcA
4925: #endif // !UNICODE
4926:
4927: LRESULT
4928: WINAPI
4929: DefMDIChildProcA(
4930: HWND hWnd,
4931: UINT uMsg,
4932: WPARAM wParam,
4933: LPARAM lParam);
4934: LRESULT
4935: WINAPI
4936: DefMDIChildProcW(
4937: HWND hWnd,
4938: UINT uMsg,
4939: WPARAM wParam,
4940: LPARAM lParam);
4941: #ifdef UNICODE
4942: #define DefMDIChildProc DefMDIChildProcW
4943: #else
4944: #define DefMDIChildProc DefMDIChildProcA
4945: #endif // !UNICODE
4946:
4947: #ifndef NOMSG
4948: BOOL
4949: WINAPI
4950: TranslateMDISysAccel(
4951: HWND hWndClient,
4952: LPMSG lpMsg);
4953: #endif
4954:
4955: UINT
4956: WINAPI
4957: ArrangeIconicWindows(
4958: HWND hWnd);
4959:
4960: HWND
4961: WINAPI
4962: CreateMDIWindowA(
4963: LPSTR lpClassName,
4964: LPSTR lpWindowName,
4965: DWORD dwStyle,
4966: int X,
4967: int Y,
4968: int nWidth,
4969: int nHeight,
4970: HWND hWndParent,
4971: HINSTANCE hInstance,
4972: LONG lParam
4973: );
4974: HWND
4975: WINAPI
4976: CreateMDIWindowW(
4977: LPWSTR lpClassName,
4978: LPWSTR lpWindowName,
4979: DWORD dwStyle,
4980: int X,
4981: int Y,
4982: int nWidth,
4983: int nHeight,
4984: HWND hWndParent,
4985: HINSTANCE hInstance,
4986: LONG lParam
4987: );
4988: #ifdef UNICODE
4989: #define CreateMDIWindow CreateMDIWindowW
4990: #else
4991: #define CreateMDIWindow CreateMDIWindowA
4992: #endif // !UNICODE
4993:
4994: #endif /* NOMDI */
4995: #endif /* NOUSER */
4996:
4997: /****** Help support ********************************************************/
4998:
4999: #ifndef NOHELP
5000:
5001: typedef DWORD HELPPOLY;
5002: typedef struct tagMULTIKEYHELPA {
5003: DWORD mkSize;
5004: CHAR mkKeylist;
5005: CHAR szKeyphrase[1];
5006: } MULTIKEYHELPA, *PMULTIKEYHELPA, *LPMULTIKEYHELPA;
5007: typedef struct tagMULTIKEYHELPW {
5008: DWORD mkSize;
5009: WCHAR mkKeylist;
5010: WCHAR szKeyphrase[1];
5011: } MULTIKEYHELPW, *PMULTIKEYHELPW, *LPMULTIKEYHELPW;
5012: #ifdef UNICODE
5013: #define MULTIKEYHELP MULTIKEYHELPW
5014: #define PMULTIKEYHELP PMULTIKEYHELPW
5015: #define LPMULTIKEYHELP LPMULTIKEYHELPW
5016: #else
5017: #define MULTIKEYHELP MULTIKEYHELPA
5018: #define PMULTIKEYHELP PMULTIKEYHELPA
5019: #define LPMULTIKEYHELP LPMULTIKEYHELPA
5020: #endif // UNICODE
5021:
5022: typedef struct tagHELPWININFOA {
5023: int wStructSize;
5024: int x;
5025: int y;
5026: int dx;
5027: int dy;
5028: int wMax;
5029: CHAR rgchMember[2];
5030: } HELPWININFOA, *PHELPWININFOA, *LPHELPWININFOA;
5031: typedef struct tagHELPWININFOW {
5032: int wStructSize;
5033: int x;
5034: int y;
5035: int dx;
5036: int dy;
5037: int wMax;
5038: WCHAR rgchMember[2];
5039: } HELPWININFOW, *PHELPWININFOW, *LPHELPWININFOW;
5040: #ifdef UNICODE
5041: #define HELPWININFO HELPWININFOW
5042: #define PHELPWININFO PHELPWININFOW
5043: #define LPHELPWININFO LPHELPWININFOW
5044: #else
5045: #define HELPWININFO HELPWININFOA
5046: #define PHELPWININFO PHELPWININFOA
5047: #define LPHELPWININFO LPHELPWININFOA
5048: #endif // UNICODE
5049:
5050: //
5051: // Commands to pass WinHelp()
5052: //
5053:
5054: #define HELP_CONTEXT 0x0001L /* Display topic in ulTopic */
5055: #define HELP_QUIT 0x0002L /* Terminate help */
5056: #define HELP_INDEX 0x0003L /* Display index */
5057: #define HELP_CONTENTS 0x0003L
5058: #define HELP_HELPONHELP 0x0004L /* Display help on using help */
5059: #define HELP_SETINDEX 0x0005L /* Set current Index for multi index help */
5060: #define HELP_SETCONTENTS 0x0005L
5061: #define HELP_CONTEXTPOPUP 0x0008L
5062: #define HELP_FORCEFILE 0x0009L
5063: #define HELP_KEY 0x0101L /* Display topic for keyword in offabData */
5064: #define HELP_COMMAND 0x0102L
5065: #define HELP_PARTIALKEY 0x0105L
5066: #define HELP_MULTIKEY 0x0201L
5067: #define HELP_SETWINPOS 0x0203L
5068:
5069:
5070: BOOL
5071: WINAPI
5072: WinHelpA(
5073: HWND hwndMain,
5074: LPCSTR lpszHelp,
5075: UINT uCommand,
5076: DWORD dwData
5077: );
5078: BOOL
5079: WINAPI
5080: WinHelpW(
5081: HWND hwndMain,
5082: LPCWSTR lpszHelp,
5083: UINT uCommand,
5084: DWORD dwData
5085: );
5086: #ifdef UNICODE
5087: #define WinHelp WinHelpW
5088: #else
5089: #define WinHelp WinHelpA
5090: #endif // !UNICODE
5091:
5092: #endif /* NOHELP */
5093:
5094: #ifndef NOPROFILER
5095:
5096: /* function declarations for profiler routines contained in Windows libraries */
5097: int
5098: WINAPI
5099: ProfInsChk(
5100: VOID);
5101:
5102: VOID
5103: WINAPI
5104: ProfSetup(
5105: int,
5106: int);
5107:
5108: VOID
5109: WINAPI
5110: ProfSampRate(
5111: int,
5112: int);
5113:
5114: VOID
5115: WINAPI
5116: ProfStart(
5117: VOID);
5118:
5119: VOID
5120: WINAPI
5121: ProfStop(
5122: VOID);
5123:
5124: VOID
5125: WINAPI
5126: ProfClear(
5127: VOID);
5128:
5129: VOID
5130: WINAPI
5131: ProfFlush(
5132: VOID);
5133:
5134: VOID
5135: WINAPI
5136: ProfFinish(
5137: VOID);
5138:
5139: #endif /* NOPROFILER */
5140:
5141: #ifndef NOSYSPARAMSINFO
5142: /* Parameter for SystemParametersInfo() */
5143:
5144: #define SPI_GETBEEP 1
5145: #define SPI_SETBEEP 2
5146: #define SPI_GETMOUSE 3
5147: #define SPI_SETMOUSE 4
5148: #define SPI_GETBORDER 5
5149: #define SPI_SETBORDER 6
5150: #define SPI_TIMEOUTS 7
5151: #define SPI_GETKEYBOARDSPEED 10
5152: #define SPI_SETKEYBOARDSPEED 11
5153: #define SPI_LANGDRIVER 12
5154: #define SPI_ICONHORIZONTALSPACING 13
5155: #define SPI_GETSCREENSAVETIMEOUT 14
5156: #define SPI_SETSCREENSAVETIMEOUT 15
5157: #define SPI_GETSCREENSAVEACTIVE 16
5158: #define SPI_SETSCREENSAVEACTIVE 17
5159: #define SPI_GETGRIDGRANULARITY 18
5160: #define SPI_SETGRIDGRANULARITY 19
5161: #define SPI_SETDESKWALLPAPER 20
5162: #define SPI_SETDESKPATTERN 21
5163: #define SPI_GETKEYBOARDDELAY 22
5164: #define SPI_SETKEYBOARDDELAY 23
5165: #define SPI_ICONVERTICALSPACING 24
5166: #define SPI_GETICONTITLEWRAP 25
5167: #define SPI_SETICONTITLEWRAP 26
5168: #define SPI_GETMENUDROPALIGNMENT 27
5169: #define SPI_SETMENUDROPALIGNMENT 28
5170: #define SPI_SETDOUBLECLKWIDTH 29
5171: #define SPI_SETDOUBLECLKHEIGHT 30
5172: #define SPI_GETICONTITLELOGFONT 31
5173: #define SPI_SETDOUBLECLICKTIME 32
5174: #define SPI_SETMOUSEBUTTONSWAP 33
5175: #define SPI_SETICONTITLELOGFONT 34
5176: #define SPI_GETFASTTASKSWITCH 35
5177: #define SPI_SETFASTTASKSWITCH 36
5178: #define SPI_MAX 36
5179:
5180:
5181: BOOL
5182: WINAPI
5183: SystemParametersInfoA(
5184: UINT,
5185: UINT,
5186: PVOID,
5187: UINT);
5188: BOOL
5189: WINAPI
5190: SystemParametersInfoW(
5191: UINT,
5192: UINT,
5193: PVOID,
5194: UINT);
5195: #ifdef UNICODE
5196: #define SystemParametersInfo SystemParametersInfoW
5197: #else
5198: #define SystemParametersInfo SystemParametersInfoA
5199: #endif // !UNICODE
5200:
5201: /* Flags */
5202: #define SPIF_UPDATEINIFILE 0x0001
5203: #define SPIF_SENDWININICHANGE 0x0002
5204:
5205: #endif /* NOSYSPARAMSINFO */
5206: #endif // _WINUSER_
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.