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