Annotation of mstools/h/winuser.h, revision 1.1.1.1

1.1       root        1: /*++ BUILD Version: 0003    // Increment this if a change has global effects
                      2: 
                      3: Copyright (c) 1985-91, Microsoft Corporation
                      4: 
                      5: Module Name:
                      6: 
                      7:     winuser.h
                      8: 
                      9: Abstract:
                     10: 
                     11:     Procedure declarations, constant definitions and macros for the User
                     12:     component.
                     13: 
                     14: --*/
                     15: 
                     16: #ifndef _WINUSER_
                     17: #define _WINUSER_
                     18: 
                     19: #ifndef NOUSER
                     20: 
                     21: typedef HWND HWNDFF;
                     22: typedef HWND HWNDVERBATIM;
                     23: typedef HANDLE HACCEL;
                     24: typedef HANDLE HWPI;
                     25: typedef PVOID LPMONO1BITS;
                     26: typedef PVOID LPMONO2BITS;
                     27: typedef PVOID LPCOLORBITS;
                     28: typedef PWORD LPPRIORITYLIST;
                     29: typedef PVOID LPMENUTEMPLATEA;
                     30: typedef PVOID LPMENUTEMPLATEW;
                     31: #ifdef UNICODE
                     32: #define LPMENUTEMPLATE LPMENUTEMPLATEW
                     33: #else
                     34: #define LPMENUTEMPLATE LPMENUTEMPLATEA
                     35: #endif // UNICODE
                     36: typedef PVOID LPTABS;
                     37: typedef PVOID LPSYSCOLOR;
                     38: typedef PVOID LPCOLORVALUES;
                     39: typedef PVOID LPDLGTEMPLATESTUBA;
                     40: typedef PVOID LPDLGTEMPLATESTUBW;
                     41: #ifdef UNICODE
                     42: #define LPDLGTEMPLATESTUB LPDLGTEMPLATESTUBW
                     43: #else
                     44: #define LPDLGTEMPLATESTUB LPDLGTEMPLATESTUBA
                     45: #endif // UNICODE
                     46: typedef LPSTR   LPSTRNULL;
                     47: typedef LPWSTR  LPWSTRNULL;
                     48: #ifdef UNICODE
                     49: #define LPTSTRNULL LPWSTRNULL
                     50: #else
                     51: #define LPTSTRNULL LPSTRNULL
                     52: #endif // UNICODE
                     53: typedef LPSTR   LPSTRID;
                     54: typedef LPWSTR  LPWSTRID;
                     55: #ifdef UNICODE
                     56: #define LPTSTRID LPWSTRID
                     57: #else
                     58: #define LPTSTRID LPSTRID
                     59: #endif // UNICODE
                     60: typedef LPSTR   LPSTR2;
                     61: typedef LPWSTR  LPWSTR2;
                     62: #ifdef UNICODE
                     63: #define LPTSTR2 LPWSTR2
                     64: #else
                     65: #define LPTSTR2 LPSTR2
                     66: #endif // UNICODE
                     67: typedef LPSTR   OUTLPSTR;
                     68: typedef LPWSTR  OUTLPWSTR;
                     69: #ifdef UNICODE
                     70: #define OUTLPTSTR OUTLPWSTR
                     71: #else
                     72: #define OUTLPTSTR OUTLPSTR
                     73: #endif // UNICODE
                     74: typedef HWND HWNDIA;
                     75: typedef DWORD GSPOLY;
                     76: typedef LPSTR CHNGMENUPOLY;
                     77: typedef LPSTR   MENUPOLYA;
                     78: typedef LPWSTR  MENUPOLYW;
                     79: #ifdef UNICODE
                     80: #define MENUPOLY MENUPOLYW
                     81: #else
                     82: #define MENUPOLY MENUPOLYA
                     83: #endif // UNICODE
                     84: typedef PVOID LPKEYSTATE;
                     85: typedef PVOID OUTLPKEYSTATE;
                     86: #ifdef THANKS
                     87: typedef PUSHORT OUTP2CHARS;
                     88: #else
                     89: typedef PVOID OUTP2CHARS;
                     90: #endif
                     91: 
                     92: typedef LONG (APIENTRY *WNDPROC)(HWND, UINT, DWORD, LONG);
                     93: 
                     94: #define MAKEINTRESOURCE(i)  (LPSTR)((DWORD)((WORD)(i)))
                     95: 
                     96: #ifndef NORESOURCE
                     97: 
                     98: /* Predefined Resource Types */
                     99: #define RT_CURSOR           MAKEINTRESOURCE(1)
                    100: #define RT_BITMAP           MAKEINTRESOURCE(2)
                    101: #define RT_ICON             MAKEINTRESOURCE(3)
                    102: #define RT_MENU             MAKEINTRESOURCE(4)
                    103: #define RT_DIALOG           MAKEINTRESOURCE(5)
                    104: #define RT_STRING           MAKEINTRESOURCE(6)
                    105: #define RT_FONTDIR          MAKEINTRESOURCE(7)
                    106: #define RT_FONT             MAKEINTRESOURCE(8)
                    107: #define RT_ACCELERATOR      MAKEINTRESOURCE(9)
                    108: #define RT_RCDATA           MAKEINTRESOURCE(10)
                    109: #define RT_MESSAGETABLE     MAKEINTRESOURCE(11)
                    110: 
                    111: #define DIFFERENCE  11
                    112: 
                    113: /* NOTE: if any new resource types are introduced above this point, then the
                    114: ** value of DIFFERENCE must be changed.
                    115: ** (RT_GROUP_CURSOR - RT_CURSOR) must always be equal to DIFFERENCE
                    116: ** (RT_GROUP_ICON - RT_ICON) must always be equal to DIFFERENCE
                    117: */
                    118: #define RT_GROUP_CURSOR     MAKEINTRESOURCE((DWORD)RT_CURSOR + DIFFERENCE)
                    119: /* The value RT_BITMAP+DIFFERENCE (13) is intentionally unused */
                    120: #define RT_GROUP_ICON       MAKEINTRESOURCE((DWORD)RT_ICON + DIFFERENCE)
                    121: /* The value 15 is unused/obsolete */
                    122: #define RT_VERSION          MAKEINTRESOURCE(16)
                    123: 
                    124: #endif /* NORESOURCE */
                    125: 
                    126: int APIENTRY wvsprintf(LPSTR, LPSTR, LPSTR);
                    127: int cdecl wsprintf(LPSTR, LPSTR, ...);
                    128: 
                    129: #ifndef NOSCROLL
                    130: 
                    131: /* Scroll Bar Constants */
                    132: #define SB_HORZ             0
                    133: #define SB_VERT             1
                    134: #define SB_CTL              2
                    135: #define SB_BOTH             3
                    136: 
                    137: /* Scroll Bar Commands */
                    138: #define SB_LINEUP           0
                    139: #define SB_LINEDOWN         1
                    140: #define SB_PAGEUP           2
                    141: #define SB_PAGEDOWN         3
                    142: #define SB_THUMBPOSITION    4
                    143: #define SB_THUMBTRACK       5
                    144: #define SB_TOP              6
                    145: #define SB_BOTTOM           7
                    146: #define SB_ENDSCROLL        8
                    147: 
                    148: #endif /* NOSCROLL */
                    149: 
                    150: #ifndef NOSHOWWINDOW
                    151: 
                    152: /* ShowWindow() Commands */
                    153: #define SW_HIDE             0
                    154: #define SW_SHOWNORMAL       1
                    155: #define SW_NORMAL           1
                    156: #define SW_SHOWMINIMIZED    2
                    157: #define SW_SHOWMAXIMIZED    3
                    158: #define SW_MAXIMIZE         3
                    159: #define SW_SHOWNOACTIVATE   4
                    160: #define SW_SHOW             5
                    161: #define SW_MINIMIZE         6
                    162: #define SW_SHOWMINNOACTIVE  7
                    163: #define SW_SHOWNA           8
                    164: #define SW_RESTORE          9
                    165: #define SW_SHOWDEFAULT      10
                    166: 
                    167: /* Old ShowWindow() Commands */
                    168: #define HIDE_WINDOW         0
                    169: #define SHOW_OPENWINDOW     1
                    170: #define SHOW_ICONWINDOW     2
                    171: #define SHOW_FULLSCREEN     3
                    172: #define SHOW_OPENNOACTIVATE 4
                    173: 
                    174: /* Identifiers for the WM_SHOWWINDOW message */
                    175: #define SW_PARENTCLOSING    1
                    176: #define SW_OTHERZOOM        2
                    177: #define SW_PARENTOPENING    3
                    178: #define SW_OTHERUNZOOM      4
                    179: 
                    180: #endif /* NOSHOWWINDOW */
                    181: 
                    182: #ifndef NOVIRTUALKEYCODES
                    183: 
                    184: /* Virtual Keys, Standard Set */
                    185: #define VK_LBUTTON        0x01
                    186: #define VK_RBUTTON        0x02
                    187: #define VK_CANCEL         0x03
                    188: #define VK_MBUTTON        0x04    /* NOT contiguous with L & RBUTTON */
                    189: 
                    190: #define VK_BACK           0x08
                    191: #define VK_TAB            0x09
                    192: 
                    193: #define VK_CLEAR          0x0C
                    194: #define VK_RETURN         0x0D
                    195: 
                    196: #define VK_SHIFT          0x10
                    197: #define VK_CONTROL        0x11
                    198: #define VK_MENU           0x12
                    199: #define VK_PAUSE          0x13
                    200: #define VK_CAPITAL        0x14
                    201: 
                    202: #define VK_ESCAPE         0x1B
                    203: 
                    204: #define VK_SPACE          0x20
                    205: #define VK_PRIOR          0x21
                    206: #define VK_NEXT           0x22
                    207: #define VK_END            0x23
                    208: #define VK_HOME           0x24
                    209: #define VK_LEFT           0x25
                    210: #define VK_UP             0x26
                    211: #define VK_RIGHT          0x27
                    212: #define VK_DOWN           0x28
                    213: #define VK_SELECT         0x29
                    214: #define VK_PRINT          0x2A
                    215: #define VK_EXECUTE        0x2B
                    216: #define VK_SNAPSHOT       0x2C
                    217: /* #define VK_COPY        0x2C not used by keyboards. */
                    218: #define VK_INSERT         0x2D
                    219: #define VK_DELETE         0x2E
                    220: #define VK_HELP           0x2F
                    221: 
                    222: /* VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
                    223: /* VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
                    224: 
                    225: #define VK_NUMPAD0        0x60
                    226: #define VK_NUMPAD1        0x61
                    227: #define VK_NUMPAD2        0x62
                    228: #define VK_NUMPAD3        0x63
                    229: #define VK_NUMPAD4        0x64
                    230: #define VK_NUMPAD5        0x65
                    231: #define VK_NUMPAD6        0x66
                    232: #define VK_NUMPAD7        0x67
                    233: #define VK_NUMPAD8        0x68
                    234: #define VK_NUMPAD9        0x69
                    235: #define VK_MULTIPLY       0x6A
                    236: #define VK_ADD            0x6B
                    237: #define VK_SEPARATOR      0x6C
                    238: #define VK_SUBTRACT       0x6D
                    239: #define VK_DECIMAL        0x6E
                    240: #define VK_DIVIDE         0x6F
                    241: #define VK_F1             0x70
                    242: #define VK_F2             0x71
                    243: #define VK_F3             0x72
                    244: #define VK_F4             0x73
                    245: #define VK_F5             0x74
                    246: #define VK_F6             0x75
                    247: #define VK_F7             0x76
                    248: #define VK_F8             0x77
                    249: #define VK_F9             0x78
                    250: #define VK_F10            0x79
                    251: #define VK_F11            0x7A
                    252: #define VK_F12            0x7B
                    253: #define VK_F13            0x7C
                    254: #define VK_F14            0x7D
                    255: #define VK_F15            0x7E
                    256: #define VK_F16            0x7F
                    257: #define VK_F17            0x80
                    258: #define VK_F18            0x81
                    259: #define VK_F19            0x82
                    260: #define VK_F20            0x83
                    261: #define VK_F21            0x84
                    262: #define VK_F22            0x85
                    263: #define VK_F23            0x86
                    264: #define VK_F24            0x87
                    265: 
                    266: #define VK_NUMLOCK        0x90
                    267: 
                    268: /*
                    269:  * VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.
                    270:  * Used only as parameters to GetAsyncKeyState() and GetKeyState().
                    271:  * No other API or message will distinguish left and right keys in this way.
                    272:  */
                    273: #define VK_LSHIFT         0xA0
                    274: #define VK_RSHIFT         0xA1
                    275: #define VK_LCONTROL       0xA2
                    276: #define VK_RCONTROL       0xA3
                    277: #define VK_LMENU          0xA4
                    278: #define VK_RMENU          0xA5
                    279: 
                    280: #define VK_ATTN           0xF6
                    281: #define VK_CRSEL          0xF7
                    282: #define VK_EXSEL          0xF8
                    283: #define VK_EREOF          0xF9
                    284: #define VK_PLAY           0xFA
                    285: #define VK_ZOOM           0xFB
                    286: #define VK_NONAME         0xFC
                    287: #define VK_PA1            0xFD
                    288: #define VK_OEM_CLEAR      0xFE
                    289: 
                    290: #endif /* NOVIRTUALKEYCODES */
                    291: 
                    292: #ifndef NOWH
                    293: 
                    294: /* SetWindowsHook() codes */
                    295: #define WH_MSGFILTER        (-1)
                    296: #define WH_JOURNALRECORD    0
                    297: #define WH_JOURNALPLAYBACK  1
                    298: #define WH_KEYBOARD         2
                    299: #define WH_GETMESSAGE       3
                    300: #define WH_CALLWNDPROC      4
                    301: #define WH_CBT              5
                    302: #define WH_SYSMSGFILTER     6
                    303: #define WH_MOUSE            7
                    304: #define WH_HARDWARE         8
                    305: #define WH_DEBUG            9
                    306: 
                    307: 
                    308: /* Hook Codes */
                    309: #define HC_LPLPFNNEXT       (-2)
                    310: #define HC_LPFNNEXT         (-1)
                    311: #define HC_ACTION           0
                    312: #define HC_GETNEXT          1
                    313: #define HC_SKIP             2
                    314: #define HC_NOREM            3
                    315: #define HC_NOREMOVE         3
                    316: #define HC_SYSMODALON       4
                    317: #define HC_SYSMODALOFF      5
                    318: 
                    319: /* CBT Hook Codes */
                    320: #define HCBT_MOVESIZE       0
                    321: #define HCBT_MINMAX         1
                    322: #define HCBT_QS             2
                    323: #define HCBT_CREATEWND      3
                    324: #define HCBT_DESTROYWND     4
                    325: #define HCBT_ACTIVATE       5
                    326: #define HCBT_CLICKSKIPPED   6
                    327: #define HCBT_KEYSKIPPED     7
                    328: #define HCBT_SYSCOMMAND     8
                    329: #define HCBT_SETFOCUS       9
                    330: 
                    331: /*
                    332:  * HCBT_CREATEWND parameters pointed to by lParam
                    333:  */
                    334: typedef struct tagCBT_CREATEWNDA
                    335: {
                    336:     struct tagCREATESTRUCTA *lpcs;
                    337:     HWND           hwndInsertAfter;
                    338: } CBT_CREATEWNDA, *LPCBT_CREATEWNDA;
                    339: /*
                    340:  * HCBT_CREATEWND parameters pointed to by lParam
                    341:  */
                    342: typedef struct tagCBT_CREATEWNDW
                    343: {
                    344:     struct tagCREATESTRUCTW *lpcs;
                    345:     HWND           hwndInsertAfter;
                    346: } CBT_CREATEWNDW, *LPCBT_CREATEWNDW;
                    347: #ifdef UNICODE
                    348: #define CBT_CREATEWND CBT_CREATEWNDW
                    349: #define LPCBT_CREATEWND LPCBT_CREATEWNDW
                    350: #else
                    351: #define CBT_CREATEWND CBT_CREATEWNDA
                    352: #define LPCBT_CREATEWND LPCBT_CREATEWNDA
                    353: #endif // UNICODE
                    354: 
                    355: /* WH_MSGFILTER Filter Proc Codes */
                    356: #define MSGF_DIALOGBOX      0
                    357: #define MSGF_MESSAGEBOX     1
                    358: #define MSGF_MENU           2
                    359: #define MSGF_MOVE           3
                    360: #define MSGF_SIZE           4
                    361: #define MSGF_SCROLLBAR      5
                    362: #define MSGF_NEXTWINDOW     6
                    363: 
                    364: /* Window Manager Hook Codes */
                    365: #define WC_INIT             1
                    366: #define WC_SWP              2
                    367: #define WC_DEFWINDOWPROC    3
                    368: #define WC_MINMAX           4
                    369: #define WC_MOVE             5
                    370: #define WC_SIZE             6
                    371: #define WC_DRAWCAPTION      7
                    372: 
                    373: /* Message Structure used in Journaling */
                    374: typedef struct tagEVENTMSG {
                    375:     DWORD    message;
                    376:     DWORD    paramL;
                    377:     DWORD    paramH;
                    378:     DWORD   time;
                    379: } EVENTMSG, *PEVENTMSGMSG, NEAR *NPEVENTMSGMSG, FAR *LPEVENTMSGMSG;
                    380: 
                    381: typedef struct tagEVENTMSG *PEVENTMSG, NEAR *NPEVENTMSG, FAR *LPEVENTMSG;
                    382: 
                    383: /* Message structure used by WH_CALLWNDPROC */
                    384: typedef struct tagCWPSTRUCT {
                    385:     LONG    lParam;
                    386:     DWORD   wParam;
                    387:     DWORD    message;
                    388:     HWND    hwnd;
                    389: } CWPSTRUCT, *PCWPSTRUCT, NEAR *NPCWPSTRUCT, FAR *LPCWPSTRUCT;
                    390: 
                    391: /* Structure used by WH_DEBUG */
                    392: typedef struct tagDEBUGHOOKSTRUCT {
                    393:     DWORD   idThread;
                    394:     DWORD   reserved;
                    395:     DWORD   lParam;
                    396:     DWORD   wParam;
                    397:     int     nCode;
                    398: } DEBUGHOOKSTRUCT, *PDEBUGHOOKSTRUCT, NEAR *NPDEBUGHOOKSTRUCT,
                    399:         FAR *LPDEBUGHOOKSTRUCT;
                    400: 
                    401: typedef struct tagMOUSEHOOKSTRUCT {
                    402:     POINT   point;
                    403:     HWND    hWnd;
                    404:     DWORD    wHitTestCode;
                    405:     DWORD   dwExtraInfo;
                    406: } MOUSEHOOKSTRUCT, FAR *LPMOUSEHOOKSTRUCT, *PMOUSEHOOKSTRUCT;
                    407: #endif /* NOWH */
                    408: 
                    409: #ifndef NODESKTOP
                    410: 
                    411: /*
                    412:  * Desktop-specific access flags
                    413:  */
                    414: #define DESKTOP_ENUMWINDOWS         0x0001L
                    415: #define DESKTOP_CREATEWINDOW        0x0002L
                    416: #define DESKTOP_CREATEMENU          0x0004L
                    417: #define DESKTOP_HOOKCONTROL         0x0008L
                    418: #define DESKTOP_JOURNALRECORD       0x0010L
                    419: #define DESKTOP_JOURNALPLAYBACK     0x0020L
                    420: #define DESKTOP_ENUMERATE           0x0040L
                    421: 
                    422: /*
                    423:  * Desktop flags
                    424:  */
                    425: #define DESKF_SAVEBITS              0x0001L
                    426: #define DESKF_TEXTMODE              0x0002L
                    427: 
                    428: typedef struct _DESKATTRS {
                    429:     DWORD cb;
                    430:     DWORD cx;
                    431:     DWORD cy;
                    432:     DWORD cBitsPixel;
                    433:     DWORD dwFlags;
                    434: } DESKATTRS, *PDESKATTRS, NEAR *NPDESKATTRS, FAR *LPDESKATTRS;
                    435: 
                    436: BOOL
                    437: APIENTRY CRITICAL XXX
                    438: CreateDesktopA(
                    439:     IN LPSTR,
                    440:     IN LPSTR,
                    441:     IN LPDESKATTRS
                    442:     );
                    443: BOOL
                    444: APIENTRY CRITICAL XXX
                    445: CreateDesktopW(
                    446:     IN LPWSTR,
                    447:     IN LPWSTR,
                    448:     IN LPDESKATTRS
                    449:     );
                    450: #ifdef UNICODE
                    451: #define CreateDesktop CreateDesktopW
                    452: #else
                    453: #define CreateDesktop CreateDesktopA
                    454: #endif // !UNICODE
                    455: 
                    456: HDESK
                    457: APIENTRY CRITICAL XXX
                    458: OpenDesktopA(
                    459:     IN LPSTR,
                    460:     IN DWORD
                    461:     );
                    462: HDESK
                    463: APIENTRY CRITICAL XXX
                    464: OpenDesktopW(
                    465:     IN LPWSTR,
                    466:     IN DWORD
                    467:     );
                    468: #ifdef UNICODE
                    469: #define OpenDesktop OpenDesktopW
                    470: #else
                    471: #define OpenDesktop OpenDesktopA
                    472: #endif // !UNICODE
                    473: 
                    474: BOOL APIENTRY CRITICAL XXX SwitchDesktop(IN HDESK);
                    475: BOOL APIENTRY CRITICAL SetThreadDesktop(IN HDESK);
                    476: HDESK APIENTRY CRITICAL GetThreadDesktop(IN DWORD);
                    477: HDESK APIENTRY CRITICAL GetInputDesktop(VOID);
                    478: BOOL APIENTRY CRITICAL XXX CloseDesktop(IN HDESK);
                    479: 
                    480: BOOL
                    481: APIENTRY CRITICAL XXX
                    482: EnumDesktopsA(
                    483:     IN FARPROC,
                    484:     IN LONG
                    485:     );
                    486: BOOL
                    487: APIENTRY CRITICAL XXX
                    488: EnumDesktopsW(
                    489:     IN FARPROC,
                    490:     IN LONG
                    491:     );
                    492: #ifdef UNICODE
                    493: #define EnumDesktops EnumDesktopsW
                    494: #else
                    495: #define EnumDesktops EnumDesktopsA
                    496: #endif // !UNICODE
                    497: 
                    498: UINT
                    499: APIENTRY CRITICAL
                    500: GetDesktopAttrsA(
                    501:     IN HDESK,
                    502:     NEXTCOUNT IN OUT OUTLPSTR,
                    503:     IN UINT,
                    504:     OUT LPDESKATTRS OPTIONAL
                    505:     );
                    506: UINT
                    507: APIENTRY CRITICAL
                    508: GetDesktopAttrsW(
                    509:     IN HDESK,
                    510:     NEXTCOUNT IN OUT OUTLPWSTR,
                    511:     IN UINT,
                    512:     OUT LPDESKATTRS OPTIONAL
                    513:     );
                    514: #ifdef UNICODE
                    515: #define GetDesktopAttrs GetDesktopAttrsW
                    516: #else
                    517: #define GetDesktopAttrs GetDesktopAttrsA
                    518: #endif // !UNICODE
                    519: 
                    520: UINT
                    521: APIENTRY CRITICAL
                    522: GetDesktopTypesA(
                    523:     IN LPSTR,
                    524:     NEXTCOUNT OUT LPDESKATTRS OPTIONAL,
                    525:     IN UINT
                    526:     );
                    527: UINT
                    528: APIENTRY CRITICAL
                    529: GetDesktopTypesW(
                    530:     IN LPWSTR,
                    531:     NEXTCOUNT OUT LPDESKATTRS OPTIONAL,
                    532:     IN UINT
                    533:     );
                    534: #ifdef UNICODE
                    535: #define GetDesktopTypes GetDesktopTypesW
                    536: #else
                    537: #define GetDesktopTypes GetDesktopTypesA
                    538: #endif // !UNICODE
                    539: 
                    540: BOOL
                    541: APIENTRY CRITICAL XXX
                    542: EnumDisplayDevicesA(
                    543:     IN FARPROC,
                    544:     IN LONG
                    545:     );
                    546: BOOL
                    547: APIENTRY CRITICAL XXX
                    548: EnumDisplayDevicesW(
                    549:     IN FARPROC,
                    550:     IN LONG
                    551:     );
                    552: #ifdef UNICODE
                    553: #define EnumDisplayDevices EnumDisplayDevicesW
                    554: #else
                    555: #define EnumDisplayDevices EnumDisplayDevicesA
                    556: #endif // !UNICODE
                    557: 
                    558: #endif  /* NODESKTOP */
                    559: 
                    560: #ifndef NOWINDOWSTATION
                    561: 
                    562: /*
                    563:  * Windowstation-specific access flags
                    564:  */
                    565: #define WINSTA_ENUMDESKTOPS         0x0001L
                    566: #define WINSTA_READATTRIBUTES       0x0002L
                    567: #define WINSTA_ACCESSCLIPBOARD      0x0004L
                    568: #define WINSTA_CREATEDESKTOP        0x0008L
                    569: #define WINSTA_WRITEATTRIBUTES      0x0010L
                    570: #define WINSTA_ACCESSGLOBALATOMS    0x0020L
                    571: #define WINSTA_EXITWINDOWS          0x0040L
                    572: #define WINSTA_ENUMERATE            0x0100L
                    573: #define WINSTA_READSCREEN           0x0200L
                    574: 
                    575: typedef struct _WINSTAATTRS {
                    576:     DWORD cb;
                    577: } WINSTAATTRS, *PWINSTAATTRS, NEAR *NPWINSTAATTRS, FAR *LPWINSTAATTRS;
                    578: 
                    579: HWINSTA
                    580: APIENTRY CRITICAL
                    581: OpenWindowStationA(
                    582:     IN LPSTR,
                    583:     IN DWORD
                    584:     );
                    585: HWINSTA
                    586: APIENTRY CRITICAL
                    587: OpenWindowStationW(
                    588:     IN LPWSTR,
                    589:     IN DWORD
                    590:     );
                    591: #ifdef UNICODE
                    592: #define OpenWindowStation OpenWindowStationW
                    593: #else
                    594: #define OpenWindowStation OpenWindowStationA
                    595: #endif // !UNICODE
                    596: 
                    597: BOOL APIENTRY CRITICAL SetProcessWindowStation(IN HWINSTA);
                    598: HWINSTA APIENTRY CRITICAL GetProcessWindowStation(VOID);
                    599: BOOL APIENTRY CRITICAL CloseWindowStation(IN HWINSTA);
                    600: BOOL APIENTRY CRITICAL XXX EnumWindowStations(IN FARPROC, IN LONG);
                    601: 
                    602: UINT
                    603: APIENTRY CRITICAL
                    604: GetWindowStationAttrsA(
                    605:     IN HWINSTA,
                    606:     NEXTCOUNT IN OUT OUTLPSTR,
                    607:     IN UINT,
                    608:     OUT LPWINSTAATTRS
                    609:     );
                    610: UINT
                    611: APIENTRY CRITICAL
                    612: GetWindowStationAttrsW(
                    613:     IN HWINSTA,
                    614:     NEXTCOUNT IN OUT OUTLPWSTR,
                    615:     IN UINT,
                    616:     OUT LPWINSTAATTRS
                    617:     );
                    618: #ifdef UNICODE
                    619: #define GetWindowStationAttrs GetWindowStationAttrsW
                    620: #else
                    621: #define GetWindowStationAttrs GetWindowStationAttrsA
                    622: #endif // !UNICODE
                    623: 
                    624: #endif  /* NOWINDOWSTATION */
                    625: 
                    626: #ifndef NOSECURITY
                    627: 
                    628: /*
                    629:  * window-specific access flags
                    630:  */
                    631: #define WIN_ACCESSWINDOW            0x0001L
                    632: #define WIN_ENUMERATE               0x0002L
                    633: 
                    634: /*
                    635:  * menu-specific access flags
                    636:  */
                    637: #define MENU_ACCESSMENU             0x0001L
                    638: 
                    639: BOOL APIENTRY CRITICAL SetObjectSecurity(IN HANDLE, IN PSECURITY_INFORMATION,
                    640:         IN PSECURITY_DESCRIPTOR);
                    641: BOOL APIENTRY CRITICAL GetObjectSecurity(IN HANDLE, IN PSECURITY_INFORMATION,
                    642:         NEXTCOUNT OUT PSECURITY_DESCRIPTOR, IN DWORD, OUT LPDWORD);
                    643: 
                    644: #endif  /* NOSECURITY */
                    645: 
                    646: typedef struct tagWNDCLASSA {
                    647:     DWORD       style;
                    648:     WNDPROC     lpfnWndProc;
                    649:     int         cbClsExtra;
                    650:     int         cbWndExtra;
                    651:     HANDLE      hInstance;
                    652:     HICON       hIcon;
                    653:     HCURSOR     hCursor;
                    654:     HBRUSH      hbrBackground;
                    655:     LPSTRID      lpszMenuName;
                    656:     LPSTRID      lpszClassName;
                    657: } WNDCLASSA, *PWNDCLASSA, NEAR *NPWNDCLASSA, FAR *LPWNDCLASSA;
                    658: typedef struct tagWNDCLASSW {
                    659:     DWORD       style;
                    660:     WNDPROC     lpfnWndProc;
                    661:     int         cbClsExtra;
                    662:     int         cbWndExtra;
                    663:     HANDLE      hInstance;
                    664:     HICON       hIcon;
                    665:     HCURSOR     hCursor;
                    666:     HBRUSH      hbrBackground;
                    667:     LPWSTRID     lpszMenuName;
                    668:     LPWSTRID     lpszClassName;
                    669: } WNDCLASSW, *PWNDCLASSW, NEAR *NPWNDCLASSW, FAR *LPWNDCLASSW;
                    670: #ifdef UNICODE
                    671: #define WNDCLASS WNDCLASSW
                    672: #define PWNDCLASS PWNDCLASSW
                    673: #define NPWNDCLASS NPWNDCLASSW
                    674: #define LPWNDCLASS LPWNDCLASSW
                    675: #else
                    676: #define WNDCLASS WNDCLASSA
                    677: #define PWNDCLASS PWNDCLASSA
                    678: #define NPWNDCLASS NPWNDCLASSA
                    679: #define LPWNDCLASS LPWNDCLASSA
                    680: #endif // UNICODE
                    681: 
                    682: #ifndef NOMSG
                    683: 
                    684: /* Message structure */
                    685: typedef struct tagMSG {
                    686:     HWND        hwnd;
                    687:     DWORD       message;
                    688:     DWORD       wParam;
                    689:     LONG        lParam;
                    690:     DWORD       time;
                    691:     POINT       pt;
                    692: } MSG, *PMSG, NEAR *NPMSG, FAR *LPMSG;
                    693: 
                    694: #define POINTSTOPOINT(pt,pts)  {(pt).x = (SHORT)LOWORD(pts); \
                    695:                                 (pt).y = (SHORT)HIWORD(pts);}
                    696: #define POINTTOPOINTS(pt)      (MAKELONG((short)((pt).x), (short)((pt).y)))
                    697: 
                    698: 
                    699: #endif /* NOMSG */
                    700: 
                    701: #ifndef NOWINOFFSETS
                    702: 
                    703: /* Window field offsets for GetWindowLong() and GetWindowWord() */
                    704: #define GWL_WNDPROC         (-4)
                    705: #define GWL_HINSTANCE       (-6)
                    706: #define GWL_HWNDPARENT      (-8)
                    707: #define GWL_STYLE           (-16)
                    708: #define GWL_EXSTYLE         (-20)
                    709: #define GWL_USERDATA        (-21)
                    710: #define GWL_ID              (-12)
                    711: 
                    712: /* Class field offsets for GetClassLong() and GetClassWord() */
                    713: #define GCL_MENUNAME        (-8)
                    714: #define GCL_HBRBACKGROUND   (-10)
                    715: #define GCL_HCURSOR         (-12)
                    716: #define GCL_HICON           (-14)
                    717: #define GCL_HMODULE         (-16)
                    718: #define GCL_CBWNDEXTRA      (-18)
                    719: #define GCL_CBCLSEXTRA      (-20)
                    720: #define GCL_WNDPROC         (-24)
                    721: #define GCL_STYLE           (-26)
                    722: 
                    723: #endif /* NOWINOFFSETS */
                    724: 
                    725: #ifndef NOWINMESSAGES
                    726: 
                    727: /* Window Messages */
                    728: #define WM_NULL             0x0000
                    729: #define WM_CREATE           0x0001
                    730: #define WM_DESTROY          0x0002
                    731: #define WM_MOVE             0x0003
                    732: #define WM_SIZE             0x0005
                    733: #define WM_ACTIVATE         0x0006
                    734: #define WM_SETFOCUS         0x0007
                    735: #define WM_KILLFOCUS        0x0008
                    736: #define WM_ENABLE           0x000A
                    737: #define WM_SETREDRAW        0x000B
                    738: #define WM_SETTEXT          0x000C
                    739: #define WM_GETTEXT          0x000D
                    740: #define WM_GETTEXTLENGTH    0x000E
                    741: #define WM_PAINT            0x000F
                    742: #define WM_CLOSE            0x0010
                    743: #define WM_QUERYENDSESSION  0x0011
                    744: #define WM_QUIT             0x0012
                    745: #define WM_QUERYOPEN        0x0013
                    746: #define WM_ERASEBKGND       0x0014
                    747: #define WM_SYSCOLORCHANGE   0x0015
                    748: #define WM_ENDSESSION       0x0016
                    749: #define WM_SHOWWINDOW       0x0018
                    750: #define WM_WININICHANGE     0x001A
                    751: #define WM_DEVMODECHANGE    0x001B
                    752: #define WM_ACTIVATEAPP      0x001C
                    753: #define WM_FONTCHANGE       0x001D
                    754: #define WM_TIMECHANGE       0x001E
                    755: #define WM_CANCELMODE       0x001F
                    756: #define WM_SETCURSOR        0x0020
                    757: #define WM_MOUSEACTIVATE    0x0021
                    758: #define WM_CHILDACTIVATE    0x0022
                    759: #define WM_QUEUESYNC        0x0023
                    760: #define WM_GETMINMAXINFO    0x0024
                    761: #define WM_PAINTICON        0x0026
                    762: #define WM_ICONERASEBKGND   0x0027
                    763: #define WM_NEXTDLGCTL       0x0028
                    764: #define WM_SPOOLERSTATUS    0x002A
                    765: #define WM_DRAWITEM         0x002B
                    766: #define WM_MEASUREITEM      0x002C
                    767: #define WM_DELETEITEM       0x002D
                    768: #define WM_VKEYTOITEM       0x002E
                    769: #define WM_CHARTOITEM       0x002F
                    770: #define WM_SETFONT          0x0030
                    771: #define WM_GETFONT          0x0031
                    772: 
                    773: 
                    774: #define WM_QUERYDRAGICON    0x0037
                    775: 
                    776: #define WM_COMPAREITEM      0x0039
                    777: #define WM_COMPACTING       0x0041
                    778: 
                    779: #define WM_OTHERWINDOWCREATED   0x0042
                    780: #define WM_OTHERWINDOWDESTROYED 0x0043
                    781: #define WM_COMMNOTIFY           0x0044
                    782: #define WM_HOTKEYEVENT          0x0045
                    783: #define WM_WINDOWPOSCHANGING    0x0046
                    784: #define WM_WINDOWPOSCHANGED     0x0047
                    785: #define WM_POWER                0x0048
                    786: 
                    787: #define WM_NCCREATE         0x0081
                    788: #define WM_NCDESTROY        0x0082
                    789: #define WM_NCCALCSIZE       0x0083
                    790: #define WM_NCHITTEST        0x0084
                    791: #define WM_NCPAINT          0x0085
                    792: #define WM_NCACTIVATE       0x0086
                    793: #define WM_GETDLGCODE       0x0087
                    794: #define WM_NCMOUSEMOVE      0x00A0
                    795: #define WM_NCLBUTTONDOWN    0x00A1
                    796: #define WM_NCLBUTTONUP      0x00A2
                    797: #define WM_NCLBUTTONDBLCLK  0x00A3
                    798: #define WM_NCRBUTTONDOWN    0x00A4
                    799: #define WM_NCRBUTTONUP      0x00A5
                    800: #define WM_NCRBUTTONDBLCLK  0x00A6
                    801: #define WM_NCMBUTTONDOWN    0x00A7
                    802: #define WM_NCMBUTTONUP      0x00A8
                    803: #define WM_NCMBUTTONDBLCLK  0x00A9
                    804: 
                    805: #define WM_KEYFIRST         0x0100
                    806: #define WM_KEYDOWN          0x0100
                    807: #define WM_KEYUP            0x0101
                    808: #define WM_CHAR             0x0102
                    809: #define WM_DEADCHAR         0x0103
                    810: #define WM_SYSKEYDOWN       0x0104
                    811: #define WM_SYSKEYUP         0x0105
                    812: #define WM_SYSCHAR          0x0106
                    813: #define WM_SYSDEADCHAR      0x0107
                    814: #define WM_KEYLAST          0x0108
                    815: 
                    816: #define WM_INITDIALOG       0x0110
                    817: #define WM_COMMAND          0x0111
                    818: #define WM_SYSCOMMAND       0x0112
                    819: #define WM_TIMER            0x0113
                    820: #define WM_HSCROLL          0x0114
                    821: #define WM_VSCROLL          0x0115
                    822: #define WM_INITMENU         0x0116
                    823: #define WM_INITMENUPOPUP    0x0117
                    824: #define WM_MENUSELECT       0x011F
                    825: #define WM_MENUCHAR         0x0120
                    826: #define WM_ENTERIDLE        0x0121
                    827: 
                    828: #define WM_CTLCOLORMSGBOX       0x0132
                    829: #define WM_CTLCOLOREDIT         0x0133
                    830: #define WM_CTLCOLORLISTBOX      0x0134
                    831: #define WM_CTLCOLORBTN          0x0135
                    832: #define WM_CTLCOLORDLG          0x0136
                    833: #define WM_CTLCOLORSCROLLBAR    0x0137
                    834: #define WM_CTLCOLORSTATIC       0x0138
                    835: 
                    836: #define WM_MOUSEFIRST       0x0200
                    837: #define WM_MOUSEMOVE        0x0200
                    838: #define WM_LBUTTONDOWN      0x0201
                    839: #define WM_LBUTTONUP        0x0202
                    840: #define WM_LBUTTONDBLCLK    0x0203
                    841: #define WM_RBUTTONDOWN      0x0204
                    842: #define WM_RBUTTONUP        0x0205
                    843: #define WM_RBUTTONDBLCLK    0x0206
                    844: #define WM_MBUTTONDOWN      0x0207
                    845: #define WM_MBUTTONUP        0x0208
                    846: #define WM_MBUTTONDBLCLK    0x0209
                    847: #define WM_MOUSELAST        0x0209
                    848: 
                    849: #define WM_PARENTNOTIFY     0x0210
                    850: #define WM_MDICREATE        0x0220
                    851: #define WM_MDIDESTROY       0x0221
                    852: #define WM_MDIACTIVATE      0x0222
                    853: #define WM_MDIRESTORE       0x0223
                    854: #define WM_MDINEXT          0x0224
                    855: #define WM_MDIMAXIMIZE      0x0225
                    856: #define WM_MDITILE          0x0226
                    857: #define WM_MDICASCADE       0x0227
                    858: #define WM_MDIICONARRANGE   0x0228
                    859: #define WM_MDIGETACTIVE     0x0229
                    860: #define WM_MDISETMENU       0x0230
                    861: #define WM_DROPFILES        0x0233
                    862: 
                    863: #define WM_CUT              0x0300
                    864: #define WM_COPY             0x0301
                    865: #define WM_PASTE            0x0302
                    866: #define WM_CLEAR            0x0303
                    867: #define WM_UNDO             0x0304
                    868: #define WM_RENDERFORMAT     0x0305
                    869: #define WM_RENDERALLFORMATS 0x0306
                    870: #define WM_DESTROYCLIPBOARD 0x0307
                    871: #define WM_DRAWCLIPBOARD    0x0308
                    872: #define WM_PAINTCLIPBOARD   0x0309
                    873: #define WM_VSCROLLCLIPBOARD 0x030A
                    874: #define WM_SIZECLIPBOARD    0x030B
                    875: #define WM_ASKCBFORMATNAME  0x030C
                    876: #define WM_CHANGECBCHAIN    0x030D
                    877: #define WM_HSCROLLCLIPBOARD 0x030E
                    878: #define WM_QUERYNEWPALETTE  0x030F
                    879: #define WM_PALETTEISCHANGING 0x0310
                    880: #define WM_PALETTECHANGED   0x0311
                    881: #define WM_HOTKEY           0x0312
                    882: #define WM_SETFOREGROUND    0x0313
                    883: 
                    884: /* NOTE: All Message Numbers below 0x0400 are RESERVED. */
                    885: 
                    886: /* Private Window Messages Start Here: */
                    887: #define WM_USER             0x0400
                    888: 
                    889: #ifndef NONCMESSAGES
                    890: 
                    891: /* WM_SYNCTASK Commands */
                    892: #define ST_BEGINSWP         0
                    893: #define ST_ENDSWP           1
                    894: 
                    895: /* WinWhere() Area Codes */
                    896: #define HTERROR             (-2)
                    897: #define HTTRANSPARENT       (-1)
                    898: #define HTNOWHERE           0
                    899: #define HTCLIENT            1
                    900: #define HTCAPTION           2
                    901: #define HTSYSMENU           3
                    902: #define HTGROWBOX           4
                    903: #define HTSIZE              HTGROWBOX
                    904: #define HTMENU              5
                    905: #define HTHSCROLL           6
                    906: #define HTVSCROLL           7
                    907: #define HTREDUCE            8
                    908: #define HTZOOM              9
                    909: #define HTLEFT              10
                    910: #define HTRIGHT             11
                    911: #define HTTOP               12
                    912: #define HTTOPLEFT           13
                    913: #define HTTOPRIGHT          14
                    914: #define HTBOTTOM            15
                    915: #define HTBOTTOMLEFT        16
                    916: #define HTBOTTOMRIGHT       17
                    917: #define HTSIZEFIRST         HTLEFT
                    918: #define HTSIZELAST          HTBOTTOMRIGHT
                    919: 
                    920: #endif /* NONCMESSAGES */
                    921: 
                    922: /* WM_MOUSEACTIVATE Return Codes */
                    923: #define MA_ACTIVATE         1
                    924: #define MA_ACTIVATEANDEAT   2
                    925: #define MA_NOACTIVATE       3
                    926: #define MA_NOACTIVATEANDEAT 4
                    927: 
                    928: UINT
                    929: APIENTRY
                    930: RegisterWindowMessageA(
                    931:     IN LPSTR lpString
                    932:     );
                    933: UINT
                    934: APIENTRY
                    935: RegisterWindowMessageW(
                    936:     IN LPWSTR lpString
                    937:     );
                    938: #ifdef UNICODE
                    939: #define RegisterWindowMessage RegisterWindowMessageW
                    940: #else
                    941: #define RegisterWindowMessage RegisterWindowMessageA
                    942: #endif // !UNICODE
                    943: 
                    944: /* WM_SIZE message wParam values */
                    945: #define SIZENORMAL          0
                    946: #define SIZEICONIC          1
                    947: #define SIZEFULLSCREEN      2
                    948: #define SIZEZOOMSHOW        3
                    949: #define SIZEZOOMHIDE        4
                    950: 
                    951: /* WM_WINDOWPOSCHANGING/CHANGED struct pointed to by lParam */
                    952: typedef struct tagWINDOWPOS {
                    953:     HWND    hwnd;
                    954:     HWND    hwndInsertAfter;
                    955:     int     x;
                    956:     int     y;
                    957:     int     cx;
                    958:     int     cy;
                    959:     DWORD   flags;
                    960: } WINDOWPOS, *LPWINDOWPOS, *PWINDOWPOS;
                    961: 
                    962: /* WM_NCCALCSIZE parameter structure */
                    963: typedef struct tagNCCALCSIZE_PARAMS {
                    964:     RECT       rgrc[3];
                    965:     PWINDOWPOS lppos;
                    966: } NCCALCSIZE_PARAMS, *LPNCCALCSIZE_PARAMS;
                    967: 
                    968: /* WM_NCCALCSIZE "window valid rect" return values */
                    969: #define WVR_ALIGNTOP        0x0010
                    970: #define WVR_ALIGNLEFT       0x0020
                    971: #define WVR_ALIGNBOTTOM     0x0040
                    972: #define WVR_ALIGNRIGHT      0x0080
                    973: #define WVR_HREDRAW         0x0100
                    974: #define WVR_VREDRAW         0x0200
                    975: #define WVR_REDRAW          (WVR_HREDRAW | WVR_VREDRAW)
                    976: #define WVR_VALIDRECTS      0x0400
                    977: 
                    978: #define WVR_MINVALID        WVR_ALIGNTOP        /* ;Internal */
                    979: #define WVR_MAXVALID        WVR_VALIDRECTS      /* ;Internal */
                    980: 
                    981: #ifndef NOKEYSTATES
                    982: 
                    983: /* Key State Masks for Mouse Messages */
                    984: #define MK_LBUTTON          0x0001
                    985: #define MK_RBUTTON          0x0002
                    986: #define MK_SHIFT            0x0004
                    987: #define MK_CONTROL          0x0008
                    988: #define MK_MBUTTON          0x0010
                    989: 
                    990: #endif /* NOKEYSTATES */
                    991: 
                    992: #endif /* NOWINMESSAGES */
                    993: 
                    994: #ifndef NOWINSTYLES
                    995: 
                    996: /* Window Styles */
                    997: #define WS_OVERLAPPED       0x00000000L
                    998: #define WS_POPUP            0x80000000L
                    999: #define WS_CHILD            0x40000000L
                   1000: #define WS_MINIMIZE         0x20000000L
                   1001: #define WS_VISIBLE          0x10000000L
                   1002: #define WS_DISABLED         0x08000000L
                   1003: #define WS_CLIPSIBLINGS     0x04000000L
                   1004: #define WS_CLIPCHILDREN     0x02000000L
                   1005: #define WS_MAXIMIZE         0x01000000L
                   1006: #define WS_CAPTION          0x00C00000L     /* WS_BORDER | WS_DLGFRAME  */
                   1007: #define WS_BORDER           0x00800000L
                   1008: #define WS_DLGFRAME         0x00400000L
                   1009: #define WS_VSCROLL          0x00200000L
                   1010: #define WS_HSCROLL          0x00100000L
                   1011: #define WS_SYSMENU          0x00080000L
                   1012: #define WS_THICKFRAME       0x00040000L
                   1013: #define WS_GROUP            0x00020000L
                   1014: #define WS_TABSTOP          0x00010000L
                   1015: 
                   1016: #define WS_MINIMIZEBOX      0x00020000L
                   1017: #define WS_MAXIMIZEBOX      0x00010000L
                   1018: 
                   1019: #define WS_TILED            WS_OVERLAPPED
                   1020: #define WS_ICONIC           WS_MINIMIZE
                   1021: #define WS_SIZEBOX          WS_THICKFRAME
                   1022: 
                   1023: /* Common Window Styles */
                   1024: #define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX)
                   1025: #define WS_POPUPWINDOW      (WS_POPUP | WS_BORDER | WS_SYSMENU)
                   1026: #define WS_CHILDWINDOW      (WS_CHILD)
                   1027: 
                   1028: #define WS_TILEDWINDOW      (WS_OVERLAPPEDWINDOW)
                   1029: 
                   1030: /* Extended Window Styles */
                   1031: #define WS_EX_DLGMODALFRAME  0x00000001L
                   1032: #define WS_EX_NOPARENTNOTIFY 0x00000004L
                   1033: #define WS_EX_TOPMOST        0x00000008L
                   1034: #define WS_EX_ACCEPTFILES    0x00000010L
                   1035: #define WS_EX_TRANSPARENT    0x00000020L
                   1036: #define WS_EX_ALLEXSTYLES    (WS_EX_TRANSPARENT | WS_EX_DLGMODALFRAME | WS_EX_DRAGOBJECT | WS_EX_NOPARENTNOTIFY | WS_EX_TOPMOST | WS_EX_ACCEPTFILES) /* ;Internal */
                   1037: 
                   1038: /* Class styles */
                   1039: #define CS_VREDRAW          0x0001
                   1040: #define CS_HREDRAW          0x0002
                   1041: #define CS_KEYCVTWINDOW     0x0004
                   1042: #define CS_DBLCLKS          0x0008
                   1043:                         /*  0x0010 - reserved (see user\server\usersrv.h) */
                   1044: #define CS_OWNDC            0x0020
                   1045: #define CS_CLASSDC          0x0040
                   1046: #define CS_PARENTDC         0x0080
                   1047: #define CS_NOKEYCVT         0x0100
                   1048: #define CS_NOCLOSE          0x0200
                   1049: #define CS_SAVEBITS         0x0800
                   1050: #define CS_BYTEALIGNCLIENT  0x1000
                   1051: #define CS_BYTEALIGNWINDOW  0x2000
                   1052: #define CS_GLOBALCLASS      0x4000    /* Global window class */
                   1053: 
                   1054: #endif /* NOWINSTYLES */
                   1055: 
                   1056: #ifndef NOCLIPBOARD
                   1057: 
                   1058: /* Predefined Clipboard Formats */
                   1059: #define CF_TEXT             1
                   1060: #define CF_BITMAP           2
                   1061: #define CF_METAFILEPICT     3
                   1062: #define CF_SYLK             4
                   1063: #define CF_DIF              5
                   1064: #define CF_TIFF             6
                   1065: #define CF_OEMTEXT          7
                   1066: #define CF_DIB              8
                   1067: #define CF_PALETTE          9
                   1068: #define CF_UNICODETEXT      10
                   1069: 
                   1070: #define CF_OWNERDISPLAY     0x0080
                   1071: #define CF_DSPTEXT          0x0081
                   1072: #define CF_DSPBITMAP        0x0082
                   1073: #define CF_DSPMETAFILEPICT  0x0083
                   1074: 
                   1075: /* "Private" formats don't get GlobalFree()'d */
                   1076: #define CF_PRIVATEFIRST     0x0200
                   1077: #define CF_PRIVATELAST      0x02FF
                   1078: 
                   1079: /* "GDIOBJ" formats do get DeleteObject()'d */
                   1080: #define CF_GDIOBJFIRST      0x0300
                   1081: #define CF_GDIOBJLAST       0x03FF
                   1082: 
                   1083: #endif /* NOCLIPBOARD */
                   1084: 
                   1085: /*
                   1086:  * Defines for the fVirt field of the Accelerator table structure.
                   1087:  */
                   1088: #define FVIRTKEY  TRUE          /* Assumed to be == TRUE */
                   1089: #define FNOINVERT 0x02
                   1090: #define FSHIFT    0x04
                   1091: #define FCONTROL  0x08
                   1092: #define FALT      0x10
                   1093: 
                   1094: typedef struct tagACCEL {
                   1095:     BYTE   fVirt;               /* Also called the flags field */
                   1096:     WORD   key;
                   1097:     WORD   cmd;
                   1098: } ACCEL, *LPACCEL;
                   1099: 
                   1100: typedef struct tagPAINTSTRUCT {
                   1101:     HDC         hdc;
                   1102:     BOOL        fErase;
                   1103:     RECT        rcPaint;
                   1104:     BOOL        fRestore;
                   1105:     BOOL        fIncUpdate;
                   1106:     BYTE        rgbReserved[32];
                   1107: } PAINTSTRUCT, *PPAINTSTRUCT, *NPPAINTSTRUCT, *LPPAINTSTRUCT;
                   1108: 
                   1109: typedef struct tagCREATESTRUCTA {
                   1110:     LPVOID      lpCreateParams;
                   1111:     HANDLE      hInstance;
                   1112:     HANDLE      hMenu;
                   1113:     HWND        hwndParent;
                   1114:     int         cy;
                   1115:     int         cx;
                   1116:     int         y;
                   1117:     int         x;
                   1118:     LONG        style;
                   1119:     LPSTRNULL    lpszName;
                   1120:     LPSTRID      lpszClass;
                   1121:     DWORD       dwExStyle;
                   1122: } CREATESTRUCTA, *LPCREATESTRUCTA;
                   1123: typedef struct tagCREATESTRUCTW {
                   1124:     LPVOID      lpCreateParams;
                   1125:     HANDLE      hInstance;
                   1126:     HANDLE      hMenu;
                   1127:     HWND        hwndParent;
                   1128:     int         cy;
                   1129:     int         cx;
                   1130:     int         y;
                   1131:     int         x;
                   1132:     LONG        style;
                   1133:     LPWSTRNULL   lpszName;
                   1134:     LPWSTRID     lpszClass;
                   1135:     DWORD       dwExStyle;
                   1136: } CREATESTRUCTW, *LPCREATESTRUCTW;
                   1137: #ifdef UNICODE
                   1138: #define CREATESTRUCT CREATESTRUCTW
                   1139: #define LPCREATESTRUCT LPCREATESTRUCTW
                   1140: #else
                   1141: #define CREATESTRUCT CREATESTRUCTA
                   1142: #define LPCREATESTRUCT LPCREATESTRUCTA
                   1143: #endif // UNICODE
                   1144: 
                   1145: 
                   1146: /* Owner draw control types */
                   1147: #define ODT_MENU        1
                   1148: #define ODT_LISTBOX     2
                   1149: #define ODT_COMBOBOX    3
                   1150: #define ODT_BUTTON      4
                   1151: 
                   1152: /* Owner draw actions */
                   1153: #define ODA_DRAWENTIRE  0x0001
                   1154: #define ODA_SELECT      0x0002
                   1155: #define ODA_FOCUS       0x0004
                   1156: 
                   1157: /* Owner draw state */
                   1158: #define ODS_SELECTED    0x0001
                   1159: #define ODS_GRAYED      0x0002
                   1160: #define ODS_DISABLED    0x0004
                   1161: #define ODS_CHECKED     0x0008
                   1162: #define ODS_FOCUS       0x0010
                   1163: 
                   1164: /* MEASUREITEMSTRUCT for ownerdraw */
                   1165: typedef struct tagMEASUREITEMSTRUCT {
                   1166:     DWORD       CtlType;
                   1167:     DWORD       CtlID;
                   1168:     DWORD       itemID;
                   1169:     DWORD       itemWidth;
                   1170:     DWORD       itemHeight;
                   1171:     DWORD       itemData;
                   1172: } MEASUREITEMSTRUCT, NEAR *PMEASUREITEMSTRUCT, FAR *LPMEASUREITEMSTRUCT;
                   1173: 
                   1174: 
                   1175: /* DRAWITEMSTRUCT for ownerdraw */
                   1176: typedef struct tagDRAWITEMSTRUCT {
                   1177:     DWORD       CtlType;
                   1178:     DWORD       CtlID;
                   1179:     DWORD       itemID;
                   1180:     DWORD       itemAction;
                   1181:     DWORD       itemState;
                   1182:     HWND        hwndItem;
                   1183:     HDC         hDC;
                   1184:     RECT        rcItem;
                   1185:     DWORD       itemData;
                   1186: } DRAWITEMSTRUCT, NEAR *PDRAWITEMSTRUCT, FAR *LPDRAWITEMSTRUCT;
                   1187: 
                   1188: /* DELETEITEMSTRUCT for ownerdraw */
                   1189: typedef struct tagDELETEITEMSTRUCT {
                   1190:     DWORD      CtlType;
                   1191:     DWORD      CtlID;
                   1192:     DWORD      itemID;
                   1193:     HWND       hwndItem;
                   1194:     DWORD      itemData;
                   1195: } DELETEITEMSTRUCT, NEAR *PDELETEITEMSTRUCT, FAR *LPDELETEITEMSTRUCT;
                   1196: 
                   1197: /* COMPAREITEMSTUCT for ownerdraw sorting */
                   1198: typedef struct tagCOMPAREITEMSTRUCT {
                   1199:     DWORD       CtlType;
                   1200:     DWORD       CtlID;
                   1201:     HWND        hwndItem;
                   1202:     DWORD       itemID1;
                   1203:     DWORD       itemData1;
                   1204:     DWORD       itemID2;
                   1205:     DWORD       itemData2;
                   1206: } COMPAREITEMSTRUCT, NEAR *PCOMPAREITEMSTRUCT, FAR *LPCOMPAREITEMSTRUCT;
                   1207: 
                   1208: #ifndef NOMSG
                   1209: 
                   1210: /* Message Function Templates */
                   1211: BOOL APIENTRY CRITICAL XXX GetMessage(OUT LPMSG lpMsg,
                   1212:         IN HWNDVERBATIM hWnd OPTIONAL, IN UINT wMsgFilterMin,
                   1213:         IN UINT wMsgFilterMax);
                   1214: BOOL APIENTRY CRITICAL TranslateMessage(IN LPMSG lpMsg);
                   1215: LONG APIENTRY CRITICAL XXX DispatchMessage(IN LPMSG lpMsg);
                   1216: BOOL APIENTRY CRITICAL XXX PeekMessage(OUT LPMSG lpMsg,
                   1217:         IN HWNDVERBATIM hWnd OPTIONAL, IN UINT wMsgFilterMin,
                   1218:         IN UINT wMsgFilterMax, IN UINT wRemoveMsg);
                   1219: 
                   1220: /* PeekMessage() Options */
                   1221: #define PM_NOREMOVE         0x0000
                   1222: #define PM_REMOVE           0x0001
                   1223: #define PM_NOYIELD          0x0002
                   1224: 
                   1225: #endif /* NOMSG */
                   1226: 
                   1227: BOOL APIENTRY CRITICAL RegisterHotKey(IN HWND hwnd OPTIONAL, IN int id,
                   1228:         IN UINT fsModifiers, IN UINT vk);
                   1229: BOOL APIENTRY CRITICAL UnregisterHotKey(IN HWND hwnd OPTIONAL, IN int id);
                   1230: 
                   1231: #define MOD_ALT         0x0001
                   1232: #define MOD_CONTROL     0x0002
                   1233: #define MOD_SHIFT       0x0004
                   1234: 
                   1235: #define IDHOT_SNAPWINDOW        (-1)    /* SHIFT-PRINTSCRN  */
                   1236: #define IDHOT_SNAPDESKTOP       (-2)    /* PRINTSCRN        */
                   1237: 
                   1238: #ifdef WIN_INTERNAL
                   1239:     #ifndef LSTRING
                   1240:     #define NOLSTRING
                   1241:     #endif
                   1242:     #ifndef LFILEIO
                   1243:     #define NOLFILEIO
                   1244:     #endif
                   1245: #endif
                   1246: 
                   1247: 
                   1248: BOOL  APIENTRY CRITICAL ExitWindows(IN DWORD dwReserved, IN UINT wReturnCode);
                   1249: 
                   1250: BOOL  APIENTRY CRITICAL SwapMouseButton(IN BOOL);
                   1251: DWORD APIENTRY CRITICAL GetMessagePos(void);
                   1252: LONG  APIENTRY CRITICAL GetMessageTime(void);
                   1253: LONG  APIENTRY CRITICAL GetMessageExtraInfo(void);
                   1254: 
                   1255: LONG  APIENTRY CRITICAL XXX SendMessageA(IN HWNDFF hWnd, IN UINT wMsg,
                   1256:         IN DWORD wParam, IN LONG lParam);
                   1257: LONG  APIENTRY CRITICAL XXX SendMessageW(IN HWNDFF hWnd, IN UINT wMsg,
                   1258:         IN DWORD wParam, IN LONG lParam);
                   1259: #ifdef UNICODE
                   1260: #define SendMessage SendMessageW
                   1261: #else
                   1262: #define SendMessage SendMessageA
                   1263: #endif // !UNICODE
                   1264: BOOL  APIENTRY CRITICAL XXX SendNotifyMessage(IN HWND hwnd, IN UINT wMsg,
                   1265:         IN DWORD wParam, IN LONG lParam);
                   1266: BOOL  APIENTRY CRITICAL PostMessage(IN HWNDFF hWnd, IN UINT wMsg,
                   1267:         IN DWORD wParam, IN LONG lParam);
                   1268: BOOL  APIENTRY CRITICAL PostThreadMessage(IN DWORD idThread, IN UINT wMsg,
                   1269:         IN DWORD wParam, IN LONG lParam);
                   1270: #define PostAppMessage(idThread, wMsg, wParam, lParam)\
                   1271:         PostThreadMessage((DWORD)idThread, wMsg, wParam, lParam)
                   1272: BOOL  APIENTRY CRITICAL ReplyMessage(IN LONG);
                   1273: BOOL  APIENTRY CRITICAL XXX WaitMessage(void);
                   1274: DWORD APIENTRY WaitForInputIdle(HANDLE hProcess, DWORD dwMilliseconds);
                   1275: LONG  APIENTRY CRITICAL XXX DefWindowProcA(IN HWND hWnd, IN UINT wMsg,
                   1276:         IN DWORD wParam, IN LONG lParam);
                   1277: LONG  APIENTRY CRITICAL XXX DefWindowProcW(IN HWND hWnd, IN UINT wMsg,
                   1278:         IN DWORD wParam, IN LONG lParam);
                   1279: #ifdef UNICODE
                   1280: #define DefWindowProc DefWindowProcW
                   1281: #else
                   1282: #define DefWindowProc DefWindowProcA
                   1283: #endif // !UNICODE
                   1284: BOOL  APIENTRY CRITICAL PostQuitMessage(IN int nExitCode);
                   1285: LONG  APIENTRY CRITICAL XXX CallWindowProcA(IN WNDPROC lpPrevWndFunc,
                   1286:         IN HWND hWnd, IN UINT wMsg, IN DWORD wParam, IN LONG lParam);
                   1287: LONG  APIENTRY CRITICAL XXX CallWindowProcW(IN WNDPROC lpPrevWndFunc,
                   1288:         IN HWND hWnd, IN UINT wMsg, IN DWORD wParam, IN LONG lParam);
                   1289: #ifdef UNICODE
                   1290: #define CallWindowProc CallWindowProcW
                   1291: #else
                   1292: #define CallWindowProc CallWindowProcA
                   1293: #endif // !UNICODE
                   1294: BOOL  APIENTRY CRITICAL InSendMessage(void);
                   1295: 
                   1296: UINT APIENTRY CRITICAL GetDoubleClickTime(void);
                   1297: BOOL  APIENTRY CRITICAL SetDoubleClickTime(IN UINT);
                   1298: 
                   1299: BOOL
                   1300: APIENTRY CRITICAL
                   1301: RegisterClassA(
                   1302:     IN LPWNDCLASSA lpWndClass
                   1303:     );
                   1304: BOOL
                   1305: APIENTRY CRITICAL
                   1306: RegisterClassW(
                   1307:     IN LPWNDCLASSW lpWndClass
                   1308:     );
                   1309: #ifdef UNICODE
                   1310: #define RegisterClass RegisterClassW
                   1311: #else
                   1312: #define RegisterClass RegisterClassA
                   1313: #endif // !UNICODE
                   1314: 
                   1315: BOOL
                   1316: APIENTRY CRITICAL
                   1317: UnregisterClassA(
                   1318:     IN LPSTRID lpClassName,
                   1319:     IN HANDLE hInstance
                   1320:     );
                   1321: BOOL
                   1322: APIENTRY CRITICAL
                   1323: UnregisterClassW(
                   1324:     IN LPWSTRID lpClassName,
                   1325:     IN HANDLE hInstance
                   1326:     );
                   1327: #ifdef UNICODE
                   1328: #define UnregisterClass UnregisterClassW
                   1329: #else
                   1330: #define UnregisterClass UnregisterClassA
                   1331: #endif // !UNICODE
                   1332: 
                   1333: BOOL
                   1334: APIENTRY CRITICAL
                   1335: GetClassInfoA(
                   1336:     IN HANDLE hInstance OPTIONAL,
                   1337:     IN LPSTRID lpClassName,
                   1338:     OUT LPWNDCLASSA lpWndClass
                   1339:     );
                   1340: BOOL
                   1341: APIENTRY CRITICAL
                   1342: GetClassInfoW(
                   1343:     IN HANDLE hInstance OPTIONAL,
                   1344:     IN LPWSTRID lpClassName,
                   1345:     OUT LPWNDCLASSW lpWndClass
                   1346:     );
                   1347: #ifdef UNICODE
                   1348: #define GetClassInfo GetClassInfoW
                   1349: #else
                   1350: #define GetClassInfo GetClassInfoA
                   1351: #endif // !UNICODE
                   1352: 
                   1353: #define CW_USEDEFAULT       ((int)0x80000000)
                   1354: 
                   1355: HWND
                   1356: APIENTRY CRITICAL XXX
                   1357: CreateWindowExA(
                   1358:     IN DWORD dwExStyle,
                   1359:     IN LPSTRID lpClassName,
                   1360:     IN LPSTRID lpWindowName,
                   1361:     IN DWORD dwStyle,
                   1362:     IN int X,
                   1363:     IN int Y,
                   1364:     IN int nWidth,
                   1365:     IN int nHeight,
                   1366:     IN HWND hWndParent OPTIONAL,
                   1367:     IN HMENU hMenu,
                   1368:     IN HANDLE hInstance,
                   1369:     IN LPVOID lpParam OPTIONAL
                   1370:     );
                   1371: HWND
                   1372: APIENTRY CRITICAL XXX
                   1373: CreateWindowExW(
                   1374:     IN DWORD dwExStyle,
                   1375:     IN LPWSTRID lpClassName,
                   1376:     IN LPWSTRID lpWindowName,
                   1377:     IN DWORD dwStyle,
                   1378:     IN int X,
                   1379:     IN int Y,
                   1380:     IN int nWidth,
                   1381:     IN int nHeight,
                   1382:     IN HWND hWndParent OPTIONAL,
                   1383:     IN HMENU hMenu,
                   1384:     IN HANDLE hInstance,
                   1385:     IN LPVOID lpParam OPTIONAL
                   1386:     );
                   1387: #ifdef UNICODE
                   1388: #define CreateWindowEx CreateWindowExW
                   1389: #else
                   1390: #define CreateWindowEx CreateWindowExA
                   1391: #endif // !UNICODE
                   1392: 
                   1393: #define CreateWindowA(lpClassName, lpWindowName, dwStyle, x, y,\
                   1394: nWidth, nHeight, hwndParent, hMenu, hInstance, lpParam)\
                   1395: CreateWindowExA(0L, lpClassName, lpWindowName, dwStyle, x, y,\
                   1396: nWidth, nHeight, hwndParent, hMenu, hInstance, lpParam)
                   1397: #define CreateWindowW(lpClassName, lpWindowName, dwStyle, x, y,\
                   1398: nWidth, nHeight, hwndParent, hMenu, hInstance, lpParam)\
                   1399: CreateWindowExW(0L, lpClassName, lpWindowName, dwStyle, x, y,\
                   1400: nWidth, nHeight, hwndParent, hMenu, hInstance, lpParam)
                   1401: #ifdef UNICODE
                   1402: #define CreateWindow CreateWindowW
                   1403: #else
                   1404: #define CreateWindow CreateWindowA
                   1405: #endif // !UNICODE
                   1406: 
                   1407: BOOL APIENTRY CRITICAL IsWindow(IN HWNDVERBATIM hWnd);
                   1408: BOOL APIENTRY CRITICAL IsChild(IN HWND hWndParent, IN HWND hWnd);
                   1409: BOOL APIENTRY CRITICAL XXX DestroyWindow(IN HWND hWnd);
                   1410: 
                   1411: BOOL APIENTRY CRITICAL XXX ShowWindow(IN HWND hWnd, IN int nCmdShow);
                   1412: BOOL APIENTRY CRITICAL XXX FlashWindow(IN HWND hWnd, IN BOOL bInvert);
                   1413: BOOL APIENTRY CRITICAL XXX ShowOwnedPopups(IN HWND hWnd, IN BOOL fShow);
                   1414: 
                   1415: BOOL APIENTRY CRITICAL XXX OpenIcon(IN HWND hWnd);
                   1416: BOOL APIENTRY CRITICAL XXX CloseWindow(IN HWND hWnd);
                   1417: BOOL APIENTRY CRITICAL XXX MoveWindow(IN HWND hWnd, IN int X, IN int Y, IN int nWidth, IN int nHeight, IN BOOL bRepaint);
                   1418: BOOL APIENTRY CRITICAL XXX SetWindowPos(IN HWND hWnd, IN HWNDIA hWndInsertAfter OPTIONAL, IN int X, IN int Y, IN int cx, IN int cy, IN UINT wFlags);
                   1419: 
                   1420: #ifndef NODEFERWINDOWPOS
                   1421: 
                   1422: HWPI APIENTRY CRITICAL BeginDeferWindowPos(IN int nNumWindows);
                   1423: HWPI APIENTRY CRITICAL DeferWindowPos(IN HWPI hWinPosInfo, IN HWND hWnd, IN HWNDIA hWndInsertAfter OPTIONAL, IN int x, IN int y, IN int cx, IN int cy, IN UINT wFlags);
                   1424: BOOL APIENTRY CRITICAL XXX EndDeferWindowPos(IN HWPI hWinPosInfo);
                   1425: 
                   1426: #endif /* NODEFERWINDOWPOS */
                   1427: 
                   1428: BOOL APIENTRY CRITICAL IsWindowVisible(IN HWND hWnd);
                   1429: BOOL APIENTRY CRITICAL IsIconic(IN HWND hWnd);
                   1430: BOOL APIENTRY CRITICAL AnyPopup(void);
                   1431: BOOL APIENTRY CRITICAL XXX BringWindowToTop(IN HWND hWnd);
                   1432: BOOL APIENTRY CRITICAL IsZoomed(IN HWND hWnd);
                   1433: 
                   1434: /* SetWindowPos Flags */
                   1435: #define SWP_NOSIZE          0x0001
                   1436: #define SWP_NOMOVE          0x0002
                   1437: #define SWP_NOZORDER        0x0004
                   1438: #define SWP_NOREDRAW        0x0008
                   1439: #define SWP_NOACTIVATE      0x0010
                   1440: #define SWP_FRAMECHANGED    0x0020  /* The frame changed: send WM_NCCALCSIZE */
                   1441: #define SWP_SHOWWINDOW      0x0040
                   1442: #define SWP_HIDEWINDOW      0x0080
                   1443: #define SWP_NOCOPYBITS      0x0100
                   1444: #define SWP_NOOWNERZORDER   0x0200  /* Don't do owner Z ordering */
                   1445: 
                   1446: #define SWP_DRAWFRAME       SWP_FRAMECHANGED
                   1447: #define SWP_NOREPOSITION    SWP_NOOWNERZORDER
                   1448: 
                   1449: #define SWP_NOCLIENTSIZE    0x0800  /* Client didn't resize */  /* ;Internal */
                   1450: #define SWP_NOCLIENTMOVE    0x1000  /* Client didn't move   */  /* ;Internal */
                   1451: #define SWP_NOSENDCHANGING  0x0400  /* Don't send WM_WINDOWPOSCHANGING */ /* ;Internal */
                   1452: #define SWP_DEFERDRAWING    0x2000  /* Don't do any drawing or erasing */ /* ;Internal */
                   1453:                                                                       /* ;Internal */
                   1454: #define SWP_CHANGEMASK      (SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | /* ;Internal */ \
                   1455:                             SWP_FRAMECHANGED |                        /* ;Internal */ \
                   1456:                             SWP_SHOWWINDOW | SWP_HIDEWINDOW |         /* ;Internal */ \
                   1457:                             SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE)      /* ;Internal */
                   1458:                                                                       /* ;Internal */
                   1459: #define SWP_NOCHANGE        (SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | /* ;Internal */ \
                   1460:                             SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE)      /* ;Internal */
                   1461: 
                   1462: #ifndef NOCTLMGR
                   1463: 
                   1464: HWND
                   1465: APIENTRY CRITICAL
                   1466: CreateDialogParamA(
                   1467:     IN HANDLE hInstance,
                   1468:     IN LPSTRID lpTemplateName,
                   1469:     IN HWND hWndParent OPTIONAL,
                   1470:     IN WNDPROC lpDialogFunc,
                   1471:     IN LONG dwInitParam
                   1472:     );
                   1473: HWND
                   1474: APIENTRY CRITICAL
                   1475: CreateDialogParamW(
                   1476:     IN HANDLE hInstance,
                   1477:     IN LPWSTRID lpTemplateName,
                   1478:     IN HWND hWndParent OPTIONAL,
                   1479:     IN WNDPROC lpDialogFunc,
                   1480:     IN LONG dwInitParam
                   1481:     );
                   1482: #ifdef UNICODE
                   1483: #define CreateDialogParam CreateDialogParamW
                   1484: #else
                   1485: #define CreateDialogParam CreateDialogParamA
                   1486: #endif // !UNICODE
                   1487: 
                   1488: HWND
                   1489: APIENTRY CRITICAL
                   1490: CreateDialogIndirectParamA(
                   1491:     IN HANDLE hInstance,
                   1492:     IN LPDLGTEMPLATESTUBA lpTemplate,
                   1493:     IN HWND hWndParent OPTIONAL,
                   1494:     IN WNDPROC lpDialogFunc,
                   1495:     IN LONG dwInitParam
                   1496:     );
                   1497: HWND
                   1498: APIENTRY CRITICAL
                   1499: CreateDialogIndirectParamW(
                   1500:     IN HANDLE hInstance,
                   1501:     IN LPDLGTEMPLATESTUBW lpTemplate,
                   1502:     IN HWND hWndParent OPTIONAL,
                   1503:     IN WNDPROC lpDialogFunc,
                   1504:     IN LONG dwInitParam
                   1505:     );
                   1506: #ifdef UNICODE
                   1507: #define CreateDialogIndirectParam CreateDialogIndirectParamW
                   1508: #else
                   1509: #define CreateDialogIndirectParam CreateDialogIndirectParamA
                   1510: #endif // !UNICODE
                   1511: 
                   1512: #define CreateDialogA(hInstance, lpName, hwndParent, lpDialogFunc) \
                   1513: CreateDialogParamA(hInstance, lpName, hwndParent, lpDialogFunc, 0L)
                   1514: #define CreateDialogW(hInstance, lpName, hwndParent, lpDialogFunc) \
                   1515: CreateDialogParamW(hInstance, lpName, hwndParent, lpDialogFunc, 0L)
                   1516: #ifdef UNICODE
                   1517: #define CreateDialog CreateDialogW
                   1518: #else
                   1519: #define CreateDialog CreateDialogA
                   1520: #endif // !UNICODE
                   1521: 
                   1522: #define CreateDialogIndirectA(hInstance, lpTemplate, hwndParent, lpDialogFunc) \
                   1523: CreateDialogIndirectParamA(hInstance, lpTemplate, hwndParent, lpDialogFunc, 0L)
                   1524: #define CreateDialogIndirectW(hInstance, lpTemplate, hwndParent, lpDialogFunc) \
                   1525: CreateDialogIndirectParamW(hInstance, lpTemplate, hwndParent, lpDialogFunc, 0L)
                   1526: #ifdef UNICODE
                   1527: #define CreateDialogIndirect CreateDialogIndirectW
                   1528: #else
                   1529: #define CreateDialogIndirect CreateDialogIndirectA
                   1530: #endif // !UNICODE
                   1531: 
                   1532: int
                   1533: APIENTRY CRITICAL
                   1534: DialogBoxParamA(
                   1535:     IN HANDLE hInstance,
                   1536:     IN LPSTRID lpTemplateName,
                   1537:     IN HWND hWndParent OPTIONAL,
                   1538:     IN WNDPROC lpDialogFunc,
                   1539:     IN LONG dwInitParam
                   1540:     );
                   1541: int
                   1542: APIENTRY CRITICAL
                   1543: DialogBoxParamW(
                   1544:     IN HANDLE hInstance,
                   1545:     IN LPWSTRID lpTemplateName,
                   1546:     IN HWND hWndParent OPTIONAL,
                   1547:     IN WNDPROC lpDialogFunc,
                   1548:     IN LONG dwInitParam
                   1549:     );
                   1550: #ifdef UNICODE
                   1551: #define DialogBoxParam DialogBoxParamW
                   1552: #else
                   1553: #define DialogBoxParam DialogBoxParamA
                   1554: #endif // !UNICODE
                   1555: 
                   1556: int
                   1557: APIENTRY CRITICAL
                   1558: DialogBoxIndirectParamA(
                   1559:     IN HANDLE hInstance,
                   1560:     IN LPDLGTEMPLATESTUBA hDialogTemplate,
                   1561:     IN HWND hWndParent OPTIONAL,
                   1562:     IN WNDPROC lpDialogFunc,
                   1563:     IN LONG dwInitParam
                   1564:     );
                   1565: int
                   1566: APIENTRY CRITICAL
                   1567: DialogBoxIndirectParamW(
                   1568:     IN HANDLE hInstance,
                   1569:     IN LPDLGTEMPLATESTUBW hDialogTemplate,
                   1570:     IN HWND hWndParent OPTIONAL,
                   1571:     IN WNDPROC lpDialogFunc,
                   1572:     IN LONG dwInitParam
                   1573:     );
                   1574: #ifdef UNICODE
                   1575: #define DialogBoxIndirectParam DialogBoxIndirectParamW
                   1576: #else
                   1577: #define DialogBoxIndirectParam DialogBoxIndirectParamA
                   1578: #endif // !UNICODE
                   1579: 
                   1580: #define DialogBoxA(hInstance, lpTemplate, hwndParent, lpDialogFunc) \
                   1581: DialogBoxParamA(hInstance, lpTemplate, hwndParent, lpDialogFunc, 0L)
                   1582: #define DialogBoxW(hInstance, lpTemplate, hwndParent, lpDialogFunc) \
                   1583: DialogBoxParamW(hInstance, lpTemplate, hwndParent, lpDialogFunc, 0L)
                   1584: #ifdef UNICODE
                   1585: #define DialogBox DialogBoxW
                   1586: #else
                   1587: #define DialogBox DialogBoxA
                   1588: #endif // !UNICODE
                   1589: 
                   1590: #define DialogBoxIndirectA(hInstance, lpTemplate, hwndParent, lpDialogFunc) \
                   1591: DialogBoxIndirectParamA(hInstance, lpTemplate, hwndParent, lpDialogFunc, 0L)
                   1592: #define DialogBoxIndirectW(hInstance, lpTemplate, hwndParent, lpDialogFunc) \
                   1593: DialogBoxIndirectParamW(hInstance, lpTemplate, hwndParent, lpDialogFunc, 0L)
                   1594: #ifdef UNICODE
                   1595: #define DialogBoxIndirect DialogBoxIndirectW
                   1596: #else
                   1597: #define DialogBoxIndirect DialogBoxIndirectA
                   1598: #endif // !UNICODE
                   1599: 
                   1600: BOOL APIENTRY CRITICAL XXX EndDialog(IN HWND hDlg, IN int nResult);
                   1601: HWND APIENTRY CRITICAL GetDlgItem(IN HWND hDlg, IN int nIDDlgItem);
                   1602: BOOL APIENTRY CRITICAL XXX SetDlgItemInt(IN HWND hDlg, IN int nIDDlgItem,
                   1603:         IN int wValue, IN BOOL bSigned);
                   1604: int  APIENTRY CRITICAL XXX GetDlgItemInt(IN HWNDVERBATIM hDlg, IN int nIDDlgItem,
                   1605:         OUT BOOL *lpTranslated OPTIONAL, IN BOOL bSigned);
                   1606: 
                   1607: BOOL
                   1608: APIENTRY CRITICAL XXX
                   1609: SetDlgItemTextA(
                   1610:     IN HWND hDlg,
                   1611:     IN int nIDDlgItem,
                   1612:     IN LPSTR lpString OPTIONAL
                   1613:     );
                   1614: BOOL
                   1615: APIENTRY CRITICAL XXX
                   1616: SetDlgItemTextW(
                   1617:     IN HWND hDlg,
                   1618:     IN int nIDDlgItem,
                   1619:     IN LPWSTR lpString OPTIONAL
                   1620:     );
                   1621: #ifdef UNICODE
                   1622: #define SetDlgItemText SetDlgItemTextW
                   1623: #else
                   1624: #define SetDlgItemText SetDlgItemTextA
                   1625: #endif // !UNICODE
                   1626: 
                   1627: int
                   1628: APIENTRY CRITICAL XXX
                   1629: GetDlgItemTextA(
                   1630:     IN HWND hDlg,
                   1631:     IN int nIDDlgItem,
                   1632:     NEXTCOUNT IN OUT OUTLPSTR lpString,
                   1633:     IN int nMaxCount
                   1634:     );
                   1635: int
                   1636: APIENTRY CRITICAL XXX
                   1637: GetDlgItemTextW(
                   1638:     IN HWND hDlg,
                   1639:     IN int nIDDlgItem,
                   1640:     NEXTCOUNT IN OUT OUTLPWSTR lpString,
                   1641:     IN int nMaxCount
                   1642:     );
                   1643: #ifdef UNICODE
                   1644: #define GetDlgItemText GetDlgItemTextW
                   1645: #else
                   1646: #define GetDlgItemText GetDlgItemTextA
                   1647: #endif // !UNICODE
                   1648: 
                   1649: BOOL APIENTRY CRITICAL XXX CheckDlgButton(IN HWND hDlg, IN int nIDButton,
                   1650:         IN UINT wCheck);
                   1651: BOOL APIENTRY CRITICAL XXX CheckRadioButton(IN HWND hDlg, IN int nIDFirstButton,
                   1652:         IN int nIDLastButton, IN int nIDCheckButton);
                   1653: UINT APIENTRY CRITICAL XXX IsDlgButtonChecked(IN HWND hDlg, IN int nIDButton);
                   1654: LONG APIENTRY CRITICAL XXX SendDlgItemMessageA(IN HWND hDlg, IN int nIDDlgItem,
                   1655:         IN UINT wMsg, IN DWORD wParam, IN LONG lParam);
                   1656: LONG APIENTRY CRITICAL XXX SendDlgItemMessageW(IN HWND hDlg, IN int nIDDlgItem,
                   1657:         IN UINT wMsg, IN DWORD wParam, IN LONG lParam);
                   1658: #ifdef UNICODE
                   1659: #define SendDlgItemMessage SendDlgItemMessageW
                   1660: #else
                   1661: #define SendDlgItemMessage SendDlgItemMessageA
                   1662: #endif // !UNICODE
                   1663: HWND APIENTRY CRITICAL GetNextDlgGroupItem(IN HWND hDlg, IN HWND hCtl,
                   1664:         IN BOOL bPrevious);
                   1665: HWND APIENTRY CRITICAL GetNextDlgTabItem(IN HWND hDlg, IN HWND hCtl,
                   1666:         IN BOOL bPrevious);
                   1667: int  APIENTRY CRITICAL GetDlgCtrlID(IN HWND hWnd);
                   1668: long APIENTRY CRITICAL GetDialogBaseUnits(void);
                   1669: LONG APIENTRY CRITICAL XXX DefDlgProcA(IN HWND hDlg, IN UINT wMsg,
                   1670:         IN DWORD wParam, IN LONG lParam);
                   1671: LONG APIENTRY CRITICAL XXX DefDlgProcW(IN HWND hDlg, IN UINT wMsg,
                   1672:         IN DWORD wParam, IN LONG lParam);
                   1673: #ifdef UNICODE
                   1674: #define DefDlgProc DefDlgProcW
                   1675: #else
                   1676: #define DefDlgProc DefDlgProcA
                   1677: #endif // !UNICODE
                   1678: 
                   1679: /*
                   1680:  * Window extra byted needed for private dialog classes.
                   1681:  */
                   1682: #define DLGWINDOWEXTRA 30
                   1683: 
                   1684: #endif /* NOCTLMGR */
                   1685: 
                   1686: #ifndef NOMSG
                   1687: BOOL APIENTRY CRITICAL CallMsgFilter(IN LPMSG lpMsg, IN int nCode);
                   1688: #endif
                   1689: 
                   1690: #ifndef NOCLIPBOARD
                   1691: 
                   1692: /* Clipboard Manager Functions */
                   1693: BOOL   APIENTRY CRITICAL OpenClipboard(IN HWND hWnd);
                   1694: BOOL   APIENTRY CRITICAL XXX CloseClipboard(void);
                   1695: HWND   APIENTRY CRITICAL GetClipboardOwner(void);
                   1696: HWND   APIENTRY CRITICAL XXX SetClipboardViewer(IN HWND OPTIONAL);
                   1697: HWND   APIENTRY CRITICAL GetClipboardViewer(void);
                   1698: BOOL   APIENTRY CRITICAL XXX ChangeClipboardChain(IN HWND, IN HWND OPTIONAL);
                   1699: HANDLE APIENTRY CRITICAL SetClipboardData(IN UINT wFormat, IN HANDLE hMem);
                   1700: HANDLE APIENTRY CRITICAL XXX GetClipboardData(IN UINT wFormat);
                   1701: 
                   1702: UINT
                   1703: APIENTRY CRITICAL
                   1704: RegisterClipboardFormatA(
                   1705:     IN LPSTR
                   1706:     );
                   1707: UINT
                   1708: APIENTRY CRITICAL
                   1709: RegisterClipboardFormatW(
                   1710:     IN LPWSTR
                   1711:     );
                   1712: #ifdef UNICODE
                   1713: #define RegisterClipboardFormat RegisterClipboardFormatW
                   1714: #else
                   1715: #define RegisterClipboardFormat RegisterClipboardFormatA
                   1716: #endif // !UNICODE
                   1717: 
                   1718: int    APIENTRY CRITICAL CountClipboardFormats(void);
                   1719: UINT APIENTRY CRITICAL EnumClipboardFormats(IN UINT);
                   1720: 
                   1721: int
                   1722: APIENTRY CRITICAL
                   1723: GetClipboardFormatNameA(
                   1724:     IN UINT,
                   1725:     NEXTCOUNT IN OUT OUTLPSTR,
                   1726:     IN int
                   1727:     );
                   1728: int
                   1729: APIENTRY CRITICAL
                   1730: GetClipboardFormatNameW(
                   1731:     IN UINT,
                   1732:     NEXTCOUNT IN OUT OUTLPWSTR,
                   1733:     IN int
                   1734:     );
                   1735: #ifdef UNICODE
                   1736: #define GetClipboardFormatName GetClipboardFormatNameW
                   1737: #else
                   1738: #define GetClipboardFormatName GetClipboardFormatNameA
                   1739: #endif // !UNICODE
                   1740: 
                   1741: BOOL   APIENTRY CRITICAL XXX EmptyClipboard(void);
                   1742: BOOL   APIENTRY CRITICAL IsClipboardFormatAvailable(IN UINT);
                   1743: int    APIENTRY CRITICAL GetPriorityClipboardFormat(NEXTCOUNT IN LPPRIORITYLIST, IN int);
                   1744: 
                   1745: #endif /* NOCLIPBOARD */
                   1746: 
                   1747: 
                   1748: /* Character Translation Routines */
                   1749: 
                   1750: BOOL
                   1751: APIENTRY
                   1752: CharToOemA(
                   1753:     IN LPSTR,
                   1754:     OUT LPSTR
                   1755:     );
                   1756: BOOL
                   1757: APIENTRY
                   1758: CharToOemW(
                   1759:     IN LPWSTR,
                   1760:     OUT LPSTR
                   1761:     );
                   1762: #ifdef UNICODE
                   1763: #define CharToOem CharToOemW
                   1764: #else
                   1765: #define CharToOem CharToOemA
                   1766: #endif // !UNICODE
                   1767: 
                   1768: BOOL
                   1769: APIENTRY
                   1770: OemToCharA(
                   1771:     IN LPSTR,
                   1772:     OUT LPSTR
                   1773:     );
                   1774: BOOL
                   1775: APIENTRY
                   1776: OemToCharW(
                   1777:     IN LPSTR,
                   1778:     OUT LPWSTR
                   1779:     );
                   1780: #ifdef UNICODE
                   1781: #define OemToChar OemToCharW
                   1782: #else
                   1783: #define OemToChar OemToCharA
                   1784: #endif // !UNICODE
                   1785: 
                   1786: BOOL
                   1787: APIENTRY
                   1788: CharToOemBuffA(
                   1789:     IN LPSTR,
                   1790:     OUT LPSTR,
                   1791:     IN DWORD
                   1792:     );
                   1793: BOOL
                   1794: APIENTRY
                   1795: CharToOemBuffW(
                   1796:     IN LPWSTR,
                   1797:     OUT LPSTR,
                   1798:     IN DWORD
                   1799:     );
                   1800: #ifdef UNICODE
                   1801: #define CharToOemBuff CharToOemBuffW
                   1802: #else
                   1803: #define CharToOemBuff CharToOemBuffA
                   1804: #endif // !UNICODE
                   1805: 
                   1806: BOOL
                   1807: APIENTRY
                   1808: OemToCharBuffA(
                   1809:     IN LPSTR,
                   1810:     OUT LPSTR,
                   1811:     IN DWORD
                   1812:     );
                   1813: BOOL
                   1814: APIENTRY
                   1815: OemToCharBuffW(
                   1816:     IN LPSTR,
                   1817:     OUT LPWSTR,
                   1818:     IN DWORD
                   1819:     );
                   1820: #ifdef UNICODE
                   1821: #define OemToCharBuff OemToCharBuffW
                   1822: #else
                   1823: #define OemToCharBuff OemToCharBuffA
                   1824: #endif // !UNICODE
                   1825: 
                   1826: LPSTR
                   1827: APIENTRY
                   1828: CharUpperA(
                   1829:     IN LPSTR
                   1830:     );
                   1831: LPWSTR
                   1832: APIENTRY
                   1833: CharUpperW(
                   1834:     IN LPWSTR
                   1835:     );
                   1836: #ifdef UNICODE
                   1837: #define CharUpper CharUpperW
                   1838: #else
                   1839: #define CharUpper CharUpperA
                   1840: #endif // !UNICODE
                   1841: 
                   1842: DWORD
                   1843: APIENTRY
                   1844: CharUpperBuffA(
                   1845:     NEXTCOUNT IN LPSTR,
                   1846:     IN DWORD
                   1847:     );
                   1848: DWORD
                   1849: APIENTRY
                   1850: CharUpperBuffW(
                   1851:     NEXTCOUNT IN LPWSTR,
                   1852:     IN DWORD
                   1853:     );
                   1854: #ifdef UNICODE
                   1855: #define CharUpperBuff CharUpperBuffW
                   1856: #else
                   1857: #define CharUpperBuff CharUpperBuffA
                   1858: #endif // !UNICODE
                   1859: 
                   1860: LPSTR
                   1861: APIENTRY
                   1862: CharLowerA(
                   1863:     IN LPSTR
                   1864:     );
                   1865: LPWSTR
                   1866: APIENTRY
                   1867: CharLowerW(
                   1868:     IN LPWSTR
                   1869:     );
                   1870: #ifdef UNICODE
                   1871: #define CharLower CharLowerW
                   1872: #else
                   1873: #define CharLower CharLowerA
                   1874: #endif // !UNICODE
                   1875: 
                   1876: DWORD
                   1877: APIENTRY
                   1878: CharLowerBuffA(
                   1879:     NEXTCOUNT IN LPSTR,
                   1880:     IN DWORD
                   1881:     );
                   1882: DWORD
                   1883: APIENTRY
                   1884: CharLowerBuffW(
                   1885:     NEXTCOUNT IN LPWSTR,
                   1886:     IN DWORD
                   1887:     );
                   1888: #ifdef UNICODE
                   1889: #define CharLowerBuff CharLowerBuffW
                   1890: #else
                   1891: #define CharLowerBuff CharLowerBuffA
                   1892: #endif // !UNICODE
                   1893: 
                   1894: LPSTR
                   1895: APIENTRY
                   1896: CharNextA(
                   1897:     IN LPSTR
                   1898:     );
                   1899: LPWSTR
                   1900: APIENTRY
                   1901: CharNextW(
                   1902:     IN LPWSTR
                   1903:     );
                   1904: #ifdef UNICODE
                   1905: #define CharNext CharNextW
                   1906: #else
                   1907: #define CharNext CharNextA
                   1908: #endif // !UNICODE
                   1909: 
                   1910: LPSTR
                   1911: APIENTRY
                   1912: CharPrevA(
                   1913:     IN LPSTR,
                   1914:     IN LPSTR
                   1915:     );
                   1916: LPWSTR
                   1917: APIENTRY
                   1918: CharPrevW(
                   1919:     IN LPWSTR,
                   1920:     IN LPWSTR
                   1921:     );
                   1922: #ifdef UNICODE
                   1923: #define CharPrev CharPrevW
                   1924: #else
                   1925: #define CharPrev CharPrevA
                   1926: #endif // !UNICODE
                   1927: 
                   1928: /* Compatibility defines for character translation routines */
                   1929: #define AnsiToOem CharToOemA
                   1930: #define OemToAnsi OemToCharA
                   1931: #define AnsiToOemBuff CharToOemBuffA
                   1932: #define OemToAnsiBuff OemToCharBuffA
                   1933: #define AnsiUpper CharUpperA
                   1934: #define AnsiUpperBuff CharUpperBuffA
                   1935: #define AnsiLower CharLowerA
                   1936: #define AnsiLowerBuff CharLowerBuffA
                   1937: #define AnsiNext CharNextA
                   1938: #define AnsiPrev CharPrevA
                   1939: 
                   1940: #ifndef  NOLANGUAGE
                   1941: /* Language dependent Routines */
                   1942: 
                   1943: BOOL
                   1944: APIENTRY
                   1945: IsCharAlphaA(
                   1946:     IN CHAR
                   1947:     );
                   1948: BOOL
                   1949: APIENTRY
                   1950: IsCharAlphaW(
                   1951:     IN WCHAR
                   1952:     );
                   1953: #ifdef UNICODE
                   1954: #define IsCharAlpha IsCharAlphaW
                   1955: #else
                   1956: #define IsCharAlpha IsCharAlphaA
                   1957: #endif // !UNICODE
                   1958: 
                   1959: BOOL
                   1960: APIENTRY
                   1961: IsCharAlphaNumericA(
                   1962:     IN CHAR
                   1963:     );
                   1964: BOOL
                   1965: APIENTRY
                   1966: IsCharAlphaNumericW(
                   1967:     IN WCHAR
                   1968:     );
                   1969: #ifdef UNICODE
                   1970: #define IsCharAlphaNumeric IsCharAlphaNumericW
                   1971: #else
                   1972: #define IsCharAlphaNumeric IsCharAlphaNumericA
                   1973: #endif // !UNICODE
                   1974: 
                   1975: BOOL
                   1976: APIENTRY
                   1977: IsCharUpperA(
                   1978:     IN CHAR
                   1979:     );
                   1980: BOOL
                   1981: APIENTRY
                   1982: IsCharUpperW(
                   1983:     IN WCHAR
                   1984:     );
                   1985: #ifdef UNICODE
                   1986: #define IsCharUpper IsCharUpperW
                   1987: #else
                   1988: #define IsCharUpper IsCharUpperA
                   1989: #endif // !UNICODE
                   1990: 
                   1991: BOOL
                   1992: APIENTRY
                   1993: IsCharLowerA(
                   1994:     IN CHAR
                   1995:     );
                   1996: BOOL
                   1997: APIENTRY
                   1998: IsCharLowerW(
                   1999:     IN WCHAR
                   2000:     );
                   2001: #ifdef UNICODE
                   2002: #define IsCharLower IsCharLowerW
                   2003: #else
                   2004: #define IsCharLower IsCharLowerA
                   2005: #endif // !UNICODE
                   2006: 
                   2007: #endif
                   2008: 
                   2009: HWND APIENTRY CRITICAL XXX SetFocus(IN HWND hWnd OPTIONAL);
                   2010: HWND APIENTRY CRITICAL GetActiveWindow(void);
                   2011: HWND APIENTRY CRITICAL GetFocus(void);
                   2012: SHORT APIENTRY CRITICAL GetKeyState(IN int nVirtKey);
                   2013: SHORT APIENTRY CRITICAL GetAsyncKeyState(IN int vKey);
                   2014: BOOL APIENTRY CRITICAL GetKeyboardState(IN OUT PBYTE lpKeyState);
                   2015: BOOL APIENTRY CRITICAL SetKeyboardState(IN LPBYTE lpKeyState);
                   2016: 
                   2017: int
                   2018: APIENTRY
                   2019: GetKeyNameTextA(
                   2020:     IN LONG lParam,
                   2021:     NEXTCOUNT IN OUT OUTLPSTR lpString,
                   2022:     IN int nSize
                   2023:     );
                   2024: int
                   2025: APIENTRY
                   2026: GetKeyNameTextW(
                   2027:     IN LONG lParam,
                   2028:     NEXTCOUNT IN OUT OUTLPWSTR lpString,
                   2029:     IN int nSize
                   2030:     );
                   2031: #ifdef UNICODE
                   2032: #define GetKeyNameText GetKeyNameTextW
                   2033: #else
                   2034: #define GetKeyNameText GetKeyNameTextA
                   2035: #endif // !UNICODE
                   2036: int APIENTRY CRITICAL ToAscii(IN UINT wVirtKey, IN UINT wScanCode,
                   2037:         OUT PBYTE lpKeyState, OUT LPWORD lpChar, IN UINT wFlags);
                   2038: 
                   2039: SHORT APIENTRY VkKeyScan(IN CHAR cChar);
                   2040: UINT APIENTRY MapVirtualKey(IN UINT wCode, IN UINT wMapType);
                   2041: BOOL APIENTRY EnableHardwareInput(BOOL);
                   2042: BOOL APIENTRY CRITICAL GetInputState(void);
                   2043: DWORD APIENTRY CRITICAL GetQueueStatus(UINT flags);
                   2044: HWND APIENTRY CRITICAL GetCapture(void);
                   2045: HWND APIENTRY CRITICAL SetCapture(IN HWND hWnd OPTIONAL);
                   2046: BOOL APIENTRY CRITICAL ReleaseCapture(void);
                   2047: DWORD APIENTRY CRITICAL XXX MsgWaitForMultipleObjects(IN DWORD nCount,
                   2048:         PREVCOUNT IN LPHANDLE pHandles, IN BOOL fWaitAll,
                   2049:         IN DWORD dwMilliseconds, IN DWORD dwWakeMask);
                   2050: 
                   2051: /* Queue status flags for GetQueueStatus() and MsgWaitForMultipleObjects() */
                   2052: #define QS_KEY           0x01
                   2053: #define QS_MOUSEMOVE     0x02
                   2054: #define QS_MOUSEBUTTON   0x04
                   2055: #define QS_MOUSE         (QS_MOUSEMOVE | QS_MOUSEBUTTON)
                   2056: #define QS_POSTMESSAGE   0x08
                   2057: #define QS_TIMER         0x10
                   2058: #define QS_PAINT         0x20
                   2059: #define QS_SENDMESSAGE   0x40
                   2060: #define QS_HOTKEY        0x80
                   2061: #define QS_SETFOREGROUND (QS_HOTKEY | 0x0100)
                   2062: #define QS_INPUT         (QS_MOUSE | QS_KEY)
                   2063: #define QS_ALLEVENTS     (QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY)
                   2064: 
                   2065: 
                   2066: UINT APIENTRY GetSysInputMode(void);
                   2067: 
                   2068: /* GetSysInputMode return values */
                   2069: #define IMD_NONE                0
                   2070: #define IMD_MENU                1
                   2071: #define IMD_DIALOGBOX           2
                   2072: #define IMD_NEXTWINDOW          3
                   2073: #define IMD_SCROLLBAR           4
                   2074: #define IMD_TITLEBUTTONTRACK    5
                   2075: #define IMD_MOVESIZETRACK       6
                   2076: #define IMD_SYSERRDLG           7
                   2077: #define IMD_DRAGOBJECT          8
                   2078: #define IMD_DRAGDETECT          9
                   2079: 
                   2080: 
                   2081: /* Windows Functions */
                   2082: UINT APIENTRY CRITICAL SetTimer(IN HWND hwnd OPTIONAL, IN UINT nIDEvent, IN UINT wElapse, IN WNDPROC lpTimerFunc OPTIONAL);
                   2083: BOOL APIENTRY CRITICAL KillTimer(IN HWND hWnd OPTIONAL, IN UINT nIDEvent);
                   2084: 
                   2085: BOOL APIENTRY CRITICAL XXX EnableWindow(IN HWND hWnd, IN BOOL bEnable);
                   2086: BOOL APIENTRY CRITICAL IsWindowEnabled(IN HWND hWnd);
                   2087: 
                   2088: HANDLE
                   2089: APIENTRY CRITICAL
                   2090: LoadAcceleratorsA(
                   2091:     IN HANDLE hInstance,
                   2092:     IN LPSTRID lpTableName
                   2093:     );
                   2094: HANDLE
                   2095: APIENTRY CRITICAL
                   2096: LoadAcceleratorsW(
                   2097:     IN HANDLE hInstance,
                   2098:     IN LPWSTRID lpTableName
                   2099:     );
                   2100: #ifdef UNICODE
                   2101: #define LoadAccelerators LoadAcceleratorsW
                   2102: #else
                   2103: #define LoadAccelerators LoadAcceleratorsA
                   2104: #endif // !UNICODE
                   2105: 
                   2106: HACCEL APIENTRY CRITICAL CreateAcceleratorTable(NEXTCOUNT IN LPACCEL, IN int);
                   2107: BOOL   APIENTRY CRITICAL DestroyAcceleratorTable(IN HACCEL);
                   2108: int    APIENTRY CRITICAL CopyAcceleratorTable(IN HACCEL, NEXTCOUNT OUT LPACCEL OPTIONAL, IN int);
                   2109: 
                   2110: #ifndef NOMSG
                   2111: int  APIENTRY CRITICAL XXX TranslateAccelerator(IN HWND hWnd, IN HACCEL hAccTable, IN LPMSG lpMsg);
                   2112: #endif
                   2113: 
                   2114: #ifndef NOSYSMETRICS
                   2115: 
                   2116: /* GetSystemMetrics() codes */
                   2117: #define SM_CXSCREEN         0
                   2118: #define SM_CYSCREEN         1
                   2119: #define SM_CXVSCROLL        2
                   2120: #define SM_CYHSCROLL        3
                   2121: #define SM_CYCAPTION        4
                   2122: #define SM_CXBORDER         5
                   2123: #define SM_CYBORDER         6
                   2124: #define SM_CXDLGFRAME       7
                   2125: #define SM_CYDLGFRAME       8
                   2126: #define SM_CYVTHUMB         9
                   2127: #define SM_CXHTHUMB         10
                   2128: #define SM_CXICON           11
                   2129: #define SM_CYICON           12
                   2130: #define SM_CXCURSOR         13
                   2131: #define SM_CYCURSOR         14
                   2132: #define SM_CYMENU           15
                   2133: #define SM_CXFULLSCREEN     16
                   2134: #define SM_CYFULLSCREEN     17
                   2135: #define SM_CYKANJIWINDOW    18
                   2136: #define SM_MOUSEPRESENT     19
                   2137: #define SM_CYVSCROLL        20
                   2138: #define SM_CXHSCROLL        21
                   2139: #define SM_DEBUG            22
                   2140: #define SM_SWAPBUTTON       23
                   2141: #define SM_RESERVED1        24
                   2142: #define SM_RESERVED2        25
                   2143: #define SM_RESERVED3        26
                   2144: #define SM_RESERVED4        27
                   2145: #define SM_CXMIN            28
                   2146: #define SM_CYMIN            29
                   2147: #define SM_CXSIZE           30
                   2148: #define SM_CYSIZE           31
                   2149: #define SM_CXFRAME          32
                   2150: #define SM_CYFRAME          33
                   2151: #define SM_CXMINTRACK       34
                   2152: #define SM_CYMINTRACK       35
                   2153: #define SM_CXDOUBLECLK       36
                   2154: #define SM_CYDOUBLECLK       37
                   2155: #define SM_CXICONSPACING     38
                   2156: #define SM_CYICONSPACING     39
                   2157: #define SM_MENUDROPALIGNMENT 40
                   2158: #define SM_PENWINDOWS        41
                   2159: #define SM_CMOUSEBUTTONS     42
                   2160: #define SM_SECURE            43
                   2161: 
                   2162: #define SM_CMETRICS          44
                   2163: 
                   2164: int APIENTRY CRITICAL GetSystemMetrics(IN int nIndex);
                   2165: 
                   2166: #endif /* NOSYSMETRICS */
                   2167: 
                   2168: #ifndef NOMENUS
                   2169: 
                   2170: HMENU
                   2171: APIENTRY CRITICAL
                   2172: LoadMenuA(
                   2173:     IN HANDLE hInstance,
                   2174:     IN LPSTRID lpMenuName
                   2175:     );
                   2176: HMENU
                   2177: APIENTRY CRITICAL
                   2178: LoadMenuW(
                   2179:     IN HANDLE hInstance,
                   2180:     IN LPWSTRID lpMenuName
                   2181:     );
                   2182: #ifdef UNICODE
                   2183: #define LoadMenu LoadMenuW
                   2184: #else
                   2185: #define LoadMenu LoadMenuA
                   2186: #endif // !UNICODE
                   2187: 
                   2188: HMENU
                   2189: APIENTRY CRITICAL
                   2190: LoadMenuIndirectA(
                   2191:     IN LPMENUTEMPLATEA lpMenuTemplate
                   2192:     );
                   2193: HMENU
                   2194: APIENTRY CRITICAL
                   2195: LoadMenuIndirectW(
                   2196:     IN LPMENUTEMPLATEW lpMenuTemplate
                   2197:     );
                   2198: #ifdef UNICODE
                   2199: #define LoadMenuIndirect LoadMenuIndirectW
                   2200: #else
                   2201: #define LoadMenuIndirect LoadMenuIndirectA
                   2202: #endif // !UNICODE
                   2203: 
                   2204: HMENU APIENTRY CRITICAL GetMenu(IN HWND hWnd);
                   2205: BOOL  APIENTRY CRITICAL XXX SetMenu(IN HWND hWnd, IN HMENU hMenu OPTIONAL);
                   2206: BOOL  APIENTRY CRITICAL ChangeMenu(IN HMENU, IN UINT, IN CHNGMENUPOLY OPTIONAL, IN UINT, IN UINT);
                   2207: BOOL  APIENTRY CRITICAL XXX HiliteMenuItem(IN HWND hWnd, IN HMENU hMenu, IN UINT wIDHiliteItem, IN UINT wHilite);
                   2208: 
                   2209: int
                   2210: APIENTRY CRITICAL
                   2211: GetMenuStringA(
                   2212:     IN HMENU hMenu,
                   2213:     IN UINT wIDItem,
                   2214:     NEXTCOUNT IN OUT OUTLPSTR lpString,
                   2215:     IN int nMaxCount,
                   2216:     IN DWORD wFlag
                   2217:     );
                   2218: int
                   2219: APIENTRY CRITICAL
                   2220: GetMenuStringW(
                   2221:     IN HMENU hMenu,
                   2222:     IN UINT wIDItem,
                   2223:     NEXTCOUNT IN OUT OUTLPWSTR lpString,
                   2224:     IN int nMaxCount,
                   2225:     IN DWORD wFlag
                   2226:     );
                   2227: #ifdef UNICODE
                   2228: #define GetMenuString GetMenuStringW
                   2229: #else
                   2230: #define GetMenuString GetMenuStringA
                   2231: #endif // !UNICODE
                   2232: 
                   2233: UINT APIENTRY CRITICAL GetMenuState(IN HMENU hMenu, IN UINT wId, IN UINT wFlags);
                   2234: BOOL  APIENTRY CRITICAL XXX DrawMenuBar(IN HWND hWnd);
                   2235: HMENU APIENTRY CRITICAL GetSystemMenu(IN HWND hWnd, IN BOOL bRevert);
                   2236: HMENU APIENTRY CRITICAL CreateMenu(void);
                   2237: HMENU APIENTRY CRITICAL CreatePopupMenu(void);
                   2238: BOOL  APIENTRY CRITICAL DestroyMenu(IN HMENU hMenu);
                   2239: BOOL  APIENTRY CRITICAL CheckMenuItem(IN HMENU hMenu, IN UINT wIDCheckItem, IN UINT wCheck);
                   2240: BOOL  APIENTRY CRITICAL EnableMenuItem(IN HMENU hMenu, IN UINT wIDEnableItem, IN UINT wEnable);
                   2241: HMENU APIENTRY CRITICAL GetSubMenu(IN HMENU hMenu, IN int nPos);
                   2242: UINT APIENTRY CRITICAL GetMenuItemID(IN HMENU hMenu, IN int nPos);
                   2243: UINT APIENTRY CRITICAL GetMenuItemCount(IN HMENU hMenu);
                   2244: 
                   2245: BOOL
                   2246: APIENTRY CRITICAL
                   2247: InsertMenuA(
                   2248:     IN HMENU hMenu,
                   2249:     IN UINT nPosition,
                   2250:     IN UINT dwFlags,
                   2251:     IN UINT wIDNewItem,
                   2252:     IN MENUPOLYA lpNewItem OPTIONAL
                   2253:     );
                   2254: BOOL
                   2255: APIENTRY CRITICAL
                   2256: InsertMenuW(
                   2257:     IN HMENU hMenu,
                   2258:     IN UINT nPosition,
                   2259:     IN UINT dwFlags,
                   2260:     IN UINT wIDNewItem,
                   2261:     IN MENUPOLYW lpNewItem OPTIONAL
                   2262:     );
                   2263: #ifdef UNICODE
                   2264: #define InsertMenu InsertMenuW
                   2265: #else
                   2266: #define InsertMenu InsertMenuA
                   2267: #endif // !UNICODE
                   2268: 
                   2269: BOOL
                   2270: APIENTRY CRITICAL
                   2271: AppendMenuA(
                   2272:     IN HMENU hMenu,
                   2273:     IN UINT dwFlags,
                   2274:     IN UINT wIDNewItem,
                   2275:     IN MENUPOLYA lpNewItem OPTIONAL
                   2276:     );
                   2277: BOOL
                   2278: APIENTRY CRITICAL
                   2279: AppendMenuW(
                   2280:     IN HMENU hMenu,
                   2281:     IN UINT dwFlags,
                   2282:     IN UINT wIDNewItem,
                   2283:     IN MENUPOLYW lpNewItem OPTIONAL
                   2284:     );
                   2285: #ifdef UNICODE
                   2286: #define AppendMenu AppendMenuW
                   2287: #else
                   2288: #define AppendMenu AppendMenuA
                   2289: #endif // !UNICODE
                   2290: 
                   2291: BOOL
                   2292: APIENTRY CRITICAL
                   2293: ModifyMenuA(
                   2294:     IN HMENU hMnu,
                   2295:     IN UINT nPosition,
                   2296:     IN UINT dwFlags,
                   2297:     IN UINT wIDNewItem,
                   2298:     IN MENUPOLYA lpNewItem OPTIONAL
                   2299:     );
                   2300: BOOL
                   2301: APIENTRY CRITICAL
                   2302: ModifyMenuW(
                   2303:     IN HMENU hMnu,
                   2304:     IN UINT nPosition,
                   2305:     IN UINT dwFlags,
                   2306:     IN UINT wIDNewItem,
                   2307:     IN MENUPOLYW lpNewItem OPTIONAL
                   2308:     );
                   2309: #ifdef UNICODE
                   2310: #define ModifyMenu ModifyMenuW
                   2311: #else
                   2312: #define ModifyMenu ModifyMenuA
                   2313: #endif // !UNICODE
                   2314: 
                   2315: BOOL  APIENTRY CRITICAL RemoveMenu(IN HMENU hMenu, IN UINT nPosition, IN UINT dwFlags);
                   2316: BOOL  APIENTRY CRITICAL DeleteMenu(IN HMENU hMenu, IN UINT nPosition, IN UINT dwFlags);
                   2317: BOOL  APIENTRY CRITICAL SetMenuItemBitmaps(IN HMENU hMenu, IN UINT nPosition,
                   2318:         IN DWORD dwFlags, IN HBITMAP hBitmapUnchecked, IN HBITMAP hBitmapChecked);
                   2319: LONG  APIENTRY CRITICAL GetMenuCheckMarkDimensions(void);
                   2320: BOOL  APIENTRY CRITICAL XXX TrackPopupMenu(IN HMENU hMenu, IN UINT dwFlags,
                   2321:         IN int x, IN int y, IN int nReserved, IN HWND hWnd, IN LPVOID lpReserved);
                   2322: 
                   2323: /* Flags for TrackPopupMenu */
                   2324: #define TPM_LEFTBUTTON  0x0000L
                   2325: #define TPM_RIGHTBUTTON 0x0002L
                   2326: #define TPM_LEFTALIGN   0x0000L
                   2327: #define TPM_CENTERALIGN 0x0004L
                   2328: #define TPM_RIGHTALIGN  0x0008L
                   2329: 
                   2330: #endif /* NOMENUS */
                   2331: 
                   2332: BOOL APIENTRY CRITICAL DrawIcon(IN HDC, IN int, IN int, IN HICON);
                   2333: 
                   2334: int
                   2335: APIENTRY CRITICAL DrawTextA(
                   2336:     IN HDC hDC,
                   2337:     NEXTCOUNT IN LPSTR2 lpString,
                   2338:     IN int nCount,
                   2339:     IN OUT LPRECT lpRect,
                   2340:     IN UINT wFormat
                   2341:     );
                   2342: int
                   2343: APIENTRY CRITICAL DrawTextW(
                   2344:     IN HDC hDC,
                   2345:     NEXTCOUNT IN LPWSTR2 lpString,
                   2346:     IN int nCount,
                   2347:     IN OUT LPRECT lpRect,
                   2348:     IN UINT wFormat
                   2349:     );
                   2350: #ifdef UNICODE
                   2351: #define DrawText DrawTextW
                   2352: #else
                   2353: #define DrawText DrawTextA
                   2354: #endif // !UNICODE
                   2355: 
                   2356: BOOL APIENTRY GrayString(IN HDC hDC, IN HBRUSH hBrush, IN FARPROC lpOutputFunc,
                   2357:         IN GSPOLY lpData, IN int nCount, IN int X, IN int Y,
                   2358:         IN int nWidth, IN int nHeight);
                   2359: 
                   2360: LONG
                   2361: APIENTRY CRITICAL
                   2362: TabbedTextOutA(
                   2363:     IN HDC hDC,
                   2364:     IN int X,
                   2365:     IN int Y,
                   2366:     NEXTCOUNT IN LPSTR2 lpString,
                   2367:     IN int nCount,
                   2368:     IN int nTabPositions,
                   2369:     PREVCOUNT IN LPTABS lpnTabStopPositions,
                   2370:     IN int nTabOrigin
                   2371:     );
                   2372: LONG
                   2373: APIENTRY CRITICAL
                   2374: TabbedTextOutW(
                   2375:     IN HDC hDC,
                   2376:     IN int X,
                   2377:     IN int Y,
                   2378:     NEXTCOUNT IN LPWSTR2 lpString,
                   2379:     IN int nCount,
                   2380:     IN int nTabPositions,
                   2381:     PREVCOUNT IN LPTABS lpnTabStopPositions,
                   2382:     IN int nTabOrigin
                   2383:     );
                   2384: #ifdef UNICODE
                   2385: #define TabbedTextOut TabbedTextOutW
                   2386: #else
                   2387: #define TabbedTextOut TabbedTextOutA
                   2388: #endif // !UNICODE
                   2389: 
                   2390: DWORD
                   2391: APIENTRY CRITICAL
                   2392: GetTabbedTextExtentA(
                   2393:     IN HDC hDC,
                   2394:     NEXTCOUNT IN LPSTR2 lpString,
                   2395:     IN int nCount,
                   2396:     IN int nTabPositions,
                   2397:     PREVCOUNT IN LPTABS lpnTabStopPositions
                   2398:     );
                   2399: DWORD
                   2400: APIENTRY CRITICAL
                   2401: GetTabbedTextExtentW(
                   2402:     IN HDC hDC,
                   2403:     NEXTCOUNT IN LPWSTR2 lpString,
                   2404:     IN int nCount,
                   2405:     IN int nTabPositions,
                   2406:     PREVCOUNT IN LPTABS lpnTabStopPositions
                   2407:     );
                   2408: #ifdef UNICODE
                   2409: #define GetTabbedTextExtent GetTabbedTextExtentW
                   2410: #else
                   2411: #define GetTabbedTextExtent GetTabbedTextExtentA
                   2412: #endif // !UNICODE
                   2413: 
                   2414: BOOL APIENTRY CRITICAL XXX UpdateWindow(IN HWND hWnd);
                   2415: HWND APIENTRY CRITICAL XXX SetActiveWindow(IN HWND hWnd OPTIONAL);
                   2416: 
                   2417: BOOL APIENTRY CRITICAL XXX SetForegroundWindow(IN HWND hWnd);
                   2418: 
                   2419: HWND APIENTRY CRITICAL WindowFromDC(IN HDC hdc);
                   2420: HDC APIENTRY CRITICAL GetDC(IN HWND hWnd OPTIONAL);
                   2421: HDC APIENTRY GetDCEx(IN HWND hwnd OPTIONAL, IN HRGN hrgnClip, IN DWORD flags);
                   2422: 
                   2423: /* GetDCEx() flags */
                   2424: #define DCX_WINDOW          0x00000001L
                   2425: #define DCX_CACHE           0x00000002L
                   2426: #define DCX_NORESETATTRS    0x00000004L
                   2427: #define DCX_CLIPCHILDREN    0x00000008L
                   2428: #define DCX_CLIPSIBLINGS    0x00000010L
                   2429: #define DCX_PARENTCLIP      0x00000020L
                   2430: 
                   2431: #define DCX_EXCLUDERGN      0x00000040L
                   2432: #define DCX_INTERSECTRGN    0x00000080L
                   2433: 
                   2434: #define DCX_EXCLUDEUPDATE   0x00000100L
                   2435: #define DCX_INTERSECTUPDATE 0x00000200L
                   2436: 
                   2437: #define DCX_LOCKWINDOWUPDATE 0x00000400L
                   2438: 
                   2439: #define DCX_INVALID         0x00000800L /* ;Internal */
                   2440: #define DCX_INUSE           0x00001000L /* ;Internal */
                   2441: #define DCX_SAVEDRGNINVALID 0x00002000L /* ;Internal */
                   2442: #define DCX_OWNDC           0x00008000L /* ;Internal */
                   2443: 
                   2444: #define DCX_USESTYLE        0x00010000L
                   2445: #define DCX_NEEDFONT        0x00020000L /* ;Internal */
                   2446: #define DCX_NODELETERGN     0x00040000L /* ;Internal */
                   2447: #define DCX_NOCLIPCHILDREN  0x00080000L /* ;Internal */
                   2448: #define DCX_NORECOMPUTE     0x00100000L
                   2449: #define DCX_VALIDATE        0x00200000L
                   2450: 
                   2451: #define DCX_MATCHMASK (DCX_WINDOW | DCX_CACHE |                /* ;Internal */ \
                   2452:                       DCX_CLIPCHILDREN | DCX_CLIPSIBLINGS |    /* ;Internal */ \
                   2453:                       DCX_NORESETATTRS | DCX_LOCKWINDOWUPDATE) /* ;Internal */
                   2454: 
                   2455: HDC APIENTRY CRITICAL GetWindowDC(IN HWND hWnd OPTIONAL);
                   2456: int APIENTRY CRITICAL ReleaseDC(IN HWND hWnd OPTIONAL, IN HDC hDC);
                   2457: 
                   2458: HDC  APIENTRY CRITICAL XXX BeginPaint(IN HWND hWnd, OUT LPPAINTSTRUCT lpPaint);
                   2459: BOOL APIENTRY CRITICAL EndPaint(IN HWND hWnd, IN LPPAINTSTRUCT lpPaint);
                   2460: BOOL APIENTRY CRITICAL XXX GetUpdateRect(IN HWND hWnd, OUT LPRECT lpRect,
                   2461:         IN BOOL bErase);
                   2462: int  APIENTRY CRITICAL XXX GetUpdateRgn(IN HWND hWnd, IN HRGN hRgn,
                   2463:         IN BOOL bErase);
                   2464: 
                   2465: int  APIENTRY CRITICAL ExcludeUpdateRgn(IN HDC hDC, IN HWND hWnd);
                   2466: 
                   2467: BOOL APIENTRY CRITICAL XXX InvalidateRect(IN HWND hWnd OPTIONAL,
                   2468:         IN LPRECT lpRect OPTIONAL, IN BOOL bErase);
                   2469: BOOL APIENTRY CRITICAL XXX ValidateRect(IN HWND hWnd OPTIONAL,
                   2470:         IN LPRECT lpRect OPTIONAL);
                   2471: 
                   2472: BOOL APIENTRY CRITICAL InvalidateRgn(IN HWND hWnd, IN HRGN hRgn OPTIONAL,
                   2473:         IN BOOL bErase);
                   2474: BOOL APIENTRY CRITICAL ValidateRgn(IN HWND hWnd, IN HRGN hRgn OPTIONAL);
                   2475: 
                   2476: 
                   2477: BOOL APIENTRY CRITICAL XXX RedrawWindow(IN HWND hwnd,
                   2478:         IN LPRECT lprcUpdate OPTIONAL, IN HRGN hrgnUpdate, IN WORD flags);
                   2479: 
                   2480: /* RedrawWindow() flags */
                   2481: #define RDW_INVALIDATE          0x0001
                   2482: #define RDW_INTERNALPAINT       0x0002
                   2483: #define RDW_ERASE               0x0004
                   2484: 
                   2485: #define RDW_VALIDATE            0x0008
                   2486: #define RDW_NOINTERNALPAINT     0x0010
                   2487: #define RDW_NOERASE             0x0020
                   2488: 
                   2489: #define RDW_NOCHILDREN          0x0040
                   2490: #define RDW_ALLCHILDREN         0x0080
                   2491: 
                   2492: #define RDW_UPDATENOW           0x0100
                   2493: #define RDW_ERASENOW            0x0200
                   2494: 
                   2495: #define RDW_FRAME               0x0400  /* Set WFSENDNCPAINT   */       /* ;Internal */
                   2496: #define RDW_NOFRAME             0x0800  /* Clear WFSENDNCPAINT */       /* ;Internal */
                   2497:                                                                         /* ;Internal */
                   2498: #define RDW_REDRAWWINDOW        0x1000  /* Called from RedrawWindow()*/ /* ;Internal */
                   2499: #define RDW_SUBTRACTSELF        0x2000  /* Subtract self from hrgn   */ /* ;Internal */
                   2500:                                                                         /* ;Internal */
                   2501: #define RDW_COPYRGN             0x4000  /* Copy the passed-in region */ /* ;Internal */
                   2502:                                                                         /* ;Internal */
                   2503: #define RDW_VALIDMASK           (RDW_INVALIDATE | RDW_INTERNALPAINT |   /* ;Internal */ \
                   2504:                                 RDW_ERASE | RDW_VALIDATE |              /* ;Internal */ \
                   2505:                                 RDW_NOINTERNALPAINT | RDW_NOERASE |     /* ;Internal */ \
                   2506:                                 RDW_NOCHILDREN | RDW_ALLCHILDREN |      /* ;Internal */ \
                   2507:                                 RDW_UPDATENOW | RDW_ERASENOW | RDW_COPYRGN) /* ;Internal */
                   2508: 
                   2509: /* LockWindowUpdate API */
                   2510: BOOL APIENTRY CRITICAL LockWindowUpdate(HWND hwndLock);
                   2511: 
                   2512: BOOL APIENTRY CRITICAL XXX ScrollWindow(IN HWND hWnd, IN int XAmount,
                   2513:         IN int YAmount, IN LPRECT lpRect OPTIONAL,
                   2514:         IN LPRECT lpClipRect OPTIONAL);
                   2515: BOOL APIENTRY CRITICAL ScrollDC(IN HDC hDC, IN int dx, IN int dy,
                   2516:         IN LPRECT lprcScroll, IN LPRECT lprcClip OPTIONAL,
                   2517:         IN HRGN hrgnUpdate OPTIONAL, OUT LPRECT lprcUpdate OPTIONAL);
                   2518: int APIENTRY CRITICAL XXX ScrollWindowEx(IN HWND hwnd, IN int dx, IN int dy,
                   2519:         IN LPRECT prcScroll OPTIONAL, IN LPRECT prcClip OPTIONAL,
                   2520:         HRGN hrgnUpdate, OUT LPRECT prcUpdate OPTIONAL, IN WORD flags);
                   2521: 
                   2522: #define SW_SCROLLCHILDREN   0x0001  /* Scroll children within *lprcScroll. */
                   2523: #define SW_INVALIDATE       0x0002  /* Invalidate after scrolling */
                   2524: #define SW_ERASE            0x0004  /* If SW_INVALIDATE, don't send WM_ERASEBACKGROUND */
                   2525: 
                   2526: #define SW_SCROLLWINDOW     0x8000  /* Called from ScrollWindow() */  /* ;Internal */
                   2527: #define SW_VALIDFLAGS       (SW_SCROLLWINDOW | SW_SCROLLCHILDREN | SW_INVALIDATE | SW_ERASE) /* ;Internal */
                   2528: 
                   2529: #ifndef NOSCROLL
                   2530: int  APIENTRY CRITICAL XXX SetScrollPos(IN HWND hWnd, IN int nBar, IN int nPos, IN BOOL bRedraw);
                   2531: int  APIENTRY CRITICAL XXX GetScrollPos(IN HWND hWnd, IN int nBar);
                   2532: BOOL APIENTRY CRITICAL XXX SetScrollRange(IN HWND hWnd, IN int nBar, IN int nMinPos, IN int nMaxPos, IN BOOL bRedraw);
                   2533: BOOL APIENTRY CRITICAL XXX GetScrollRange(IN HWND hWnd, IN int nBar, OUT LPINT lpMinPos, OUT LPINT lpMaxPos);
                   2534: BOOL APIENTRY CRITICAL XXX ShowScrollBar(IN HWND hWnd, IN UINT wBar, IN BOOL bShow);
                   2535: #endif
                   2536: 
                   2537: BOOL
                   2538: APIENTRY CRITICAL
                   2539: SetPropA(
                   2540:     IN HWND hWnd,
                   2541:     IN LPSTRID lpString,
                   2542:     IN HANDLE hData
                   2543:     );
                   2544: BOOL
                   2545: APIENTRY CRITICAL
                   2546: SetPropW(
                   2547:     IN HWND hWnd,
                   2548:     IN LPWSTRID lpString,
                   2549:     IN HANDLE hData
                   2550:     );
                   2551: #ifdef UNICODE
                   2552: #define SetProp SetPropW
                   2553: #else
                   2554: #define SetProp SetPropA
                   2555: #endif // !UNICODE
                   2556: 
                   2557: HANDLE
                   2558: APIENTRY CRITICAL
                   2559: GetPropA(
                   2560:     IN HWND hWnd,
                   2561:     IN LPSTRID lpString
                   2562:     );
                   2563: HANDLE
                   2564: APIENTRY CRITICAL
                   2565: GetPropW(
                   2566:     IN HWND hWnd,
                   2567:     IN LPWSTRID lpString
                   2568:     );
                   2569: #ifdef UNICODE
                   2570: #define GetProp GetPropW
                   2571: #else
                   2572: #define GetProp GetPropA
                   2573: #endif // !UNICODE
                   2574: 
                   2575: HANDLE
                   2576: APIENTRY CRITICAL
                   2577: RemovePropA(
                   2578:     IN HWND hWnd,
                   2579:     IN LPSTRID lpString
                   2580:     );
                   2581: HANDLE
                   2582: APIENTRY CRITICAL
                   2583: RemovePropW(
                   2584:     IN HWND hWnd,
                   2585:     IN LPWSTRID lpString
                   2586:     );
                   2587: #ifdef UNICODE
                   2588: #define RemoveProp RemovePropW
                   2589: #else
                   2590: #define RemoveProp RemovePropA
                   2591: #endif // !UNICODE
                   2592: 
                   2593: int
                   2594: APIENTRY CRITICAL
                   2595: EnumPropsExA(
                   2596:     IN HWND hWnd,
                   2597:     IN FARPROC lpEnumFunc,
                   2598:     IN DWORD lParam
                   2599:     );
                   2600: int
                   2601: APIENTRY CRITICAL
                   2602: EnumPropsExW(
                   2603:     IN HWND hWnd,
                   2604:     IN FARPROC lpEnumFunc,
                   2605:     IN DWORD lParam
                   2606:     );
                   2607: #ifdef UNICODE
                   2608: #define EnumPropsEx EnumPropsExW
                   2609: #else
                   2610: #define EnumPropsEx EnumPropsExA
                   2611: #endif // !UNICODE
                   2612: 
                   2613: int
                   2614: APIENTRY CRITICAL
                   2615: EnumPropsA(
                   2616:     IN HWND hWnd,
                   2617:     IN FARPROC lpEnumFunc
                   2618:     );
                   2619: int
                   2620: APIENTRY CRITICAL
                   2621: EnumPropsW(
                   2622:     IN HWND hWnd,
                   2623:     IN FARPROC lpEnumFunc
                   2624:     );
                   2625: #ifdef UNICODE
                   2626: #define EnumProps EnumPropsW
                   2627: #else
                   2628: #define EnumProps EnumPropsA
                   2629: #endif // !UNICODE
                   2630: 
                   2631: BOOL
                   2632: APIENTRY CRITICAL XXX
                   2633: SetWindowTextA(
                   2634:     IN HWND hWnd,
                   2635:     IN LPSTR lpString OPTIONAL
                   2636:     );
                   2637: BOOL
                   2638: APIENTRY CRITICAL XXX
                   2639: SetWindowTextW(
                   2640:     IN HWND hWnd,
                   2641:     IN LPWSTR lpString OPTIONAL
                   2642:     );
                   2643: #ifdef UNICODE
                   2644: #define SetWindowText SetWindowTextW
                   2645: #else
                   2646: #define SetWindowText SetWindowTextA
                   2647: #endif // !UNICODE
                   2648: 
                   2649: int
                   2650: APIENTRY CRITICAL XXX
                   2651: GetWindowTextA(
                   2652:     IN HWND hWnd,
                   2653:     NEXTCOUNT IN OUT OUTLPSTR lpString,
                   2654:     IN int nMaxCount
                   2655:     );
                   2656: int
                   2657: APIENTRY CRITICAL XXX
                   2658: GetWindowTextW(
                   2659:     IN HWND hWnd,
                   2660:     NEXTCOUNT IN OUT OUTLPWSTR lpString,
                   2661:     IN int nMaxCount
                   2662:     );
                   2663: #ifdef UNICODE
                   2664: #define GetWindowText GetWindowTextW
                   2665: #else
                   2666: #define GetWindowText GetWindowTextA
                   2667: #endif // !UNICODE
                   2668: 
                   2669: int    APIENTRY CRITICAL XXX GetWindowTextLength(IN HWND hWnd);
                   2670: 
                   2671: BOOL APIENTRY CRITICAL GetClientRect(IN HWND hWnd, OUT LPRECT lpRect);
                   2672: BOOL APIENTRY CRITICAL GetWindowRect(IN HWND hWnd, OUT LPRECT lpRect);
                   2673: BOOL APIENTRY CRITICAL AdjustWindowRect(IN OUT LPRECT lpRect, IN LONG dwStyle, IN BOOL bMenu);
                   2674: BOOL APIENTRY CRITICAL AdjustWindowRectEx(IN OUT LPRECT lpRect, IN LONG dwStyle, IN BOOL bMenu, IN DWORD dwExStyle);
                   2675: 
                   2676: #ifndef NOMB
                   2677: 
                   2678: /* MessageBox() Flags */
                   2679: #define MB_OK               0x0000L
                   2680: #define MB_OKCANCEL         0x0001L
                   2681: #define MB_ABORTRETRYIGNORE 0x0002L
                   2682: #define MB_YESNOCANCEL      0x0003L
                   2683: #define MB_YESNO            0x0004L
                   2684: #define MB_RETRYCANCEL      0x0005L
                   2685: 
                   2686: #define MB_ICONHAND         0x0010L
                   2687: #define MB_ICONQUESTION     0x0020L
                   2688: #define MB_ICONEXCLAMATION  0x0030L
                   2689: #define MB_ICONASTERISK     0x0040L
                   2690: 
                   2691: #define MB_ICONINFORMATION  MB_ICONASTERISK
                   2692: #define MB_ICONSTOP         MB_ICONHAND
                   2693: 
                   2694: #define MB_DEFBUTTON1       0x0000L
                   2695: #define MB_DEFBUTTON2       0x0100L
                   2696: #define MB_DEFBUTTON3       0x0200L
                   2697: 
                   2698: #define MB_APPLMODAL        0x0000L
                   2699: #define MB_SYSTEMMODAL      0x1000L
                   2700: #define MB_TASKMODAL        0x2000L
                   2701: 
                   2702: #define MB_NOFOCUS          0x8000L
                   2703: #define MB_SETFOREGROUND   0x10000L
                   2704: 
                   2705: #define MB_TYPEMASK         0x000FL
                   2706: #define MB_ICONMASK         0x00F0L
                   2707: #define MB_DEFMASK          0x0F00L
                   2708: #define MB_MODEMASK         0x3000L
                   2709: #define MB_MISCMASK         0xC000L
                   2710: 
                   2711: int
                   2712: APIENTRY CRITICAL XXX
                   2713: MessageBoxA(
                   2714:     IN HWND hWnd OPTIONAL,
                   2715:     IN LPSTR lpText,
                   2716:     IN LPSTR lpCaption OPTIONAL,
                   2717:     IN UINT wType
                   2718:     );
                   2719: int
                   2720: APIENTRY CRITICAL XXX
                   2721: MessageBoxW(
                   2722:     IN HWND hWnd OPTIONAL,
                   2723:     IN LPWSTR lpText,
                   2724:     IN LPWSTR lpCaption OPTIONAL,
                   2725:     IN UINT wType
                   2726:     );
                   2727: #ifdef UNICODE
                   2728: #define MessageBox MessageBoxW
                   2729: #else
                   2730: #define MessageBox MessageBoxA
                   2731: #endif // !UNICODE
                   2732: 
                   2733: BOOL APIENTRY CRITICAL MessageBeep(IN UINT wType);
                   2734: 
                   2735: #endif /* NOMB */
                   2736: 
                   2737: int     APIENTRY CRITICAL ShowCursor(IN BOOL bShow);
                   2738: BOOL    APIENTRY CRITICAL SetCursorPos(IN int X, IN int Y);
                   2739: HCURSOR APIENTRY CRITICAL SetCursor(IN HCURSOR hCursor OPTIONAL);
                   2740: BOOL    APIENTRY CRITICAL GetCursorPos(OUT LPPOINT lpPoint);
                   2741: BOOL    APIENTRY CRITICAL ClipCursor(IN LPRECT lpRect OPTIONAL);
                   2742: BOOL    APIENTRY CRITICAL GetClipCursor(OUT LPRECT lpRect);
                   2743: 
                   2744: BOOL APIENTRY CRITICAL CreateCaret(IN HWND hWnd, IN HBITMAP hBitmap OPTIONAL,
                   2745:         IN int nWidth, IN int nHeight);
                   2746: UINT APIENTRY CRITICAL GetCaretBlinkTime(void);
                   2747: BOOL APIENTRY CRITICAL SetCaretBlinkTime(IN UINT wMSeconds);
                   2748: BOOL APIENTRY CRITICAL DestroyCaret(void);
                   2749: BOOL APIENTRY CRITICAL HideCaret(IN HWND hWnd OPTIONAL);
                   2750: BOOL APIENTRY CRITICAL ShowCaret(IN HWND hWnd OPTIONAL);
                   2751: BOOL APIENTRY CRITICAL SetCaretPos(IN int X, IN int Y);
                   2752: BOOL APIENTRY CRITICAL GetCaretPos(OUT LPPOINT lpPoint);
                   2753: 
                   2754: BOOL APIENTRY CRITICAL ClientToScreen(IN HWND hWnd, IN OUT LPPOINT lpPoint);
                   2755: BOOL APIENTRY CRITICAL ScreenToClient(IN HWND hWnd, IN OUT LPPOINT lpPoint);
                   2756: HWND APIENTRY CRITICAL XXX WindowFromPoint(IN POINT Point);
                   2757: HWND APIENTRY CRITICAL ChildWindowFromPoint(IN HWND hWndParent, IN POINT Point);
                   2758: 
                   2759: #ifndef NOCOLOR
                   2760: 
                   2761: /* Color Types */
                   2762: #define CTLCOLOR_MSGBOX         0
                   2763: #define CTLCOLOR_EDIT           1
                   2764: #define CTLCOLOR_LISTBOX        2
                   2765: #define CTLCOLOR_BTN            3
                   2766: #define CTLCOLOR_DLG            4
                   2767: #define CTLCOLOR_SCROLLBAR      5
                   2768: #define CTLCOLOR_STATIC         6
                   2769: #define CTLCOLOR_MAX            8     /* three bits max */
                   2770: 
                   2771: #define COLOR_SCROLLBAR         0
                   2772: #define COLOR_BACKGROUND        1
                   2773: #define COLOR_ACTIVECAPTION     2
                   2774: #define COLOR_INACTIVECAPTION   3
                   2775: #define COLOR_MENU              4
                   2776: #define COLOR_WINDOW            5
                   2777: #define COLOR_WINDOWFRAME       6
                   2778: #define COLOR_MENUTEXT          7
                   2779: #define COLOR_WINDOWTEXT        8
                   2780: #define COLOR_CAPTIONTEXT       9
                   2781: #define COLOR_ACTIVEBORDER      10
                   2782: #define COLOR_INACTIVEBORDER    11
                   2783: #define COLOR_APPWORKSPACE      12
                   2784: #define COLOR_HIGHLIGHT         13
                   2785: #define COLOR_HIGHLIGHTTEXT     14
                   2786: #define COLOR_BTNFACE           15
                   2787: #define COLOR_BTNSHADOW         16
                   2788: #define COLOR_GRAYTEXT          17
                   2789: #define COLOR_BTNTEXT           18
                   2790: #define COLOR_INACTIVECAPTIONTEXT 19
                   2791: #define COLOR_BTNHIGHLIGHT      20
                   2792: #define COLOR_ENDCOLORS         COLOR_BTNHIGHLIGHT
                   2793: 
                   2794: DWORD APIENTRY CRITICAL GetSysColor(IN int nIndex);
                   2795: BOOL  APIENTRY CRITICAL XXX SetSysColors(IN int, IN LPSYSCOLOR, IN LPCOLORVALUES);
                   2796: 
                   2797: #endif /* NOCOLOR */
                   2798: 
                   2799: BOOL APIENTRY CRITICAL DrawFocusRect(HDC, LPRECT);
                   2800: int  APIENTRY CRITICAL FillRect(HDC hdc, LPRECT lprc, HBRUSH hbr);
                   2801: int  APIENTRY CRITICAL FrameRect(IN HDC hdc, IN LPRECT lprc, IN HBRUSH hbr);
                   2802: BOOL APIENTRY CRITICAL InvertRect(HDC, LPRECT);
                   2803: BOOL APIENTRY SetRect(LPRECT, int, int, int, int);
                   2804: BOOL APIENTRY SetRectEmpty(LPRECT);
                   2805: int  APIENTRY CopyRect(LPRECT, LPRECT);
                   2806: BOOL APIENTRY InflateRect(LPRECT, int, int);
                   2807: int  APIENTRY IntersectRect(LPRECT, LPRECT, LPRECT);
                   2808: BOOL APIENTRY UnionRect(LPRECT, LPRECT, LPRECT);
                   2809: BOOL APIENTRY OffsetRect(LPRECT, int, int);
                   2810: BOOL APIENTRY IsRectEmpty(LPRECT);
                   2811: BOOL APIENTRY EqualRect(LPRECT, LPRECT);
                   2812: BOOL APIENTRY PtInRect(LPRECT, POINT);
                   2813: DWORD APIENTRY CRITICAL GetCurrentTime(void);
                   2814: 
                   2815: #ifndef NOWINOFFSETS
                   2816: 
                   2817: WORD APIENTRY CRITICAL GetWindowWord(IN HWND hWnd, IN int nIndex);
                   2818: WORD APIENTRY CRITICAL SetWindowWord(IN HWND hWnd, IN int nIndex, IN WORD wNewWord);
                   2819: LONG  APIENTRY CRITICAL GetWindowLong(IN HWND hWnd, IN int nIndex);
                   2820: LONG  APIENTRY CRITICAL SetWindowLong(IN HWND hWnd, IN int nIndex, IN LONG dwNewLong);
                   2821: WORD APIENTRY CRITICAL GetClassWord(IN HWND hWnd, IN int nIndex);
                   2822: WORD APIENTRY CRITICAL SetClassWord(IN HWND hWnd, IN int nIndex, IN WORD wNewWord);
                   2823: DWORD APIENTRY CRITICAL GetClassLong(IN HWND hWnd, IN int nIndex);
                   2824: DWORD APIENTRY CRITICAL SetClassLong(IN HWND hWnd, IN int nIndex, IN LONG dwNewLong);
                   2825: HWND APIENTRY CRITICAL GetDesktopWindow(void);
                   2826: BOOL APIENTRY CRITICAL SetDeskWallpaper(IN LPSTR lpString OPTIONAL);
                   2827: 
                   2828: #endif /* NOWINOFFSETS */
                   2829: 
                   2830: HWND APIENTRY CRITICAL GetParent(IN HWND hWnd);
                   2831: HWND APIENTRY CRITICAL XXX SetParent(IN HWND hWndChild, IN HWND hWndNewParent OPTIONAL);
                   2832: BOOL APIENTRY CRITICAL XXX EnumChildWindows(IN HWND hWndParent, IN FARPROC lpEnumFunc, IN LONG lParam);
                   2833: 
                   2834: HWND
                   2835: APIENTRY CRITICAL XXX
                   2836: FindWindowA(
                   2837:     IN LPSTRID lpClassName OPTIONAL,
                   2838:     IN LPSTR lpWindowName OPTIONAL
                   2839:     );
                   2840: HWND
                   2841: APIENTRY CRITICAL XXX
                   2842: FindWindowW(
                   2843:     IN LPWSTRID lpClassName OPTIONAL,
                   2844:     IN LPWSTR lpWindowName OPTIONAL
                   2845:     );
                   2846: #ifdef UNICODE
                   2847: #define FindWindow FindWindowW
                   2848: #else
                   2849: #define FindWindow FindWindowA
                   2850: #endif // !UNICODE
                   2851: 
                   2852: BOOL APIENTRY CRITICAL XXX EnumWindows(IN FARPROC lpEnumFunc, IN LONG lParam);
                   2853: BOOL APIENTRY CRITICAL XXX EnumThreadWindows(IN DWORD dwThreadId, IN FARPROC lpfn, IN LONG lParam);
                   2854: #define EnumTaskWindows(hTask, lpfn, lParam) EnumThreadWindows((DWORD)hTask, lpfn, lParam)
                   2855: 
                   2856: int
                   2857: APIENTRY CRITICAL
                   2858: GetClassNameA(
                   2859:     IN HWND hWnd,
                   2860:     NEXTCOUNT IN OUT OUTLPSTR lpClassName,
                   2861:     IN int nMaxCount
                   2862:     );
                   2863: int
                   2864: APIENTRY CRITICAL
                   2865: GetClassNameW(
                   2866:     IN HWND hWnd,
                   2867:     NEXTCOUNT IN OUT OUTLPWSTR lpClassName,
                   2868:     IN int nMaxCount
                   2869:     );
                   2870: #ifdef UNICODE
                   2871: #define GetClassName GetClassNameW
                   2872: #else
                   2873: #define GetClassName GetClassNameA
                   2874: #endif // !UNICODE
                   2875: 
                   2876: HWND APIENTRY CRITICAL GetTopWindow(IN HWND hWnd);
                   2877: #define GetNextWindow(hwnd, wCmd) GetWindow(hwnd, wCmd)
                   2878: #define GetSysModalWindow() (NULL)
                   2879: #define SetSysModalWindow(hwnd) (NULL)
                   2880: DWORD APIENTRY CRITICAL GetWindowThreadProcessId(IN HWND hWnd,
                   2881:         IN LPDWORD lpdwProcessId OPTIONAL);
                   2882: #define GetWindowTask(hwnd)\
                   2883:         ((HANDLE)GetWindowThreadProcessId(hwnd, NULL))
                   2884: 
                   2885: HWND APIENTRY CRITICAL GetLastActivePopup(IN HWND hWnd);
                   2886: 
                   2887: /* GetWindow() Constants */
                   2888: #define GW_HWNDFIRST        0
                   2889: #define GW_HWNDLAST         1
                   2890: #define GW_HWNDNEXT         2
                   2891: #define GW_HWNDPREV         3
                   2892: #define GW_OWNER            4
                   2893: #define GW_CHILD            5
                   2894: 
                   2895: HWND APIENTRY CRITICAL GetWindow(IN HWND hWnd, IN UINT wCmd);
                   2896: 
                   2897: #ifndef NOWH
                   2898: 
                   2899: PROC
                   2900: APIENTRY CRITICAL
                   2901: SetWindowsHookA(
                   2902:     IN int nFilterType,
                   2903:     IN PROC pfnFilterProc
                   2904:     );
                   2905: PROC
                   2906: APIENTRY CRITICAL
                   2907: SetWindowsHookW(
                   2908:     IN int nFilterType,
                   2909:     IN PROC pfnFilterProc
                   2910:     );
                   2911: #ifdef UNICODE
                   2912: #define SetWindowsHook SetWindowsHookW
                   2913: #else
                   2914: #define SetWindowsHook SetWindowsHookA
                   2915: #endif // !UNICODE
                   2916: 
                   2917: BOOL  APIENTRY CRITICAL UnhookWindowsHook(IN int nCode, IN PROC pfnFilterProc);
                   2918: 
                   2919: HHOOK
                   2920: APIENTRY CRITICAL
                   2921: SetWindowsHookExA(
                   2922:     IN HANDLE hmod,
                   2923:     IN DWORD dwThreadId,
                   2924:     IN int nFilterType,
                   2925:     IN PROC pfnFilterProc
                   2926:     );
                   2927: HHOOK
                   2928: APIENTRY CRITICAL
                   2929: SetWindowsHookExW(
                   2930:     IN HANDLE hmod,
                   2931:     IN DWORD dwThreadId,
                   2932:     IN int nFilterType,
                   2933:     IN PROC pfnFilterProc
                   2934:     );
                   2935: #ifdef UNICODE
                   2936: #define SetWindowsHookEx SetWindowsHookExW
                   2937: #else
                   2938: #define SetWindowsHookEx SetWindowsHookExA
                   2939: #endif // !UNICODE
                   2940: 
                   2941: BOOL  APIENTRY CRITICAL UnhookWindowsHookEx(IN HHOOK hhk);
                   2942: DWORD APIENTRY CRITICAL XXX CallNextHookProc(IN int nCode, IN DWORD wParam,
                   2943:         IN LONG lParam);
                   2944: 
                   2945: /*
                   2946:  * Macros for source-level compatibility with old functions.
                   2947:  */
                   2948: #define DefHookProc(nCode, wParam, lParam, ppfnNextHook)\
                   2949:         CallNextHookProc(nCode, wParam, lParam)
                   2950: #endif
                   2951: 
                   2952: #ifndef NOMENUS
                   2953: 
                   2954: /* Menu flags for Add/Check/EnableMenuItem() */
                   2955: #define MF_INSERT          0x00000000L
                   2956: #define MF_CHANGE          0x00000080L
                   2957: #define MF_APPEND          0x00000100L
                   2958: #define MF_DELETE          0x00000200L
                   2959: #define MF_REMOVE          0x00001000L
                   2960: 
                   2961: #define MF_BYCOMMAND       0x00000000L
                   2962: #define MF_BYPOSITION      0x00000400L
                   2963: 
                   2964: 
                   2965: #define MF_SEPARATOR       0x00000800L
                   2966: 
                   2967: #define MF_ENABLED         0x00000000L
                   2968: #define MF_GRAYED          0x00000001L
                   2969: #define MF_DISABLED        0x00000002L
                   2970: 
                   2971: #define MF_UNCHECKED       0x00000000L
                   2972: #define MF_CHECKED         0x00000008L
                   2973: #define MF_USECHECKBITMAPS 0x00000200L
                   2974: 
                   2975: #define MF_STRING          0x00000000L
                   2976: #define MF_BITMAP          0x00000004L
                   2977: #define MF_OWNERDRAW       0x00000100L
                   2978: 
                   2979: #define MF_POPUP           0x00000010L
                   2980: #define MF_MENUBARBREAK    0x00000020L
                   2981: #define MF_MENUBREAK       0x00000040L
                   2982: 
                   2983: #define MF_UNHILITE        0x00000000L
                   2984: #define MF_HILITE          0x00000080L
                   2985: 
                   2986: #define MF_SYSMENU         0x00002000L
                   2987: #define MF_HELP            0x00004000L
                   2988: #define MF_MOUSESELECT     0x00008000L
                   2989: 
                   2990: /* Menu item resource format */
                   2991: typedef struct {
                   2992:     WORD versionNumber;
                   2993:     WORD offset;
                   2994: } MENUITEMTEMPLATEHEADER;
                   2995: 
                   2996: typedef struct {
                   2997:     WORD mtOption;
                   2998:     WORD mtID;
                   2999:     char mtString[1];
                   3000: } MENUITEMTEMPLATE;
                   3001: 
                   3002: #define MF_END             0x00000080L
                   3003: 
                   3004: #endif /* NOMENUS */
                   3005: 
                   3006: #ifndef NOSYSCOMMANDS
                   3007: 
                   3008: /* System Menu Command Values */
                   3009: #define SC_SIZE         0xF000
                   3010: #define SC_MOVE         0xF010
                   3011: #define SC_MINIMIZE     0xF020
                   3012: #define SC_MAXIMIZE     0xF030
                   3013: #define SC_NEXTWINDOW   0xF040
                   3014: #define SC_PREVWINDOW   0xF050
                   3015: #define SC_CLOSE        0xF060
                   3016: #define SC_VSCROLL      0xF070
                   3017: #define SC_HSCROLL      0xF080
                   3018: #define SC_MOUSEMENU    0xF090
                   3019: #define SC_KEYMENU      0xF100
                   3020: #define SC_ARRANGE      0xF110
                   3021: #define SC_RESTORE      0xF120
                   3022: #define SC_TASKLIST     0xF130
                   3023: #define SC_SCREENSAVE   0xF140
                   3024: #define SC_HOTKEY       0xF150
                   3025: 
                   3026: #define SC_ICON         SC_MINIMIZE
                   3027: #define SC_ZOOM         SC_MAXIMIZE
                   3028: 
                   3029: #endif /* NOSYSCOMMANDS */
                   3030: 
                   3031: /* Resource Loading Routines */
                   3032: 
                   3033: HBITMAP
                   3034: APIENTRY
                   3035: LoadBitmapA(
                   3036:     IN HANDLE hInstance,
                   3037:     IN LPSTRID lpBitmapName
                   3038:     );
                   3039: HBITMAP
                   3040: APIENTRY
                   3041: LoadBitmapW(
                   3042:     IN HANDLE hInstance,
                   3043:     IN LPWSTRID lpBitmapName
                   3044:     );
                   3045: #ifdef UNICODE
                   3046: #define LoadBitmap LoadBitmapW
                   3047: #else
                   3048: #define LoadBitmap LoadBitmapA
                   3049: #endif // !UNICODE
                   3050: 
                   3051: HCURSOR
                   3052: APIENTRY CRITICAL
                   3053: LoadCursorA(
                   3054:     IN HANDLE hInstance,
                   3055:     IN LPSTRID lpCursorName
                   3056:     );
                   3057: HCURSOR
                   3058: APIENTRY CRITICAL
                   3059: LoadCursorW(
                   3060:     IN HANDLE hInstance,
                   3061:     IN LPWSTRID lpCursorName
                   3062:     );
                   3063: #ifdef UNICODE
                   3064: #define LoadCursor LoadCursorW
                   3065: #else
                   3066: #define LoadCursor LoadCursorA
                   3067: #endif // !UNICODE
                   3068: 
                   3069: HCURSOR APIENTRY CRITICAL CreateCursor(IN HANDLE, IN int, IN int, IN int, IN int,
                   3070:         IN LPMONO1BITS, IN LPMONO2BITS);
                   3071: HCURSOR APIENTRY CRITICAL CreateDIBCursor(NEXTCOUNT IN LPSTR lpCursorRes,
                   3072:         IN DWORD cb, IN UINT xHotspot, IN UINT yHotspot);
                   3073: BOOL    APIENTRY CRITICAL DestroyCursor(IN HCURSOR);
                   3074: 
                   3075: /* Standard Cursor IDs */
                   3076: #define IDC_ARROW           MAKEINTRESOURCE(32512)
                   3077: #define IDC_IBEAM           MAKEINTRESOURCE(32513)
                   3078: #define IDC_WAIT            MAKEINTRESOURCE(32514)
                   3079: #define IDC_CROSS           MAKEINTRESOURCE(32515)
                   3080: #define IDC_UPARROW         MAKEINTRESOURCE(32516)
                   3081: #define IDC_SIZE            MAKEINTRESOURCE(32640)
                   3082: #define IDC_ICON            MAKEINTRESOURCE(32641)
                   3083: #define IDC_SIZENWSE        MAKEINTRESOURCE(32642)
                   3084: #define IDC_SIZENESW        MAKEINTRESOURCE(32643)
                   3085: #define IDC_SIZEWE          MAKEINTRESOURCE(32644)
                   3086: #define IDC_SIZENS          MAKEINTRESOURCE(32645)
                   3087: #define IDC_SIZEALL         MAKEINTRESOURCE(32646)
                   3088: #define IDC_NO              MAKEINTRESOURCE(32648)
                   3089: 
                   3090: typedef struct _ICONINFO {
                   3091:     BOOL    fIcon;
                   3092:     DWORD   xHotspot;
                   3093:     DWORD   yHotspot;
                   3094:     HBITMAP hbmMask;
                   3095:     HBITMAP hbmColor;
                   3096: } ICONINFO;
                   3097: typedef ICONINFO *PICONINFO;
                   3098: 
                   3099: HICON
                   3100: APIENTRY CRITICAL
                   3101: LoadIconA(
                   3102:     IN HANDLE hInstance,
                   3103:     IN LPSTRID lpIconName
                   3104:     );
                   3105: HICON
                   3106: APIENTRY CRITICAL
                   3107: LoadIconW(
                   3108:     IN HANDLE hInstance,
                   3109:     IN LPWSTRID lpIconName
                   3110:     );
                   3111: #ifdef UNICODE
                   3112: #define LoadIcon LoadIconW
                   3113: #else
                   3114: #define LoadIcon LoadIconA
                   3115: #endif // !UNICODE
                   3116: 
                   3117: HICON APIENTRY CRITICAL CreateIcon(IN HANDLE, IN int, IN int, IN BYTE, IN BYTE, IN LPBYTE, IN LPBYTE);
                   3118: BOOL  APIENTRY CRITICAL DestroyIcon(IN HICON);
                   3119: int   APIENTRY LookupIconIdFromDirectory(IN PBYTE presbits, IN BOOL fIcon);
                   3120: HICON APIENTRY CreateIconFromResource(PBYTE presbits, DWORD dwResSize,
                   3121:         BOOL fIcon, DWORD dwVer);
                   3122: HICON APIENTRY CreateIconIndirect(IN PICONINFO piconinfo);
                   3123: BOOL  APIENTRY GetIconInfo(IN HICON hIcon, OUT PICONINFO piconinfo);
                   3124: 
                   3125: #ifdef OEMRESOURCE
                   3126: 
                   3127: /* OEM Resource Ordinal Numbers */
                   3128: #define OBM_CLOSE           32754
                   3129: #define OBM_UPARROW         32753
                   3130: #define OBM_DNARROW         32752
                   3131: #define OBM_RGARROW         32751
                   3132: #define OBM_LFARROW         32750
                   3133: #define OBM_REDUCE          32749
                   3134: #define OBM_ZOOM            32748
                   3135: #define OBM_RESTORE         32747
                   3136: #define OBM_REDUCED         32746
                   3137: #define OBM_ZOOMD           32745
                   3138: #define OBM_RESTORED        32744
                   3139: #define OBM_UPARROWD        32743
                   3140: #define OBM_DNARROWD        32742
                   3141: #define OBM_RGARROWD        32741
                   3142: #define OBM_LFARROWD        32740
                   3143: #define OBM_MNARROW         32739
                   3144: #define OBM_COMBO           32738
                   3145: #define OBM_UPARROWI        32737
                   3146: #define OBM_DNARROWI        32736
                   3147: #define OBM_RGARROWI        32735
                   3148: #define OBM_LFARROWI        32734
                   3149: 
                   3150: #define OBM_OLD_CLOSE       32767
                   3151: #define OBM_SIZE            32766
                   3152: #define OBM_OLD_UPARROW     32765
                   3153: #define OBM_OLD_DNARROW     32764
                   3154: #define OBM_OLD_RGARROW     32763
                   3155: #define OBM_OLD_LFARROW     32762
                   3156: #define OBM_BTSIZE          32761
                   3157: #define OBM_CHECK           32760
                   3158: #define OBM_CHECKBOXES      32759
                   3159: #define OBM_BTNCORNERS      32758
                   3160: #define OBM_OLD_REDUCE      32757
                   3161: #define OBM_OLD_ZOOM        32756
                   3162: #define OBM_OLD_RESTORE     32755
                   3163: 
                   3164: #define OCR_NORMAL          32512
                   3165: #define OCR_IBEAM           32513
                   3166: #define OCR_WAIT            32514
                   3167: #define OCR_CROSS           32515
                   3168: #define OCR_UP              32516
                   3169: #define OCR_SIZE            32640
                   3170: #define OCR_ICON            32641
                   3171: #define OCR_SIZENWSE        32642
                   3172: #define OCR_SIZENESW        32643
                   3173: #define OCR_SIZEWE          32644
                   3174: #define OCR_SIZENS          32645
                   3175: #define OCR_SIZEALL         32646
                   3176: #define OCR_ICOCUR          32647
                   3177: #define OCR_NO              32648
                   3178: 
                   3179: #define OIC_SAMPLE          32512
                   3180: #define OIC_HAND            32513
                   3181: #define OIC_QUES            32514
                   3182: #define OIC_BANG            32515
                   3183: #define OIC_NOTE            32516
                   3184: 
                   3185: #endif /* OEMRESOURCE */
                   3186: 
                   3187: #define ORD_LANGDRIVER    1     /* The ordinal number for the entry point of
                   3188:                                 ** language drivers.
                   3189:                                 */
                   3190: 
                   3191: #ifndef NOICONS
                   3192: 
                   3193: /* Standard Icon IDs */
                   3194: #define IDI_APPLICATION   MAKEINTRESOURCE(32512)
                   3195: #define IDI_HAND          MAKEINTRESOURCE(32513)
                   3196: #define IDI_QUESTION      MAKEINTRESOURCE(32514)
                   3197: #define IDI_EXCLAMATION   MAKEINTRESOURCE(32515)
                   3198: #define IDI_ASTERISK      MAKEINTRESOURCE(32516)
                   3199: 
                   3200: #endif /* NOICONS */
                   3201: 
                   3202: int
                   3203: APIENTRY
                   3204: LoadStringA(
                   3205:     IN HANDLE hInstance,
                   3206:     IN UINT wID,
                   3207:     NEXTCOUNT IN OUT OUTLPSTR lpBuffer,
                   3208:     IN int nBufferMax
                   3209:     );
                   3210: int
                   3211: APIENTRY
                   3212: LoadStringW(
                   3213:     IN HANDLE hInstance,
                   3214:     IN UINT wID,
                   3215:     NEXTCOUNT IN OUT OUTLPWSTR lpBuffer,
                   3216:     IN int nBufferMax
                   3217:     );
                   3218: #ifdef UNICODE
                   3219: #define LoadString LoadStringW
                   3220: #else
                   3221: #define LoadString LoadStringA
                   3222: #endif // !UNICODE
                   3223: 
                   3224: #ifndef NOKANJI
                   3225: 
                   3226: #define CP_HWND           0
                   3227: #define CP_OPEN           1
                   3228: #define CP_DIRECT         2
                   3229: 
                   3230: /* VK from the keyboard driver */
                   3231: #define VK_KANA           0x15
                   3232: #define VK_ROMAJI         0x16
                   3233: #define VK_ZENKAKU        0x17
                   3234: #define VK_HIRAGANA       0x18
                   3235: #define VK_KANJI          0x19
                   3236: 
                   3237: /* VK to send to Applications */
                   3238: #define VK_CONVERT        0x1C
                   3239: #define VK_NONCONVERT     0x1D
                   3240: #define VK_ACCEPT         0x1E
                   3241: #define VK_MODECHANGE     0x1F
                   3242: 
                   3243: /* Conversion function numbers */
                   3244: #define KNJ_START         0x01
                   3245: #define KNJ_END           0x02
                   3246: #define KNJ_QUERY         0x03
                   3247: 
                   3248: #define KNJ_LEARN_MODE    0x10
                   3249: #define KNJ_GETMODE       0x11
                   3250: #define KNJ_SETMODE       0x12
                   3251: 
                   3252: #define KNJ_CODECONVERT   0x20
                   3253: #define KNJ_CONVERT       0x21
                   3254: #define KNJ_NEXT          0x22
                   3255: #define KNJ_PREVIOUS      0x23
                   3256: #define KNJ_ACCEPT        0x24
                   3257: 
                   3258: #define KNJ_LEARN         0x30
                   3259: #define KNJ_REGISTER      0x31
                   3260: #define KNJ_REMOVE        0x32
                   3261: #define KNJ_CHANGE_UDIC   0x33
                   3262: 
                   3263: /* NOTE: DEFAULT        = 0
                   3264:  *       JIS1           = 1
                   3265:  *       JIS2           = 2
                   3266:  *       SJIS2          = 3
                   3267:  *       JIS1KATAKANA   = 4
                   3268:  *       SJIS2HIRAGANA  = 5
                   3269:  *       SJIS2KATAKANA  = 6
                   3270:  *       OEM            = F
                   3271:  */
                   3272: 
                   3273: #define KNJ_JIS1toJIS1KATAKANA  0x14
                   3274: #define KNJ_JIS1toSJIS2         0x13
                   3275: #define KNJ_JIS1toSJIS2HIRAGANA 0x15
                   3276: #define KNJ_JIS1toSJIS2KATAKANA 0x16
                   3277: #define KNJ_JIS1toDEFAULT       0x10
                   3278: #define KNJ_JIS1toSJIS2OEM      0x1F
                   3279: #define KNJ_JIS2toSJIS2         0x23
                   3280: #define KNJ_SJIS2toJIS2         0x32
                   3281: 
                   3282: #define KNJ_MD_ALPHA            0x01
                   3283: #define KNJ_MD_HIRAGANA         0x02
                   3284: #define KNJ_MD_HALF             0x04
                   3285: #define KNJ_MD_JIS              0x08
                   3286: #define KNJ_MD_SPECIAL          0x10
                   3287: 
                   3288: #define KNJ_CVT_NEXT            0x01
                   3289: #define KNJ_CVT_PREV            0x02
                   3290: #define KNJ_CVT_KATAKANA        0x03
                   3291: #define KNJ_CVT_HIRAGANA        0x04
                   3292: #define KNJ_CVT_JIS1            0x05
                   3293: #define KNJ_CVT_SJIS2           0x06
                   3294: #define KNJ_CVT_DEFAULT         0x07
                   3295: #define KNJ_CVT_TYPED           0x08
                   3296: 
                   3297: typedef struct {
                   3298:     int         fnc;
                   3299:     int         wParam;
                   3300:     LPSTR       lpSource;
                   3301:     LPSTR       lpDest;
                   3302:     int         wCount;
                   3303:     LPSTRNULL  lpReserved1;
                   3304:     LPSTRNULL  lpReserved2;
                   3305: } KANJISTRUCT, FAR *LPKANJISTRUCT;
                   3306: 
                   3307: int  APIENTRY ConvertRequest(HWND, LPKANJISTRUCT);
                   3308: BOOL APIENTRY SetConvertParams(int, int);
                   3309: VOID APIENTRY SetConvertHook(BOOL);
                   3310: 
                   3311: #endif
                   3312: 
                   3313: /* Key Conversion Window */
                   3314: BOOL APIENTRY IsTwoByteCharPrefix(char);
                   3315: 
                   3316: /* Dialog Box Command IDs */
                   3317: #define IDOK                1
                   3318: #define IDCANCEL            2
                   3319: #define IDABORT             3
                   3320: #define IDRETRY             4
                   3321: #define IDIGNORE            5
                   3322: #define IDYES               6
                   3323: #define IDNO                7
                   3324: 
                   3325: #ifndef NOCTLMGR
                   3326: 
                   3327: /* Control Manager Structures and Definitions */
                   3328: 
                   3329: #ifndef NOWINSTYLES
                   3330: 
                   3331: /* Edit Control Styles */
                   3332: #define ES_LEFT             0x0000L
                   3333: #define ES_CENTER           0x0001L
                   3334: #define ES_RIGHT            0x0002L
                   3335: #define ES_MULTILINE        0x0004L
                   3336: #define ES_UPPERCASE        0x0008L
                   3337: #define ES_LOWERCASE        0x0010L
                   3338: #define ES_PASSWORD         0x0020L
                   3339: #define ES_AUTOVSCROLL      0x0040L
                   3340: #define ES_AUTOHSCROLL      0x0080L
                   3341: #define ES_NOHIDESEL        0x0100L
                   3342: #define ES_OEMCONVERT       0x0400L
                   3343: #define ES_READONLY         0x0800L
                   3344: 
                   3345: 
                   3346: #endif /* NOWINSTYLES */
                   3347: 
                   3348: /* Edit Control Notification Codes */
                   3349: #define EN_SETFOCUS         0x0100
                   3350: #define EN_KILLFOCUS        0x0200
                   3351: #define EN_CHANGE           0x0300
                   3352: #define EN_UPDATE           0x0400
                   3353: #define EN_ERRSPACE         0x0500
                   3354: #define EN_MAXTEXT          0x0501
                   3355: #define EN_HSCROLL          0x0601
                   3356: #define EN_VSCROLL          0x0602
                   3357: 
                   3358: #ifndef NOWINMESSAGES
                   3359: 
                   3360: /* Edit Control Messages */
                   3361: #define EM_GETSEL           0x00B0
                   3362: #define EM_SETSEL           0x00B1
                   3363: #define EM_GETRECT          0x00B2
                   3364: #define EM_SETRECT          0x00B3
                   3365: #define EM_SETRECTNP        0x00B4
                   3366: #define EM_SCROLL           0x00B5
                   3367: #define EM_LINESCROLL       0x00B6
                   3368: #define EM_GETMODIFY        0x00B8
                   3369: #define EM_SETMODIFY        0x00B9
                   3370: #define EM_GETLINECOUNT     0x00BA
                   3371: #define EM_LINEINDEX        0x00BB
                   3372: #define EM_SETHANDLE        0x00BC
                   3373: #define EM_GETHANDLE        0x00BD
                   3374: #define EM_GETTHUMB         0x00BE
                   3375: #define EM_LINELENGTH       0x00C1
                   3376: #define EM_REPLACESEL       0x00C2
                   3377: #define EM_SETFONT          0x00C3
                   3378: #define EM_GETLINE          0x00C4
                   3379: #define EM_LIMITTEXT        0x00C5
                   3380: #define EM_CANUNDO          0x00C6
                   3381: #define EM_UNDO             0x00C7
                   3382: #define EM_FMTLINES         0x00C8
                   3383: #define EM_LINEFROMCHAR     0x00C9
                   3384: #define EM_SETWORDBREAK     0x00CA
                   3385: #define EM_SETTABSTOPS      0x00CB
                   3386: #define EM_SETPASSWORDCHAR  0x00CC
                   3387: #define EM_EMPTYUNDOBUFFER  0x00CD
                   3388: #define EM_GETFIRSTVISIBLE  0x00CE
                   3389: #define EM_SETREADONLY      0x00CF
                   3390: #define EM_MSGMAX           0x00D0
                   3391: 
                   3392: #endif /* NOWINMESSAGES */
                   3393: 
                   3394: /* Button Control Styles */
                   3395: #define BS_PUSHBUTTON      0x00L
                   3396: #define BS_DEFPUSHBUTTON   0x01L
                   3397: #define BS_CHECKBOX        0x02L
                   3398: #define BS_AUTOCHECKBOX    0x03L
                   3399: #define BS_RADIOBUTTON     0x04L
                   3400: #define BS_3STATE          0x05L
                   3401: #define BS_AUTO3STATE      0x06L
                   3402: #define BS_GROUPBOX        0x07L
                   3403: #define BS_USERBUTTON      0x08L
                   3404: #define BS_AUTORADIOBUTTON 0x09L
                   3405: #define BS_PUSHBOX         0x0AL
                   3406: #define BS_OWNERDRAW       0x0BL
                   3407: #define BS_LEFTTEXT        0x20L
                   3408: 
                   3409: 
                   3410: /* User Button Notification Codes */
                   3411: #define BN_CLICKED         0
                   3412: #define BN_PAINT           1
                   3413: #define BN_HILITE          2
                   3414: #define BN_UNHILITE        3
                   3415: #define BN_DISABLE         4
                   3416: #define BN_DOUBLECLICKED   5
                   3417: 
                   3418: /* Button Control Messages */
                   3419: #define BM_GETCHECK        0x00F0
                   3420: #define BM_SETCHECK        0x00F1
                   3421: #define BM_GETSTATE        0x00F2
                   3422: #define BM_SETSTATE        0x00F3
                   3423: #define BM_SETSTYLE        0x00F4
                   3424: 
                   3425: /* Static Control Constants */
                   3426: #define SS_LEFT            0x00L
                   3427: #define SS_CENTER          0x01L
                   3428: #define SS_RIGHT           0x02L
                   3429: #define SS_ICON            0x03L
                   3430: #define SS_BLACKRECT       0x04L
                   3431: #define SS_GRAYRECT        0x05L
                   3432: #define SS_WHITERECT       0x06L
                   3433: #define SS_BLACKFRAME      0x07L
                   3434: #define SS_GRAYFRAME       0x08L
                   3435: #define SS_WHITEFRAME      0x09L
                   3436: #define SS_USERITEM        0x0AL
                   3437: #define SS_SIMPLE          0x0BL
                   3438: #define SS_LEFTNOWORDWRAP  0x0CL
                   3439: #define SS_NOPREFIX        0x80L    /* Don't do "&" character translation */
                   3440: 
                   3441: #ifndef NOWINMESSAGES
                   3442: /* Static Control Mesages */
                   3443: #define STM_SETICON        0x0D0
                   3444: #define STM_GETICON        0x0D1
                   3445: #define STM_MSGMAX         0x0D2
                   3446: #endif /* NOWINMESSAGES */
                   3447: /* Dialog Manager Routines */
                   3448: 
                   3449: #ifndef NOMSG
                   3450: BOOL APIENTRY CRITICAL XXX IsDialogMessage(IN HWND hDlg, IN LPMSG lpMsg);
                   3451: #endif
                   3452: 
                   3453: BOOL APIENTRY CRITICAL MapDialogRect(IN HWND hDlg, IN OUT LPRECT lpRect);
                   3454: 
                   3455: int
                   3456: APIENTRY CRITICAL XXX
                   3457: DlgDirListA(
                   3458:     IN HWND hDlg,
                   3459:     IN OUT LPSTR lpPathSpec,
                   3460:     IN int nIDListBox,
                   3461:     IN int nIDStaticPath,
                   3462:     IN UINT wFileType
                   3463:     );
                   3464: int
                   3465: APIENTRY CRITICAL XXX
                   3466: DlgDirListW(
                   3467:     IN HWND hDlg,
                   3468:     IN OUT LPWSTR lpPathSpec,
                   3469:     IN int nIDListBox,
                   3470:     IN int nIDStaticPath,
                   3471:     IN UINT wFileType
                   3472:     );
                   3473: #ifdef UNICODE
                   3474: #define DlgDirList DlgDirListW
                   3475: #else
                   3476: #define DlgDirList DlgDirListA
                   3477: #endif // !UNICODE
                   3478: 
                   3479: BOOL
                   3480: APIENTRY CRITICAL XXX
                   3481: DlgDirSelectExA(
                   3482:     IN HWND hDlg,
                   3483:     NEXTCOUNT IN OUT OUTLPSTR lpString,
                   3484:     IN int nCount,
                   3485:     IN int nIDListBox
                   3486:     );
                   3487: BOOL
                   3488: APIENTRY CRITICAL XXX
                   3489: DlgDirSelectExW(
                   3490:     IN HWND hDlg,
                   3491:     NEXTCOUNT IN OUT OUTLPWSTR lpString,
                   3492:     IN int nCount,
                   3493:     IN int nIDListBox
                   3494:     );
                   3495: #ifdef UNICODE
                   3496: #define DlgDirSelectEx DlgDirSelectExW
                   3497: #else
                   3498: #define DlgDirSelectEx DlgDirSelectExA
                   3499: #endif // !UNICODE
                   3500: 
                   3501: int
                   3502: APIENTRY CRITICAL XXX
                   3503: DlgDirListComboBoxA(
                   3504:     IN HWND hDlg,
                   3505:     IN OUT LPSTR lpPathSpec,
                   3506:     IN int nIDComboBox,
                   3507:     IN int nIDStaticPath,
                   3508:     IN UINT wFiletype
                   3509:     );
                   3510: int
                   3511: APIENTRY CRITICAL XXX
                   3512: DlgDirListComboBoxW(
                   3513:     IN HWND hDlg,
                   3514:     IN OUT LPWSTR lpPathSpec,
                   3515:     IN int nIDComboBox,
                   3516:     IN int nIDStaticPath,
                   3517:     IN UINT wFiletype
                   3518:     );
                   3519: #ifdef UNICODE
                   3520: #define DlgDirListComboBox DlgDirListComboBoxW
                   3521: #else
                   3522: #define DlgDirListComboBox DlgDirListComboBoxA
                   3523: #endif // !UNICODE
                   3524: 
                   3525: BOOL
                   3526: APIENTRY CRITICAL XXX
                   3527: DlgDirSelectComboBoxExA(
                   3528:     IN HWND hDlg,
                   3529:     NEXTCOUNT IN OUT OUTLPSTR lpString,
                   3530:     IN int nCount,
                   3531:     IN int nIDComboBox
                   3532:     );
                   3533: BOOL
                   3534: APIENTRY CRITICAL XXX
                   3535: DlgDirSelectComboBoxExW(
                   3536:     IN HWND hDlg,
                   3537:     NEXTCOUNT IN OUT OUTLPWSTR lpString,
                   3538:     IN int nCount,
                   3539:     IN int nIDComboBox
                   3540:     );
                   3541: #ifdef UNICODE
                   3542: #define DlgDirSelectComboBoxEx DlgDirSelectComboBoxExW
                   3543: #else
                   3544: #define DlgDirSelectComboBoxEx DlgDirSelectComboBoxExA
                   3545: #endif // !UNICODE
                   3546: 
                   3547: 
                   3548: /* Dialog Styles */
                   3549: #define DS_ABSALIGN         0x01L
                   3550: #define DS_SYSMODAL         0x02L
                   3551: #define DS_LOCALEDIT        0x20L   /* Edit items get Local storage. */
                   3552: #define DS_SETFONT          0x40L   /* User specified font for Dlg controls */
                   3553: #define DS_MODALFRAME       0x80L   /* Can be combined with WS_CAPTION  */
                   3554: #define DS_NOIDLEMSG        0x100L  /* WM_ENTERIDLE message will not be sent */
                   3555: #define DS_SETFOREGROUND    0x200L
                   3556: 
                   3557: #define DM_GETDEFID         (WM_USER+0)
                   3558: #define DM_SETDEFID         (WM_USER+1)
                   3559: #define DC_HASDEFID         0x534B
                   3560: 
                   3561: /* Dialog Codes */
                   3562: #define DLGC_WANTARROWS     0x0001      /* Control wants arrow keys         */
                   3563: #define DLGC_WANTTAB        0x0002      /* Control wants tab keys           */
                   3564: #define DLGC_WANTALLKEYS    0x0004      /* Control wants all keys           */
                   3565: #define DLGC_WANTMESSAGE    0x0004      /* Pass message to control          */
                   3566: #define DLGC_HASSETSEL      0x0008      /* Understands EM_SETSEL message    */
                   3567: #define DLGC_DEFPUSHBUTTON  0x0010      /* Default pushbutton               */
                   3568: #define DLGC_UNDEFPUSHBUTTON 0x0020     /* Non-default pushbutton           */
                   3569: #define DLGC_RADIOBUTTON    0x0040      /* Radio button                     */
                   3570: #define DLGC_WANTCHARS      0x0080      /* Want WM_CHAR messages            */
                   3571: #define DLGC_STATIC         0x0100      /* Static item: don't include       */
                   3572: #define DLGC_BUTTON         0x2000      /* Button item: can be checked      */
                   3573: 
                   3574: #define LB_CTLCODE          0L
                   3575: 
                   3576: /* Listbox Return Values */
                   3577: #define LB_OKAY             0
                   3578: #define LB_ERR              (-1)
                   3579: #define LB_ERRSPACE         (-2)
                   3580: 
                   3581: /*
                   3582: **  The idStaticPath parameter to DlgDirList can have the following values
                   3583: **  ORed if the list box should show other details of the files along with
                   3584: **  the name of the files;
                   3585: */
                   3586:                                   /* all other details also will be returned */
                   3587: 
                   3588: 
                   3589: /* Listbox Notification Codes */
                   3590: #define LBN_ERRSPACE        (-2)
                   3591: #define LBN_SELCHANGE       1
                   3592: #define LBN_DBLCLK          2
                   3593: #define LBN_SELCANCEL       3
                   3594: #define LBN_SETFOCUS        4
                   3595: #define LBN_KILLFOCUS       5
                   3596: 
                   3597: 
                   3598: 
                   3599: #ifndef NOWINMESSAGES
                   3600: 
                   3601: /* Listbox messages */
                   3602: #define LB_ADDSTRING            0x0180
                   3603: #define LB_INSERTSTRING         0x0181
                   3604: #define LB_DELETESTRING         0x0182
                   3605: #define LB_RESETCONTENT         0x0184
                   3606: #define LB_SETSEL               0x0185
                   3607: #define LB_SETCURSEL            0x0186
                   3608: #define LB_GETSEL               0x0187
                   3609: #define LB_GETCURSEL            0x0188
                   3610: #define LB_GETTEXT              0x0189
                   3611: #define LB_GETTEXTLEN           0x018A
                   3612: #define LB_GETCOUNT             0x018B
                   3613: #define LB_SELECTSTRING         0x018C
                   3614: #define LB_DIR                  0x018D
                   3615: #define LB_GETTOPINDEX          0x018E
                   3616: #define LB_FINDSTRING           0x018F
                   3617: #define LB_GETSELCOUNT          0x0190
                   3618: #define LB_GETSELITEMS          0x0191
                   3619: #define LB_SETTABSTOPS          0x0192
                   3620: #define LB_GETHORIZONTALEXTENT  0x0193
                   3621: #define LB_SETHORIZONTALEXTENT  0x0194
                   3622: #define LB_SETCOLUMNWIDTH       0x0195
                   3623: #define LB_SETTOPINDEX          0x0197
                   3624: #define LB_GETITEMRECT          0x0198
                   3625: #define LB_GETITEMDATA          0x0199
                   3626: #define LB_SETITEMDATA          0x019A
                   3627: #define LB_SELITEMRANGE         0x019B
                   3628: #define LB_SETITEMHEIGHT        0x01A0
                   3629: #define LB_GETITEMHEIGHT        0x01A1
                   3630: #define LB_MSGMAX               0x01A2
                   3631: 
                   3632: #endif /* NOWINMESSAGES */
                   3633: 
                   3634: #ifndef NOWINSTYLES
                   3635: 
                   3636: /* Listbox Styles */
                   3637: #define LBS_NOTIFY            0x0001L
                   3638: #define LBS_SORT              0x0002L
                   3639: #define LBS_NOREDRAW          0x0004L
                   3640: #define LBS_MULTIPLESEL       0x0008L
                   3641: #define LBS_OWNERDRAWFIXED    0x0010L
                   3642: #define LBS_OWNERDRAWVARIABLE 0x0020L
                   3643: #define LBS_HASSTRINGS        0x0040L
                   3644: #define LBS_USETABSTOPS       0x0080L
                   3645: #define LBS_NOINTEGRALHEIGHT  0x0100L
                   3646: #define LBS_MULTICOLUMN       0x0200L
                   3647: #define LBS_WANTKEYBOARDINPUT 0x0400L
                   3648: #define LBS_EXTENDEDSEL       0x0800L
                   3649: #define LBS_DISABLENOSCROLL   0x1000L
                   3650: #define LBS_STANDARD          (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER)
                   3651: 
                   3652: #endif /* NOWINSTYLES */
                   3653: 
                   3654: 
                   3655: /* Combo Box return Values */
                   3656: #define CB_OKAY             0
                   3657: #define CB_ERR              (-1)
                   3658: #define CB_ERRSPACE         (-2)
                   3659: 
                   3660: 
                   3661: /* Combo Box Notification Codes */
                   3662: #define CBN_ERRSPACE        (-1)
                   3663: #define CBN_SELCHANGE       1
                   3664: #define CBN_DBLCLK          2
                   3665: #define CBN_SETFOCUS        3
                   3666: #define CBN_KILLFOCUS       4
                   3667: #define CBN_EDITCHANGE      5
                   3668: #define CBN_EDITUPDATE      6
                   3669: #define CBN_DROPDOWN        7
                   3670: #define CBN_CLOSEUP         8
                   3671: 
                   3672: /* Combo Box styles */
                   3673: #ifndef NOWINSTYLES
                   3674: #define CBS_SIMPLE            0x0001L
                   3675: #define CBS_DROPDOWN          0x0002L
                   3676: #define CBS_DROPDOWNLIST      0x0003L
                   3677: #define CBS_OWNERDRAWFIXED    0x0010L
                   3678: #define CBS_OWNERDRAWVARIABLE 0x0020L
                   3679: #define CBS_AUTOHSCROLL       0x0040L
                   3680: #define CBS_OEMCONVERT        0x0080L
                   3681: #define CBS_SORT              0x0100L
                   3682: #define CBS_HASSTRINGS        0x0200L
                   3683: #define CBS_NOINTEGRALHEIGHT  0x0400L
                   3684: #define CBS_DISABLENOSCROLL   0x0800L
                   3685: #endif  /* NOWINSTYLES */
                   3686: 
                   3687: 
                   3688: /* Combo Box messages */
                   3689: #ifndef NOWINMESSAGES
                   3690: #define CB_GETEDITSEL               0x0140
                   3691: #define CB_LIMITTEXT                0x0141
                   3692: #define CB_SETEDITSEL               0x0142
                   3693: #define CB_ADDSTRING                0x0143
                   3694: #define CB_DELETESTRING             0x0144
                   3695: #define CB_DIR                      0x0145
                   3696: #define CB_GETCOUNT                 0x0146
                   3697: #define CB_GETCURSEL                0x0147
                   3698: #define CB_GETLBTEXT                0x0148
                   3699: #define CB_GETLBTEXTLEN             0x0149
                   3700: #define CB_INSERTSTRING             0x014A
                   3701: #define CB_RESETCONTENT             0x014B
                   3702: #define CB_FINDSTRING               0x014C
                   3703: #define CB_SELECTSTRING             0x014D
                   3704: #define CB_SETCURSEL                0x014E
                   3705: #define CB_SHOWDROPDOWN             0x014F
                   3706: #define CB_GETITEMDATA              0x0150
                   3707: #define CB_SETITEMDATA              0x0151
                   3708: #define CB_GETDROPPEDCONTROLRECT    0x0152
                   3709: #define CB_SETITEMHEIGHT            0x0153
                   3710: #define CB_GETITEMHEIGHT            0x0154
                   3711: #define CB_SETEXTENDEDUI            0x0155
                   3712: #define CB_GETEXTENDEDUI            0x0156
                   3713: #define CB_GETDROPPEDSTATE          0x0157
                   3714: #define CB_MSGMAX                   0x0158
                   3715: #endif  /* NOWINMESSAGES */
                   3716: 
                   3717: 
                   3718: 
                   3719: #ifndef NOWINSTYLES
                   3720: 
                   3721: /* Scroll Bar Styles */
                   3722: #define SBS_HORZ                    0x0000L
                   3723: #define SBS_VERT                    0x0001L
                   3724: #define SBS_TOPALIGN                0x0002L
                   3725: #define SBS_LEFTALIGN               0x0002L
                   3726: #define SBS_BOTTOMALIGN             0x0004L
                   3727: #define SBS_RIGHTALIGN              0x0004L
                   3728: #define SBS_SIZEBOXTOPLEFTALIGN     0x0002L
                   3729: #define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004L
                   3730: #define SBS_SIZEBOX                 0x0008L
                   3731: #endif /* NOWINSTYLES */
                   3732: 
                   3733: /* Scroll bar messages */
                   3734: #ifndef NOWINMESSAGES
                   3735: #define SBM_SETPOS                  0x00E0
                   3736: #define SBM_GETPOS                  0x00E1
                   3737: #define SBM_SETRANGE                0x00E2
                   3738: #define SBM_GETRANGE                0x00E3
                   3739: #define SBM_ENABLE_ARROWS           0x00E4
                   3740: #endif
                   3741: #endif /* NOCTLMGR */
                   3742: 
                   3743: #ifndef NOMDI
                   3744: 
                   3745: /* MDI client style bits */
                   3746: #define MDIS_ALLCHILDSTYLES    0x0001
                   3747: 
                   3748: /* wParam Flags for WM_MDITILE and WM_MDICASCADE messages. */
                   3749: #define MDITILE_VERTICAL       0x0000
                   3750: #define MDITILE_HORIZONTAL     0x0001
                   3751: #define MDITILE_SKIPDISABLED   0x0002
                   3752: 
                   3753: typedef struct tagMDICREATESTRUCTA {
                   3754:     LPSTRID   szClass;
                   3755:     LPSTRNULL   szTitle;
                   3756:     HANDLE hOwner;
                   3757:     int x;
                   3758:     int y;
                   3759:     int cx;
                   3760:     int cy;
                   3761:     LONG style;
                   3762:     LONG lParam;        /* app-defined stuff */
                   3763: } MDICREATESTRUCTA, *LPMDICREATESTRUCTA;
                   3764: typedef struct tagMDICREATESTRUCTW {
                   3765:     LPWSTRID  szClass;
                   3766:     LPWSTRNULL  szTitle;
                   3767:     HANDLE hOwner;
                   3768:     int x;
                   3769:     int y;
                   3770:     int cx;
                   3771:     int cy;
                   3772:     LONG style;
                   3773:     LONG lParam;        /* app-defined stuff */
                   3774: } MDICREATESTRUCTW, *LPMDICREATESTRUCTW;
                   3775: #ifdef UNICODE
                   3776: #define MDICREATESTRUCT MDICREATESTRUCTW
                   3777: #define LPMDICREATESTRUCT LPMDICREATESTRUCTW
                   3778: #else
                   3779: #define MDICREATESTRUCT MDICREATESTRUCTA
                   3780: #define LPMDICREATESTRUCT LPMDICREATESTRUCTA
                   3781: #endif // UNICODE
                   3782: 
                   3783: typedef struct tagCLIENTCREATESTRUCT {
                   3784:     HANDLE hWindowMenu;
                   3785:     UINT idFirstChild;
                   3786: } CLIENTCREATESTRUCT, *LPCLIENTCREATESTRUCT;
                   3787: 
                   3788: LONG APIENTRY CRITICAL XXX DefFrameProcA(IN HWND hWnd, IN HWND hWndMDIClient OPTIONAL, IN UINT wMsg, IN DWORD wParam, IN LONG lParam);
                   3789: LONG APIENTRY CRITICAL XXX DefFrameProcW(IN HWND hWnd, IN HWND hWndMDIClient OPTIONAL, IN UINT wMsg, IN DWORD wParam, IN LONG lParam);
                   3790: #ifdef UNICODE
                   3791: #define DefFrameProc DefFrameProcW
                   3792: #else
                   3793: #define DefFrameProc DefFrameProcA
                   3794: #endif // !UNICODE
                   3795: LONG APIENTRY CRITICAL XXX DefMDIChildProcA(IN HWND hWnd, IN UINT wMsg, IN DWORD wParam, IN LONG lParam);
                   3796: LONG APIENTRY CRITICAL XXX DefMDIChildProcW(IN HWND hWnd, IN UINT wMsg, IN DWORD wParam, IN LONG lParam);
                   3797: #ifdef UNICODE
                   3798: #define DefMDIChildProc DefMDIChildProcW
                   3799: #else
                   3800: #define DefMDIChildProc DefMDIChildProcA
                   3801: #endif // !UNICODE
                   3802: 
                   3803: #ifndef NOMSG
                   3804: BOOL APIENTRY CRITICAL XXX TranslateMDISysAccel(IN HWND hWndClient, IN LPMSG lpMsg);
                   3805: #endif
                   3806: 
                   3807: UINT APIENTRY CRITICAL XXX ArrangeIconicWindows(IN HWND hWnd);
                   3808: 
                   3809: #endif /* NOMDI */
                   3810: 
                   3811: #endif /* NOUSER */
                   3812: 
                   3813: #ifndef NOHELP
                   3814: 
                   3815: /*  Help engine section.  */
                   3816: 
                   3817: typedef DWORD HELPPOLY;
                   3818: typedef struct tagMULTIKEYHELP {
                   3819:     DWORD mkSize;
                   3820:     BYTE  mkKeylist;
                   3821:     BYTE  szKeyphrase[1];
                   3822: } MULTIKEYHELP;
                   3823: 
                   3824: //
                   3825: // Commands to pass WinHelp()
                   3826: //
                   3827: 
                   3828: #define HELP_CONTEXT    0x0001L   /* Display topic in ulTopic */
                   3829: #define HELP_QUIT       0x0002L   /* Terminate help */
                   3830: #define HELP_INDEX      0x0003L   /* Display index */
                   3831: #define HELP_HELPONHELP 0x0004L   /* Display help on using help */
                   3832: #define HELP_SETINDEX   0x0005L   /* Set the current Index for multi index help */
                   3833: #define HELP_KEY        0x0101L   /* Display topic for keyword in offabData */
                   3834: #define HELP_MULTIKEY   0x0201L
                   3835: 
                   3836: BOOL
                   3837: APIENTRY CRITICAL XXX
                   3838: WinHelpA(
                   3839:     IN HWND hwndMain,
                   3840:     IN LPSTR lpszHelp,
                   3841:     IN DWORD dwCommand,
                   3842:     IN HELPPOLY dwData
                   3843:     );
                   3844: BOOL
                   3845: APIENTRY CRITICAL XXX
                   3846: WinHelpW(
                   3847:     IN HWND hwndMain,
                   3848:     IN LPWSTR lpszHelp,
                   3849:     IN DWORD dwCommand,
                   3850:     IN HELPPOLY dwData
                   3851:     );
                   3852: #ifdef UNICODE
                   3853: #define WinHelp WinHelpW
                   3854: #else
                   3855: #define WinHelp WinHelpA
                   3856: #endif // !UNICODE
                   3857: 
                   3858: #endif /* NOHELP */
                   3859: 
                   3860: #ifndef NOPROFILER
                   3861: 
                   3862: /* function declarations for profiler routines contained in Windows libraries */
                   3863: int  APIENTRY ProfInsChk(void);
                   3864: void APIENTRY ProfSetup(int,int);
                   3865: void APIENTRY ProfSampRate(int,int);
                   3866: void APIENTRY ProfStart(void);
                   3867: void APIENTRY ProfStop(void);
                   3868: void APIENTRY ProfClear(void);
                   3869: void APIENTRY ProfFlush(void);
                   3870: void APIENTRY ProfFinish(void);
                   3871: 
                   3872: #endif /* NOPROFILER */
                   3873: 
                   3874: #ifndef NOSYSPARAMSINFO
                   3875: /* Parameter for SystemParametersInfo() */
                   3876: 
                   3877: #define SPI_GETBEEP                 1
                   3878: #define SPI_SETBEEP                 2
                   3879: #define SPI_GETMOUSE                3
                   3880: #define SPI_SETMOUSE                4
                   3881: #define SPI_GETBORDER               5
                   3882: #define SPI_SETBORDER               6
                   3883: #define SPI_TIMEOUTS                7
                   3884: #define SPI_KANJIMENU               8   /*; Internal */
                   3885: #define SPI_GETKEYBOARDSPEED       10
                   3886: #define SPI_SETKEYBOARDSPEED       11
                   3887: #define SPI_LANGDRIVER             12
                   3888: #define SPI_ICONHORIZONTALSPACING  13
                   3889: #define SPI_GETSCREENSAVETIMEOUT   14
                   3890: #define SPI_SETSCREENSAVETIMEOUT   15
                   3891: #define SPI_GETSCREENSAVEACTIVE    16
                   3892: #define SPI_SETSCREENSAVEACTIVE    17
                   3893: #define SPI_GETGRIDGRANULARITY     18
                   3894: #define SPI_SETGRIDGRANULARITY     19
                   3895: #define SPI_SETDESKWALLPAPER       20
                   3896: #define SPI_SETDESKPATTERN         21
                   3897: #define SPI_GETKEYBOARDDELAY       22
                   3898: #define SPI_SETKEYBOARDDELAY       23
                   3899: #define SPI_ICONVERTICALSPACING    24
                   3900: #define SPI_GETICONTITLEWRAP       25
                   3901: #define SPI_SETICONTITLEWRAP       26
                   3902: #define SPI_GETMENUDROPALIGNMENT   27
                   3903: #define SPI_SETMENUDROPALIGNMENT   28
                   3904: #define SPI_SETDOUBLECLKWIDTH      29
                   3905: #define SPI_SETDOUBLECLKHEIGHT     30
                   3906: #define SPI_GETICONTITLELOGFONT    31
                   3907: #define SPI_SETDOUBLECLICKTIME     32
                   3908: #define SPI_SETMOUSEBUTTONSWAP     33
                   3909: 
                   3910: 
                   3911: BOOL CRITICAL XXX SystemParametersInfo(UINT, UINT, LONG, UINT);
                   3912: 
                   3913: /* Flags */
                   3914: #define SPIF_UPDATEINIFILE    0x0001
                   3915: #define SPIF_SENDWININICHANGE 0x0002
                   3916: 
                   3917: #endif  /* NOSYSPARAMSINFO  */
                   3918: 
                   3919: #endif // _WINUSER_

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.