|
|
1.1 ! root 1: /*static char *SCCSID = "@(#)pmwin.h 13.40 90/05/01";*/ ! 2: /***************************************************************************\ ! 3: * ! 4: * Module Name: PMWIN.H ! 5: * ! 6: * OS/2 Presentation Manager Window Manager include file ! 7: * ! 8: * Copyright (c) International Business Machines Corporation 1981, 1988, 1989 ! 9: * Copyright (c) Microsoft Corporation 1981, 1988, 1989 ! 10: * ! 11: * ======================================================================= ! 12: * ! 13: * The folowing symbols are used in this file for conditional sections. ! 14: * ! 15: * If INCL_WIN is defined, all subcomponents are included. ! 16: * ! 17: * Subcomponents marked with "+" are partially included by default: ! 18: * ! 19: * #define: To include: ! 20: * ! 21: * + INCL_WINWINDOWMGR General window management ! 22: * + INCL_WINMESSAGEMGR Message management ! 23: * + INCL_WININPUT Mouse and keyboard input ! 24: * + INCL_WINDIALOGS Dialog boxes ! 25: * + INCL_WINSTATICS Static controls ! 26: * + INCL_WINBUTTONS Button controls ! 27: * + INCL_WINENTRYFIELDS Entry Fields ! 28: * INCL_WINMLE Multiple Line Entry Fields ! 29: * + INCL_WINLISTBOXES List box controls ! 30: * + INCL_WINMENUS Menu controls ! 31: * + INCL_WINSCROLLBARS Scroll bar controls ! 32: * + INCL_WINFRAMEMGR Frame manager ! 33: * INCL_WINFRAMECTLS Frame controls (title bars & size border) ! 34: * INCL_WINRECTANGLES Rectangle routines ! 35: * INCL_WINSYS System values (and colors) ! 36: * INCL_WINTIMER Timer routines ! 37: * + INCL_WINACCELERATORS Keyboard accelerators ! 38: * INCL_WINTRACKRECT WinTrackRect() function ! 39: * INCL_WINCLIPBOARD Clipboard manager ! 40: * + INCL_WINCURSORS Text cursors ! 41: * + INCL_WINPOINTERS Mouse pointers ! 42: * INCL_WINHOOKS Hook manager ! 43: * + INCL_WINSWITCHLIST Shell Switch List API ! 44: * INCL_WINPROGRAMLIST Shell Program List API ! 45: * INCL_WINSHELLDATA Shell Data (?) ! 46: * INCL_WINCOUNTRY Country support ! 47: * INCL_WINHEAP Heap Manager ! 48: * INCL_WINATOM Atom Manager ! 49: * INCL_WINCATCHTHROW WinCatch/WinThrow support ! 50: * INCL_WINERRORS Error code definitions ! 51: * INCL_NLS DBCS window manager definition ! 52: * + INCL_WINHELP Help Manager definitions ! 53: * INCL_WINSEI Set Error Info API ! 54: * INCL_WINLOAD Load/Delete Library/Procedure ! 55: * INCL_WINTYPES Definitions for Datatypes ! 56: * INCL_WINTHUNKAPI Thunk Procedure API ! 57: * INCL_WINDESKTOP Desktop API ! 58: * ! 59: * ! 60: \***************************************************************************/ ! 61: ! 62: #define INCL_WININCLUDED ! 63: ! 64: ! 65: #ifndef INCL_PMINCLUDED ! 66: #if !(defined(INCL_32) || defined(INCL_16)) ! 67: #ifdef M_I386 ! 68: #define INCL_32 ! 69: #else /* not M_I386 */ ! 70: #define INCL_16 ! 71: #endif /* M_I386 */ ! 72: #endif /* INCL_32 || INCL_16 */ ! 73: #endif /* INCL_PMINCLUDED */ ! 74: ! 75: /* XLATOFF */ ! 76: #ifdef INCL_16 ! 77: #include <pmwin16.h> ! 78: #endif /* INCL_16 */ ! 79: /* XLATON */ ! 80: ! 81: ! 82: #ifdef INCL_WIN ! 83: ! 84: #define INCL_WINWINDOWMGR ! 85: #define INCL_WINMESSAGEMGR ! 86: #define INCL_WININPUT ! 87: #define INCL_WINDIALOGS ! 88: #define INCL_WINSTATICS ! 89: #define INCL_WINBUTTONS ! 90: #define INCL_WINENTRYFIELDS ! 91: #define INCL_WINMLE ! 92: #define INCL_WINLISTBOXES ! 93: #define INCL_WINMENUS ! 94: #define INCL_WINSCROLLBARS ! 95: #define INCL_WINFRAMEMGR ! 96: #define INCL_WINFRAMECTLS ! 97: #define INCL_WINRECTANGLES ! 98: #define INCL_WINSYS ! 99: #define INCL_WINTIMER ! 100: #define INCL_WINACCELERATORS ! 101: #define INCL_WINTRACKRECT ! 102: #define INCL_WINCLIPBOARD ! 103: #define INCL_WINCURSORS ! 104: #define INCL_WINPOINTERS ! 105: #define INCL_WINHOOKS ! 106: #define INCL_WINSWITCHLIST ! 107: #define INCL_WINPROGRAMLIST ! 108: #define INCL_WINSHELLDATA ! 109: #define INCL_WINCOUNTRY ! 110: #define INCL_WINHEAP ! 111: #define INCL_WINATOM ! 112: #define INCL_WINCATCHTHROW ! 113: #define INCL_WINERRORS ! 114: #define INCL_WINDDE ! 115: #define INCL_WINHELP ! 116: #define INCL_WINSEI ! 117: #define INCL_WINLOAD ! 118: #define INCL_WINTYPES ! 119: #define INCL_WINDESKTOP ! 120: #define INCL_WINPALETTE ! 121: #define INCL_WINTHUNKAPI ! 122: ! 123: #else /* INCL_WIN */ ! 124: ! 125: #ifdef RC_INVOKED ! 126: #define INCL_WININPUT ! 127: #define INCL_WINDIALOGS ! 128: #define INCL_WINSTATICS ! 129: #define INCL_WINBUTTONS ! 130: #define INCL_WINENTRYFIELDS ! 131: #define INCL_WINLISTBOXES ! 132: #define INCL_WINMENUS ! 133: #define INCL_WINSCROLLBARS ! 134: #define INCL_WINFRAMEMGR ! 135: #define INCL_WINFRAMECTLS ! 136: #define INCL_WINACCELERATORS ! 137: #define INCL_WINPOINTERS ! 138: #define INCL_WINMESSAGEMGR ! 139: #define INCL_WINMLE ! 140: #define INCL_WINHELP ! 141: #endif /* RC_INVOKED */ ! 142: ! 143: #endif /* INCL_WIN */ ! 144: ! 145: /* ensure standard entry field defintions if MLE is defined */ ! 146: #ifdef INCL_WINMLE ! 147: #ifndef INCL_WINENTRYFIELDS ! 148: #define INCL_WINENTRYFIELDS ! 149: #endif /* INCL_WINENTRYFIELDS */ ! 150: #endif /* INCL_WINMLE */ ! 151: ! 152: /* INCL_WINCOMMON compatability */ ! 153: #ifdef INCL_WINCOMMON ! 154: #define INCL_WINWINDOWMGR ! 155: #endif /* INCL_WINCOMMON */ ! 156: ! 157: #ifdef INCL_ERRORS ! 158: #define INCL_WINERRORS ! 159: #endif /* INCL_ERRORS */ ! 160: ! 161: /***************************************************************************/ ! 162: /*** General Window Management types, constants and macros ***/ ! 163: ! 164: typedef VOID FAR *MPARAM; /* mp */ ! 165: typedef MPARAM FAR *PMPARAM; /* pmp */ ! 166: typedef VOID FAR *MRESULT; /* mres */ ! 167: typedef MRESULT FAR *PMRESULT; /* pmres */ ! 168: ! 169: /* Macros to make an MPARAM from standard types. */ ! 170: #define MPVOID ((MPARAM)0L) ! 171: #define MPFROMP(p) ((MPARAM)(VOID FAR *)(p)) ! 172: #define MPFROMHWND(hwnd) ((MPARAM)(HWND)(hwnd)) ! 173: #define MPFROMCHAR(ch) ((MPARAM)(USHORT)(ch)) ! 174: #define MPFROMSHORT(s) ((MPARAM)(USHORT)(s)) ! 175: #define MPFROM2SHORT(s1, s2) ((MPARAM)MAKELONG(s1, s2)) ! 176: #define MPFROMSH2CH(s, uch1, uch2) ((MPARAM)MAKELONG(s, MAKESHORT(uch1, uch2))) ! 177: #define MPFROMLONG(l) ((MPARAM)(ULONG)(l)) ! 178: ! 179: /* Macros to extract standard types from an MPARAM */ ! 180: #define PVOIDFROMMP(mp) ((VOID FAR *)(mp)) ! 181: #define HWNDFROMMP(mp) ((HWND)(mp)) ! 182: #define CHAR1FROMMP(mp) ((UCHAR)(mp)) ! 183: #define CHAR2FROMMP(mp) ((UCHAR)((ULONG)mp >> 8)) ! 184: #define CHAR3FROMMP(mp) ((UCHAR)((ULONG)mp >> 16)) ! 185: #define CHAR4FROMMP(mp) ((UCHAR)((ULONG)mp >> 24)) ! 186: #define SHORT1FROMMP(mp) ((USHORT)(ULONG)(mp)) ! 187: #define SHORT2FROMMP(mp) ((USHORT)((ULONG)mp >> 16)) ! 188: #define LONGFROMMP(mp) ((ULONG)(mp)) ! 189: ! 190: /* Macros to make an MRESULT from standard types. */ ! 191: #define MRFROMP(p) ((MRESULT)(VOID FAR *)(p)) ! 192: #define MRFROMSHORT(s) ((MRESULT)(USHORT)(s)) ! 193: #define MRFROM2SHORT(s1, s2) ((MRESULT)MAKELONG(s1, s2)) ! 194: #define MRFROMLONG(l) ((MRESULT)(ULONG)(l)) ! 195: ! 196: /* Macros to extract standard types from an MRESULT */ ! 197: #define PVOIDFROMMR(mr) ((VOID FAR *)(mr)) ! 198: #define SHORT1FROMMR(mr) ((USHORT)((ULONG)mr)) ! 199: #define SHORT2FROMMR(mr) ((USHORT)((ULONG)mr >> 16)) ! 200: #define LONGFROMMR(mr) ((ULONG)(mr)) ! 201: ! 202: #ifdef INCL_32 ! 203: typedef MRESULT (EXPENTRY *PFNWP)(HWND, USHORT, MPARAM, MPARAM); ! 204: #else ! 205: typedef MRESULT (PASCAL FAR *PFNWP)(HWND, USHORT, MPARAM, MPARAM); ! 206: #endif ! 207: ! 208: ! 209: #ifndef INCL_SAADEFS ! 210: #define HWND_DESKTOP (HWND)1 ! 211: #define HWND_OBJECT (HWND)2 ! 212: #endif /* !INCL_SAADEFS */ ! 213: ! 214: #define HWND_TOP (HWND)3 ! 215: #define HWND_BOTTOM (HWND)4 ! 216: ! 217: #ifndef INCL_SAADEFS ! 218: #define HWND_THREADCAPTURE (HWND)5 ! 219: #endif /* !INCL_SAADEFS */ ! 220: ! 221: ! 222: /* Standard Window Styles */ ! 223: ! 224: #define WS_VISIBLE 0x80000000L ! 225: #define WS_DISABLED 0x40000000L ! 226: #define WS_CLIPCHILDREN 0x20000000L ! 227: #define WS_CLIPSIBLINGS 0x10000000L ! 228: #define WS_PARENTCLIP 0x08000000L ! 229: #define WS_SAVEBITS 0x04000000L ! 230: #define WS_SYNCPAINT 0x02000000L ! 231: #define WS_MINIMIZED 0x01000000L ! 232: #define WS_MAXIMIZED 0x00800000L ! 233: ! 234: /* Dialog manager styles */ ! 235: ! 236: #define WS_GROUP 0x00010000L ! 237: #define WS_TABSTOP 0x00020000L ! 238: #define WS_MULTISELECT 0x00040000L ! 239: ! 240: ! 241: /* Class styles */ ! 242: ! 243: #define CS_MOVENOTIFY 0x00000001L ! 244: #define CS_SIZEREDRAW 0x00000004L ! 245: #define CS_HITTEST 0x00000008L ! 246: #define CS_PUBLIC 0x00000010L ! 247: #define CS_FRAME 0x00000020L ! 248: #define CS_CLIPCHILDREN 0x20000000L ! 249: #define CS_CLIPSIBLINGS 0x10000000L ! 250: #define CS_PARENTCLIP 0x08000000L ! 251: #define CS_SAVEBITS 0x04000000L ! 252: #define CS_SYNCPAINT 0x02000000L ! 253: ! 254: /***************************************************************************/ ! 255: /**** Window Manager Subsection part 1 ****/ ! 256: #if (defined(INCL_WINWINDOWMGR) || !defined(INCL_NOCOMMON)) ! 257: ! 258: BOOL APIENTRY WinRegisterClass(HAB hab, PSZ pszClassName, PFNWP pfnWndProc, ! 259: ULONG flStyle, USHORT cbWindowData); ! 260: ! 261: MRESULT APIENTRY WinDefWindowProc(HWND hwnd, USHORT msg, MPARAM mp1, ! 262: MPARAM mp2); ! 263: BOOL APIENTRY WinDestroyWindow(HWND hwnd); ! 264: BOOL APIENTRY WinShowWindow(HWND hwnd, BOOL fShow); ! 265: BOOL APIENTRY WinQueryWindowRect(HWND hwnd, PRECTL prclDest); ! 266: ! 267: HPS APIENTRY WinGetPS(HWND hwnd); ! 268: BOOL APIENTRY WinReleasePS(HPS hps); ! 269: BOOL APIENTRY WinEndPaint(HPS hps); ! 270: #ifndef INCL_SAADEFS ! 271: HPS APIENTRY WinGetClipPS(HWND hwnd, HWND hwndClip, USHORT fs); ! 272: BOOL APIENTRY WinIsWindowShowing(HWND hwnd); ! 273: #endif /* !INCL_SAADEFS */ ! 274: ! 275: HPS APIENTRY WinBeginPaint(HWND hwnd, HPS hps, PRECTL prclPaint); ! 276: HDC APIENTRY WinOpenWindowDC(HWND hwnd); ! 277: ! 278: SHORT APIENTRY WinScrollWindow(HWND hwnd, SHORT dx, SHORT dy, ! 279: PRECTL prclScroll, PRECTL prclClip, ! 280: HRGN hrgnUpdate, PRECTL prclUpdate, ! 281: USHORT rgfsw); ! 282: ! 283: /* WinGetClipPS() flags */ ! 284: ! 285: #ifndef INCL_SAADEFS ! 286: #define PSF_LOCKWINDOWUPDATE 0x0001 ! 287: #define PSF_CLIPUPWARDS 0x0002 ! 288: #define PSF_CLIPDOWNWARDS 0x0004 ! 289: #define PSF_CLIPSIBLINGS 0x0008 ! 290: #define PSF_CLIPCHILDREN 0x0010 ! 291: #define PSF_PARENTCLIP 0x0020 ! 292: ! 293: #endif /* !INCL_SAADEFS */ ! 294: ! 295: /* WinScrollWindow() flags */ ! 296: ! 297: #define SW_SCROLLCHILDREN 0x0001 ! 298: #define SW_INVALIDATERGN 0x0002 ! 299: ! 300: BOOL APIENTRY WinFillRect(HPS hps, PRECTL prcl, LONG lColor); ! 301: ! 302: /* WinInitialize/WinTerminate Interface declarations */ ! 303: ! 304: typedef struct _QVERSDATA { /* qver */ ! 305: USHORT environment; ! 306: USHORT version; ! 307: } QVERSDATA; ! 308: typedef QVERSDATA FAR *PQVERSDATA; ! 309: ! 310: #define QV_OS2 0x0000 ! 311: #define QV_CMS 0x0001 ! 312: #define QV_TSO 0x0002 ! 313: #define QV_TSOBATCH 0x0003 ! 314: #define QV_OS400 0x0004 ! 315: ! 316: ! 317: ULONG APIENTRY WinQueryVersion(HAB hab); ! 318: HAB APIENTRY WinInitialize(USHORT fsOptions); ! 319: BOOL APIENTRY WinTerminate(HAB hab); ! 320: ! 321: HAB APIENTRY WinQueryAnchorBlock(HWND hwnd); ! 322: ! 323: #endif /* INCL_WINWINDOWMGR | !INCL_NOCOMMON */ ! 324: /****************** End of Window Manager COMMON section ******************/ ! 325: ! 326: ! 327: HWND APIENTRY WinCreateWindow(HWND hwndParent, PSZ pszClass, PSZ pszName, ! 328: ULONG flStyle, SHORT x, SHORT y, SHORT cx, ! 329: SHORT cy, HWND hwndOwner, ! 330: HWND hwndInsertBehind, USHORT id, ! 331: PVOID pCtlData, PVOID pPresParams); ! 332: BOOL APIENTRY WinEnableWindow(HWND hwnd, BOOL fEnable); ! 333: BOOL APIENTRY WinIsWindowEnabled(HWND hwnd); ! 334: BOOL APIENTRY WinEnableWindowUpdate(HWND hwnd, BOOL fEnable); ! 335: BOOL APIENTRY WinIsWindowVisible(HWND hwnd); ! 336: SHORT APIENTRY WinQueryWindowText(HWND hwnd, SHORT cchBufferMax, ! 337: PCH pchBuffer); ! 338: BOOL APIENTRY WinSetWindowText(HWND hwnd, PSZ pszText); ! 339: SHORT APIENTRY WinQueryWindowTextLength(HWND hwnd); ! 340: HWND APIENTRY WinWindowFromID(HWND hwndParent, USHORT id); ! 341: ! 342: BOOL APIENTRY WinIsWindow(HAB hab, HWND hwnd); ! 343: HWND APIENTRY WinQueryWindow(HWND hwnd, SHORT cmd, BOOL fLock); ! 344: SHORT APIENTRY WinMultWindowFromIDs(HWND hwndParent, PHWND prghwnd, ! 345: USHORT idFirst, USHORT idLast); ! 346: ! 347: /* WinQueryWindow() codes */ ! 348: ! 349: #define QW_NEXT 0 ! 350: #define QW_PREV 1 ! 351: #define QW_TOP 2 ! 352: #define QW_BOTTOM 3 ! 353: #define QW_OWNER 4 ! 354: #define QW_PARENT 5 ! 355: #define QW_NEXTTOP 6 ! 356: #define QW_PREVTOP 7 ! 357: #define QW_FRAMEOWNER 8 ! 358: ! 359: ! 360: BOOL APIENTRY WinSetParent(HWND hwnd, HWND hwndNewParent, BOOL fRedraw); ! 361: ! 362: BOOL APIENTRY WinIsChild(HWND hwnd, HWND hwndParent); ! 363: BOOL APIENTRY WinSetOwner(HWND hwnd, HWND hwndNewOwner); ! 364: #ifndef INCL_SAADEFS ! 365: BOOL APIENTRY WinQueryWindowProcess(HWND hwnd, PPID ppid, PTID ptid); ! 366: #endif /* !INCL_SAADEFS */ ! 367: ! 368: HWND APIENTRY WinQueryObjectWindow(HWND hwndDesktop); ! 369: HWND APIENTRY WinQueryDesktopWindow(HAB hab, HDC hdc); ! 370: ! 371: /*** Window positioning functions */ ! 372: ! 373: /* WinSetMultWindowPos() structure */ ! 374: ! 375: #ifdef INCL_32 ! 376: typedef struct _SWP { /* swp */ ! 377: ULONG fl; ! 378: SHORT cy; ! 379: SHORT cx; ! 380: SHORT y; ! 381: SHORT x; ! 382: HWND hwndInsertBehind; ! 383: HWND hwnd; ! 384: ULONG ulReserved1; ! 385: ULONG ulReserved2; ! 386: } SWP; ! 387: #else ! 388: typedef struct _SWP { /* swp */ ! 389: USHORT fs; ! 390: SHORT cy; ! 391: SHORT cx; ! 392: SHORT y; ! 393: SHORT x; ! 394: HWND hwndInsertBehind; ! 395: HWND hwnd; ! 396: } SWP; ! 397: #endif ! 398: typedef SWP FAR *PSWP; ! 399: ! 400: #ifdef INCL_32 ! 401: BOOL APIENTRY WinSetWindowPos(HWND hwnd, HWND hwndInsertBehind, SHORT x, ! 402: SHORT y, SHORT cx, SHORT cy, ULONG fl); ! 403: #else ! 404: BOOL APIENTRY WinSetWindowPos(HWND hwnd, HWND hwndInsertBehind, SHORT x, ! 405: SHORT y, SHORT cx, SHORT cy, USHORT fs); ! 406: #endif ! 407: BOOL APIENTRY WinQueryWindowPos(HWND hwnd, PSWP pswp); ! 408: BOOL APIENTRY WinSetMultWindowPos(HAB hab, PSWP pswp, USHORT cswp); ! 409: ! 410: /* Values returned from WM_ADJUSTWINDOWPOS and passed to WM_WINDOWPOSCHANGED */ ! 411: ! 412: #define AWP_MINIMIZED 0x00010000L ! 413: #define AWP_MAXIMIZED 0x00020000L ! 414: #define AWP_RESTORED 0x00040000L ! 415: #define AWP_ACTIVATE 0x00080000L ! 416: #define AWP_DEACTIVATE 0x00100000L ! 417: ! 418: /* WinSetWindowPos() flags */ ! 419: ! 420: #define SWP_SIZE 0x0001 ! 421: #define SWP_MOVE 0x0002 ! 422: #define SWP_ZORDER 0x0004 ! 423: #define SWP_SHOW 0x0008 ! 424: #define SWP_HIDE 0x0010 ! 425: #define SWP_NOREDRAW 0x0020 ! 426: #define SWP_NOADJUST 0x0040 ! 427: #define SWP_ACTIVATE 0x0080 ! 428: #define SWP_DEACTIVATE 0x0100 ! 429: #define SWP_EXTSTATECHANGE 0x0200 ! 430: #define SWP_MINIMIZE 0x0400 ! 431: #define SWP_MAXIMIZE 0x0800 ! 432: #define SWP_RESTORE 0x1000 ! 433: #define SWP_FOCUSACTIVATE 0x2000 ! 434: #define SWP_FOCUSDEACTIVATE 0x4000 ! 435: ! 436: /* Window painting */ ! 437: ! 438: BOOL APIENTRY WinUpdateWindow(HWND hwnd); ! 439: ! 440: BOOL APIENTRY WinInvalidateRect(HWND hwnd, PRECTL pwrc, BOOL fIncludeChildren); ! 441: BOOL APIENTRY WinInvalidateRegion(HWND hwnd, HRGN hrgn, ! 442: BOOL fIncludeChildren); ! 443: ! 444: ! 445: /* Drawing helpers */ ! 446: ! 447: BOOL APIENTRY WinInvertRect(HPS hps, PRECTL prcl); ! 448: BOOL APIENTRY WinDrawBitmap(HPS hpsDst, HBITMAP hbm, PRECTL pwrcSrc, ! 449: PPOINTL pptlDst, LONG clrFore, LONG clrBack, ! 450: USHORT fs); ! 451: ! 452: /* WinDrawBitmap() flags */ ! 453: ! 454: #define DBM_NORMAL 0x0000 ! 455: #define DBM_INVERT 0x0001 ! 456: #define DBM_HALFTONE 0x0002 ! 457: #define DBM_STRETCH 0x0004 ! 458: #define DBM_IMAGEATTRS 0x0008 ! 459: ! 460: ! 461: #ifdef INCL_32 ! 462: ! 463: SHORT APIENTRY WinDrawText(HPS hps, SHORT cchText, PCH lpchText, PRECTL prcl, ! 464: LONG clrFore, LONG clrBack, ULONG flCmd); ! 465: ! 466: #else /* not INCL_32 */ ! 467: ! 468: SHORT APIENTRY WinDrawText(HPS hps, SHORT cchText, PCH lpchText, PRECTL prcl, ! 469: LONG clrFore, LONG clrBack, USHORT fsCmd); ! 470: ! 471: #endif /* INCL_32 */ ! 472: ! 473: /* ! 474: * WinDrawText() codes: ! 475: * From DT_LEFT to DT_EXTERNALLEADING, the codes are designed to be OR'ed with ! 476: * SS_TEXT to create variations of the basic text static item. ! 477: */ ! 478: #define DT_LEFT 0x0000 ! 479: #define DT_QUERYEXTENT 0x0002 ! 480: #define DT_UNDERSCORE 0x0010 ! 481: #define DT_STRIKEOUT 0x0020 ! 482: #define DT_TEXTATTRS 0x0040 ! 483: #define DT_EXTERNALLEADING 0x0080 ! 484: #define DT_CENTER 0x0100 ! 485: #define DT_RIGHT 0x0200 ! 486: #define DT_TOP 0x0000 ! 487: #define DT_VCENTER 0x0400 ! 488: #define DT_BOTTOM 0x0800 ! 489: #define DT_HALFTONE 0x1000 ! 490: #define DT_MNEMONIC 0x2000 ! 491: #define DT_WORDBREAK 0x4000 ! 492: #define DT_ERASERECT 0x8000 ! 493: ! 494: ! 495: #ifdef INCL_32 ! 496: ! 497: BOOL APIENTRY WinDrawBorder(HPS hps, PRECTL prcl, SHORT cx, SHORT cy, ! 498: LONG clrFore, LONG clrBack, ULONG flCmd); ! 499: ! 500: #else /* not INCL_32 */ ! 501: ! 502: BOOL APIENTRY WinDrawBorder(HPS hps, PRECTL prcl, SHORT cx, SHORT cy, ! 503: LONG clrFore, LONG clrBack, USHORT fsCmd); ! 504: ! 505: #endif /* INCL_32 */ ! 506: ! 507: /* WinDrawBorder() flags */ ! 508: ! 509: #define DB_PATCOPY 0x0000 ! 510: #define DB_PATINVERT 0x0001 ! 511: #define DB_DESTINVERT 0x0002 ! 512: #define DB_AREAMIXMODE 0x0003 ! 513: ! 514: #define DB_ROP 0x0007 ! 515: #define DB_INTERIOR 0x0008 ! 516: #define DB_AREAATTRS 0x0010 ! 517: #define DB_STANDARD 0x0100 ! 518: #define DB_DLGBORDER 0x0200 ! 519: ! 520: ! 521: ! 522: /** Resource loading functions */ ! 523: ! 524: SHORT APIENTRY WinLoadString(HAB hab, HMODULE hmod, USHORT id, SHORT cchMax, ! 525: PSZ pchBuffer); ! 526: #ifndef INCL_SAADEFS ! 527: SHORT APIENTRY WinLoadMessage(HAB hab, HMODULE hmod, USHORT id, SHORT cchMax, ! 528: PSZ pchBuffer); ! 529: ! 530: ! 531: #endif /* !INCL_SAADEFS */ ! 532: ! 533: /***************************************************************************/ ! 534: /**** Window Manager Subsection part 2 ****/ ! 535: #if (defined(INCL_WINWINDOWMGR) || !defined(INCL_NOCOMMON)) ! 536: ! 537: BOOL APIENTRY WinSetActiveWindow(HWND hwndDesktop, HWND hwnd); ! 538: ! 539: #endif /* Window Manager COMMON subsection */ ! 540: ! 541: #ifdef INCL_WINWINDOWMGR ! 542: /* WM_CREATE structure */ ! 543: ! 544: typedef struct _CREATESTRUCT { /* crst */ ! 545: PVOID pPresParams; ! 546: PVOID pCtlData; ! 547: USHORT id; ! 548: HWND hwndInsertBehind; ! 549: HWND hwndOwner; ! 550: SHORT cy; ! 551: SHORT cx; ! 552: SHORT y; ! 553: SHORT x; ! 554: ULONG flStyle; ! 555: PSZ pszText; ! 556: PSZ pszClass; ! 557: HWND hwndParent; ! 558: } CREATESTRUCT; ! 559: typedef CREATESTRUCT FAR *PCREATESTRUCT; ! 560: ! 561: /* WinQueryClassInfo() structure */ ! 562: ! 563: typedef struct _CLASSINFO { /* clsi */ ! 564: ULONG flClassStyle; ! 565: PFNWP pfnWindowProc; ! 566: USHORT cbWindowData; ! 567: } CLASSINFO; ! 568: typedef CLASSINFO FAR *PCLASSINFO; ! 569: ! 570: #ifndef INCL_SAADEFS ! 571: PFNWP APIENTRY WinSubclassWindow(HWND hwnd, PFNWP pfnwp); ! 572: #endif /* !INCL_SAADEFS */ ! 573: ! 574: SHORT APIENTRY WinQueryClassName(HWND hwnd, SHORT cchMax, PCH pch); ! 575: BOOL APIENTRY WinQueryClassInfo(HAB hab, PSZ pszClassName, ! 576: PCLASSINFO pClassInfo); ! 577: ! 578: HWND APIENTRY WinQueryActiveWindow(HWND hwndDesktop, BOOL fLock); ! 579: ! 580: #ifndef INCL_SAADEFS ! 581: BOOL APIENTRY WinIsThreadActive(HAB hab); ! 582: #endif /* !INCL_SAADEFS */ ! 583: HWND APIENTRY WinQuerySysModalWindow(HWND hwndDesktop, BOOL fLock); ! 584: ! 585: HWND APIENTRY WinLockWindow(HWND hwnd, BOOL fLock); ! 586: #ifndef INCL_SAADEFS ! 587: BOOL APIENTRY WinRegisterWindowDestroy(HWND hwnd, BOOL fRegister); ! 588: #endif /* !INCL_SAADEFS */ ! 589: BOOL APIENTRY WinSetSysModalWindow(HWND hwndDesktop, HWND hwnd); ! 590: ! 591: SHORT APIENTRY WinQueryWindowLockCount(HWND hwnd); ! 592: ! 593: #ifndef INCL_SAADEFS ! 594: USHORT APIENTRY WinQueryWindowUShort(HWND hwnd, SHORT index); ! 595: BOOL APIENTRY WinSetWindowUShort(HWND hwnd, SHORT index, USHORT us); ! 596: ULONG APIENTRY WinQueryWindowULong(HWND hwnd, SHORT index); ! 597: BOOL APIENTRY WinSetWindowULong(HWND hwnd, SHORT index, ULONG ul); ! 598: PVOID APIENTRY WinQueryWindowPtr(HWND hwnd, SHORT index); ! 599: BOOL APIENTRY WinSetWindowPtr(HWND hwnd, SHORT index, PVOID p); ! 600: BOOL APIENTRY WinSetWindowBits(HWND hwnd, SHORT index, ULONG flData, ! 601: ULONG flMask); ! 602: ! 603: /* Standard WinQueryWindowUShort/ULong() indices */ ! 604: ! 605: #define QWS_USER 0 ! 606: #define QWS_ID (-1) ! 607: #define QWS_MIN (-1) ! 608: ! 609: #define QWL_USER 0 ! 610: #define QWL_STYLE (-2) ! 611: #define QWP_PFNWP (-3) ! 612: #define QWL_HMQ (-4) ! 613: #define QWL_RESERVED (-5) ! 614: #define QWL_MIN (-5) ! 615: ! 616: /* WC_FRAME WinQueryWindowUShort/ULong() indices */ ! 617: ! 618: #define QWL_HHEAP 0x0004 ! 619: #define QWL_HWNDFOCUSSAVE 0x0018 ! 620: #define QWL_DEFBUTTON 0x0040 ! 621: ! 622: #define QWS_FLAGS 0x0008 ! 623: #define QWS_RESULT 0x000a ! 624: #define QWS_XRESTORE 0x000c ! 625: #define QWS_YRESTORE 0x000e ! 626: #define QWS_CXRESTORE 0x0010 ! 627: #define QWS_CYRESTORE 0x0012 ! 628: #define QWS_XMINIMIZE 0x0014 ! 629: #define QWS_YMINIMIZE 0x0016 ! 630: ! 631: ! 632: /* Window enumeration */ ! 633: ! 634: typedef LHANDLE HENUM; /* henum */ ! 635: ! 636: HENUM APIENTRY WinBeginEnumWindows(HWND hwnd); ! 637: HWND APIENTRY WinGetNextWindow(HENUM henum); ! 638: BOOL APIENTRY WinEndEnumWindows(HENUM henum); ! 639: ! 640: #endif /* !INCL_SAADEFS */ ! 641: ! 642: HWND APIENTRY WinWindowFromPoint(HWND hwnd, PPOINTL pptl, BOOL fChildren, ! 643: BOOL fLock); ! 644: BOOL APIENTRY WinMapWindowPoints(HWND hwndFrom, HWND hwndTo, PPOINTL prgptl, ! 645: SHORT cwpt); ! 646: ! 647: /* More window painting functions */ ! 648: ! 649: BOOL APIENTRY WinValidateRect(HWND hwnd, PRECTL prcl, BOOL fIncludeChildren); ! 650: BOOL APIENTRY WinValidateRegion(HWND hwnd, HRGN hrgn, BOOL fIncludeChildren); ! 651: #ifndef INCL_SAADEFS ! 652: HWND APIENTRY WinWindowFromDC(HDC hdc); ! 653: HDC APIENTRY WinQueryWindowDC(HWND hwnd); ! 654: HPS APIENTRY WinGetScreenPS(HWND hwndDesktop); ! 655: BOOL APIENTRY WinLockWindowUpdate(HWND hwndDesktop, HWND hwndLockUpdate); ! 656: BOOL APIENTRY WinLockVisRegions(HWND hwndDesktop, BOOL fLock); ! 657: #endif /* !INCL_SAADEFS */ ! 658: BOOL APIENTRY WinQueryUpdateRect(HWND hwnd, PRECTL prcl); ! 659: SHORT APIENTRY WinQueryUpdateRegion(HWND hwnd, HRGN hrgn); ! 660: SHORT APIENTRY WinExcludeUpdateRegion(HPS hps, HWND hwnd); ! 661: ! 662: #endif /* INCL_WINWINDOWMGR */ ! 663: ! 664: #if (defined(INCL_WINMESSAGEMGR) || !defined(INCL_NOCOMMON)) ! 665: ! 666: /* QMSG structure */ ! 667: ! 668: typedef struct _QMSG { /* qmsg */ ! 669: HWND hwnd; ! 670: USHORT msg; ! 671: MPARAM mp1; ! 672: MPARAM mp2; ! 673: ULONG time; ! 674: POINTL ptl; ! 675: } QMSG; ! 676: typedef QMSG FAR *PQMSG; ! 677: ! 678: typedef LHANDLE HMQ; /* hmq */ ! 679: ! 680: /* ! 681: ** This is the standard function definition for window procedures. ! 682: ** Typically they are names like "XxxxxxxxWndProc", where the prefix ! 683: ** "Xxxxxxxxx" is replaced by some name descriptive of the window procedure ! 684: ** being declared. Window procedures must be EXPORTED in the definitions ! 685: ** file used by the linker. ! 686: ** ! 687: ** MRESULT EXPENTRY MyclassWndProc(HWND hwnd, ** window handle ** ! 688: ** USHORT msg, ** message number ** ! 689: ** MPARAM mp1, ** 1st (packed) parms ** ! 690: ** MPARAM mp2); ** 2nd (packed) parms ** ! 691: */ ! 692: ! 693: /* Standard Window Messages */ ! 694: ! 695: #define WM_NULL 0x0000 ! 696: #define WM_CREATE 0x0001 ! 697: #define WM_DESTROY 0x0002 ! 698: ! 699: #ifndef INCL_SAADEFS ! 700: #define WM_OTHERWINDOWDESTROYED 0x0003 ! 701: #endif /* !INCL_SAADEFS */ ! 702: ! 703: #define WM_ENABLE 0x0004 ! 704: #define WM_SHOW 0x0005 ! 705: #define WM_MOVE 0x0006 ! 706: #define WM_SIZE 0x0007 ! 707: #define WM_ADJUSTWINDOWPOS 0x0008 ! 708: ! 709: #define WM_CALCVALIDRECTS 0x0009 ! 710: ! 711: #define WM_SETWINDOWPARAMS 0x000a ! 712: #define WM_QUERYWINDOWPARAMS 0x000b ! 713: #define WM_HITTEST 0x000c ! 714: #define WM_ACTIVATE 0x000d ! 715: #define WM_SETFOCUS 0x000f ! 716: #define WM_SETSELECTION 0x0010 ! 717: ! 718: /* language support Winproc */ ! 719: #define WM_PPAINT 0x0011 ! 720: #define WM_PSETFOCUS 0x0012 ! 721: #define WM_PSYSCOLORCHANGE 0x0013 ! 722: #define WM_PSIZE 0x0014 ! 723: #define WM_PACTIVATE 0x0015 ! 724: #define WM_PCONTROL 0x0016 ! 725: ! 726: ! 727: #define WM_COMMAND 0x0020 ! 728: #define WM_SYSCOMMAND 0x0021 ! 729: #define WM_HELP 0x0022 ! 730: #define WM_PAINT 0x0023 ! 731: ! 732: #ifndef INCL_SAADEFS ! 733: #define WM_TIMER 0x0024 ! 734: #define WM_SEM1 0x0025 ! 735: #define WM_SEM2 0x0026 ! 736: #define WM_SEM3 0x0027 ! 737: #define WM_SEM4 0x0028 ! 738: #endif /* !INCL_SAADEFS */ ! 739: ! 740: #define WM_CLOSE 0x0029 ! 741: #define WM_QUIT 0x002a ! 742: #define WM_SYSCOLORCHANGE 0x002b ! 743: #define WM_SYSVALUECHANGED 0x002d ! 744: #define WM_APPTERMINATENOTIFY 0x002e ! 745: #define WM_PRESPARAMCHANGED 0x002f ! 746: ! 747: /* Control notification messages */ ! 748: ! 749: #define WM_CONTROL 0x0030 ! 750: #define WM_VSCROLL 0x0031 ! 751: #define WM_HSCROLL 0x0032 ! 752: #define WM_INITMENU 0x0033 ! 753: #define WM_MENUSELECT 0x0034 ! 754: #define WM_MENUEND 0x0035 ! 755: #define WM_DRAWITEM 0x0036 ! 756: #define WM_MEASUREITEM 0x0037 ! 757: #define WM_CONTROLPOINTER 0x0038 ! 758: #define WM_QUERYDLGCODE 0x003a ! 759: #define WM_INITDLG 0x003b ! 760: #define WM_SUBSTITUTESTRING 0x003c ! 761: #define WM_MATCHMNEMONIC 0x003d ! 762: #define WM_SAVEAPPLICATION 0x003e ! 763: ! 764: /* XLATOFF */ ! 765: #ifdef INCL_16 ! 766: #define WM_CONTROLHEAP 0x0039 ! 767: #endif /* INCL_16 */ ! 768: /* XLATON */ ! 769: ! 770: /* Reserve a range of messages for help manager. This range includes */ ! 771: /* public messages, defined below, and private ones, which need to be */ ! 772: /* reserved here to prevent clashing with application messages */ ! 773: ! 774: #define WM_HELPBASE 0x0F00 /* Start of msgs for help manager */ ! 775: #define WM_HELPTOP 0x0FFF /* End of msgs for help manager */ ! 776: ! 777: #define WM_USER 0x1000 ! 778: ! 779: /* WM_COMMAND msg source codes */ ! 780: ! 781: #define CMDSRC_PUSHBUTTON 1 ! 782: #define CMDSRC_MENU 2 ! 783: #define CMDSRC_ACCELERATOR 3 ! 784: #define CMDSRC_OTHER 0 ! 785: ! 786: #ifndef INCL_32 ! 787: /* ! 788: * The following structure and macro are used to access the ! 789: * WM_COMMAND, WM_HELP, and WM_SYSCOMMAND message parameters: ! 790: */ ! 791: typedef struct _COMMANDMSG { /* commandmsg */ ! 792: USHORT source; /* mp2 */ ! 793: BOOL fMouse; ! 794: USHORT cmd; /* mp1 */ ! 795: USHORT unused; ! 796: } CMDMSG; ! 797: ! 798: #define COMMANDMSG(pmsg) \ ! 799: ((struct _COMMANDMSG FAR *)((PBYTE)pmsg - sizeof(MPARAM) * 2)) ! 800: #endif /* INCL_32 */ ! 801: ! 802: /* ! 803: * The following structure is used by the WinQueryQueueInfo() routine ! 804: */ ! 805: #ifdef INCL_32 ! 806: typedef struct _MQINFO { /* mqi */ ! 807: USHORT cb; ! 808: PID pid; ! 809: TID tid; ! 810: USHORT cmsgs; ! 811: PVOID pReserved; ! 812: } MQINFO; ! 813: typedef MQINFO FAR *PMQINFO; ! 814: #else /* not INCL_32 */ ! 815: typedef struct _MQINFO { /* mqi */ ! 816: USHORT cb; ! 817: USHORT pid; ! 818: USHORT tid; ! 819: USHORT cmsgs; ! 820: PVOID pReserved; ! 821: } MQINFO; ! 822: typedef MQINFO FAR *PMQINFO; ! 823: #endif /* INCL_32 */ ! 824: ! 825: ! 826: MRESULT APIENTRY WinSendMsg(HWND hwnd, USHORT msg, MPARAM mp1, MPARAM mp2); ! 827: HMQ APIENTRY WinCreateMsgQueue(HAB hab, SHORT cmsg); ! 828: BOOL APIENTRY WinDestroyMsgQueue(HMQ hmq); ! 829: BOOL APIENTRY WinQueryQueueInfo(HMQ hmq, PMQINFO pmqi, USHORT cbCopy); ! 830: ! 831: #ifndef INCL_SAADEFS ! 832: BOOL APIENTRY WinCancelShutdown(HMQ hmq, BOOL fCancelAlways); ! 833: #endif /* INCL_SAADEFS */ ! 834: ! 835: BOOL APIENTRY WinGetMsg(HAB hab, PQMSG pqmsg, HWND hwndFilter, ! 836: USHORT msgFilterFirst, USHORT msgFilterLast); ! 837: BOOL APIENTRY WinPeekMsg(HAB hab, PQMSG pqmsg, HWND hwndFilter, ! 838: USHORT msgFilterFirst, USHORT msgFilterLast, ! 839: USHORT fs); ! 840: ! 841: MRESULT APIENTRY WinDispatchMsg(HAB hab, PQMSG pqmsg); ! 842: ! 843: BOOL APIENTRY WinPostMsg(HWND hwnd, USHORT msg, MPARAM mp1, MPARAM mp2); ! 844: BOOL APIENTRY WinRegisterUserMsg(HAB hab, USHORT msgid, SHORT datatype1, ! 845: SHORT dir1, SHORT datatype2, SHORT dir2, ! 846: SHORT datatyper); ! 847: BOOL APIENTRY WinRegisterUserDatatype(HAB hab, SHORT datatype, ! 848: SHORT count, PSHORT types); ! 849: BOOL APIENTRY WinSetMsgMode(HAB hab, PSZ classname, ! 850: SHORT control); ! 851: BOOL APIENTRY WinSetSynchroMode(HAB hab, SHORT mode); ! 852: ! 853: /* WinPeekMsg() constants */ ! 854: ! 855: #define PM_REMOVE 0x0001 ! 856: #define PM_NOREMOVE 0x0000 ! 857: ! 858: /* WinRegisterUserDatatype datatypes defined in separate file */ ! 859: #ifdef INCL_WINTYPES ! 860: #include <pmtypes.h> ! 861: #endif /*INCL_WINTYPES*/ ! 862: ! 863: /* WinRegisterUserMsg direction codes */ ! 864: ! 865: #define RUM_IN 1 ! 866: #define RUM_OUT 2 ! 867: #define RUM_INOUT 3 ! 868: ! 869: /* WinSetMsgMode constants */ ! 870: ! 871: #define SMD_DELAYED 0x0001 ! 872: #define SMD_IMMEDIATE 0x0002 ! 873: ! 874: /* WinSetSynchroMode constants */ ! 875: ! 876: #define SSM_SYNCHRONOUS 0x0001 ! 877: #define SSM_ASYNCHRONOUS 0x0002 ! 878: #define SSM_MIXED 0x0003 ! 879: ! 880: #endif /* WINMESSAGEMGR || !INCL_NOCOMMON */ ! 881: ! 882: #ifdef INCL_WINMESSAGEMGR ! 883: ! 884: /* WM_CALCVALIDRECTS return flags */ ! 885: ! 886: #define CVR_ALIGNLEFT 0x0001 ! 887: #define CVR_ALIGNBOTTOM 0x0002 ! 888: #define CVR_ALIGNRIGHT 0x0004 ! 889: #define CVR_ALIGNTOP 0x0008 ! 890: #define CVR_REDRAW 0x0010 ! 891: ! 892: ! 893: /* WM_HITTEST return codes */ ! 894: ! 895: #define HT_NORMAL 0 ! 896: #define HT_TRANSPARENT (-1) ! 897: #define HT_DISCARD (-2) ! 898: #define HT_ERROR (-3) ! 899: ! 900: ! 901: /* WM_SET/QUERYWINDOWPARAMS structures and flags */ ! 902: ! 903: typedef struct _WNDPARAMS { /* wprm */ ! 904: USHORT fsStatus; ! 905: USHORT cchText; ! 906: PSZ pszText; ! 907: USHORT cbPresParams; ! 908: PVOID pPresParams; ! 909: USHORT cbCtlData; ! 910: PVOID pCtlData; ! 911: } WNDPARAMS; ! 912: typedef WNDPARAMS FAR *PWNDPARAMS; ! 913: ! 914: /* Flags used by WM_SET/QUERYWINDOWPARAMS */ ! 915: ! 916: #define WPM_TEXT 0x0001 ! 917: #define WPM_CTLDATA 0x0002 ! 918: #define WPM_PRESPARAMS 0x0004 ! 919: #define WPM_CCHTEXT 0x0008 ! 920: #define WPM_CBCTLDATA 0x0010 ! 921: #define WPM_CBPRESPARAMS 0x0020 ! 922: ! 923: #ifndef INCL_SAADEFS ! 924: BOOL APIENTRY WinInSendMsg(HAB hab); ! 925: ! 926: #endif /* INCL_SAADEFS */ ! 927: ! 928: BOOL APIENTRY WinBroadcastMsg(HWND hwnd, USHORT msg, MPARAM mp1, MPARAM mp2, ! 929: USHORT rgf); ! 930: ! 931: /* WinBroadcastMsg codes */ ! 932: ! 933: #define BMSG_POST 0x0000 ! 934: #define BMSG_SEND 0x0001 ! 935: #define BMSG_POSTQUEUE 0x0002 ! 936: #define BMSG_DESCENDANTS 0x0004 ! 937: #define BMSG_FRAMEONLY 0x0008 ! 938: ! 939: ! 940: ! 941: BOOL APIENTRY WinWaitMsg(HAB hab, USHORT msgFirst, USHORT msgLast); ! 942: ! 943: #ifndef INCL_SAADEFS ! 944: ULONG APIENTRY WinQueryQueueStatus(HWND hwndDesktop); ! 945: ! 946: /* WinQueryQueueStatus() constants */ ! 947: ! 948: #define QS_KEY 0x0001 ! 949: #define QS_MOUSEBUTTON 0x0002 ! 950: #define QS_MOUSEMOVE 0x0004 ! 951: #define QS_MOUSE 0x0006 /* QS_MOUSEMOVE|QS_MOUSEBUTTON */ ! 952: #define QS_TIMER 0x0008 ! 953: #define QS_PAINT 0x0010 ! 954: #define QS_POSTMSG 0x0020 ! 955: #define QS_SEM1 0x0040 ! 956: #define QS_SEM2 0x0080 ! 957: #define QS_SEM3 0x0100 ! 958: #define QS_SEM4 0x0200 ! 959: #define QS_SENDMSG 0x0400 ! 960: ! 961: ! 962: BOOL APIENTRY WinQueryMsgPos(HAB hab, PPOINTL pptl); ! 963: ULONG APIENTRY WinQueryMsgTime(HAB hab); ! 964: ! 965: USHORT APIENTRY WinMsgSemWait(HSEM hsem, LONG dtTimeout); ! 966: USHORT APIENTRY WinMsgMuxSemWait(PUSHORT pisemCleared, PVOID pmxsl, ! 967: LONG dtTimeout); ! 968: ! 969: #if defined(INCL_32) ! 970: #if !defined(DEFINEMUXSEMLIST) ! 971: ! 972: /* These definitions are also in bsedos16.h. They need to be here */ ! 973: /* in case the user is converting an application that uses */ ! 974: /* WinMsgMuxSemWait, as bsedos.h (32-bit version) does not define it. */ ! 975: ! 976: typedef struct _MUXSEM { /* mxs */ ! 977: USHORT zero; ! 978: HSEM hsem; ! 979: } MUXSEM; ! 980: typedef MUXSEM FAR *PMUXSEM; ! 981: ! 982: typedef struct _MUXSEMLIST { /* mxsl */ ! 983: USHORT cmxs; ! 984: MUXSEM amxs[16]; ! 985: } MUXSEMLIST; ! 986: typedef MUXSEMLIST FAR *PMUXSEMLIST; ! 987: ! 988: /* ! 989: * Since a MUXSEMLIST structure is actually a variable length ! 990: * structure, the following macro may be used to define a MUXSEMLIST ! 991: * structure having size elements, named "name". ! 992: */ ! 993: #define DEFINEMUXSEMLIST(name, size) \ ! 994: struct { \ ! 995: USHORT cmxs; \ ! 996: MUXSEM amxs[size]; \ ! 997: } name; ! 998: ! 999: #endif /* !defined(DEFINEMUXSEMLIST) */ ! 1000: #endif /* defined(INCL_32) */ ! 1001: ! 1002: #endif /* !INCL_SAADEFS */ ! 1003: BOOL APIENTRY WinPostQueueMsg(HMQ hmq, USHORT msg, MPARAM mp1, MPARAM mp2); ! 1004: ! 1005: ! 1006: /* WinSetMsgInterest()/WinSetClassMsgInterest() constants */ ! 1007: #define SMIM_ALL 0x0EFF ! 1008: #define SMI_NOINTEREST 0x0001 ! 1009: #define SMI_INTEREST 0x0002 ! 1010: #define SMI_RESET 0x0004 ! 1011: #define SMI_AUTODISPATCH 0x0008 ! 1012: ! 1013: BOOL APIENTRY WinSetMsgInterest(HWND hwnd, USHORT msg_class, SHORT control); ! 1014: BOOL APIENTRY WinSetClassMsgInterest(HAB hab, PSZ pszClassName, ! 1015: USHORT msg_class, SHORT control); ! 1016: ! 1017: #endif /* INCL_WINMESSAGEMGR */ ! 1018: ! 1019: /*** Keyboard and mouse */ ! 1020: ! 1021: #if (defined(INCL_WININPUT) || !defined(INCL_NOCOMMON)) ! 1022: ! 1023: /*** Keyboard and mouse input COMMON subsection */ ! 1024: BOOL APIENTRY WinSetFocus(HWND hwndDesktop, HWND hwndSetFocus); ! 1025: BOOL APIENTRY WinFocusChange(HWND hwndDesktop, HWND hwndSetFocus, ! 1026: USHORT fsFocusChange); ! 1027: ! 1028: #define FC_NOSETFOCUS 0x0001 ! 1029: #define FC_NOBRINGTOTOP FC_NOSETFOCUS ! 1030: #define FC_NOLOSEFOCUS 0x0002 ! 1031: #define FC_NOBRINGTOPFIRSTWINDOW FC_NOLOSEFOCUS ! 1032: #define FC_NOSETACTIVEFOCUS 0x0003 ! 1033: #define FC_NOSETACTIVE 0x0004 ! 1034: #define FC_NOLOSEACTIVE 0x0008 ! 1035: #define FC_NOSETSELECTION 0x0010 ! 1036: #define FC_NOLOSESELECTION 0x0020 ! 1037: ! 1038: #define QFC_NEXTINCHAIN 0x0001 ! 1039: #define QFC_ACTIVE 0x0002 ! 1040: #define QFC_FRAME 0x0003 ! 1041: #define QFC_SELECTACTIVE 0x0004 ! 1042: #define QFC_PARTOFCHAIN 0x0005 ! 1043: ! 1044: #endif /* Keyboard and mouse input COMMON subsection */ ! 1045: ! 1046: #ifdef INCL_WININPUT ! 1047: ! 1048: #ifndef INCL_SAADEFS ! 1049: BOOL APIENTRY WinSetCapture(HWND hwndDesktop, HWND hwnd); ! 1050: #endif /* !INCL_SAADEFS */ ! 1051: HWND APIENTRY WinQueryCapture(HWND hwndDesktop, BOOL fLock); ! 1052: ! 1053: /* Mouse input messages */ ! 1054: ! 1055: #ifndef INCL_SAADEFS ! 1056: #define WM_MOUSEFIRST 0x0070 ! 1057: #define WM_MOUSELAST 0x0079 ! 1058: #define WM_BUTTONCLICKFIRST 0x0071 ! 1059: #define WM_BUTTONCLICKLAST 0x0079 ! 1060: #endif /* !INCL_SAADEFS */ ! 1061: #define WM_MOUSEMOVE 0x0070 ! 1062: ! 1063: #define WM_BUTTON1DOWN 0x0071 ! 1064: ! 1065: #define WM_BUTTON1UP 0x0072 ! 1066: #define WM_BUTTON1DBLCLK 0x0073 ! 1067: #define WM_BUTTON2DOWN 0x0074 ! 1068: #define WM_BUTTON2UP 0x0075 ! 1069: #define WM_BUTTON2DBLCLK 0x0076 ! 1070: #ifndef INCL_SAADEFS ! 1071: #define WM_BUTTON3DOWN 0x0077 ! 1072: #define WM_BUTTON3UP 0x0078 ! 1073: #define WM_BUTTON3DBLCLK 0x0079 ! 1074: #endif /* !INCL_SAADEFS */ ! 1075: ! 1076: HWND APIENTRY WinQueryFocus(HWND hwndDesktop, BOOL fLock); ! 1077: ! 1078: ! 1079: /* Key/Character input messages */ ! 1080: ! 1081: #define WM_CHAR 0x007a ! 1082: #define WM_VIOCHAR 0x007b ! 1083: ! 1084: /* WM_CHAR fs field bits */ ! 1085: ! 1086: #define KC_CHAR 0x0001 ! 1087: #define KC_VIRTUALKEY 0x0002 ! 1088: #define KC_SCANCODE 0x0004 ! 1089: ! 1090: #define KC_SHIFT 0x0008 ! 1091: #define KC_CTRL 0x0010 ! 1092: #define KC_ALT 0x0020 ! 1093: #define KC_KEYUP 0x0040 ! 1094: #define KC_PREVDOWN 0x0080 ! 1095: #define KC_LONEKEY 0x0100 ! 1096: #define KC_DEADKEY 0x0200 ! 1097: #define KC_COMPOSITE 0x0400 ! 1098: #define KC_INVALIDCOMP 0x0800 ! 1099: ! 1100: #ifndef INCL_SAADEFS ! 1101: #define KC_TOGGLE 0x1000 ! 1102: #define KC_INVALIDCHAR 0x2000 ! 1103: #define KC_DBCSRSRVD1 0x4000 ! 1104: #define KC_DBCSRSRVD2 0x8000 ! 1105: #endif /* !INCL_SAADEFS */ ! 1106: ! 1107: #ifndef INCL_32 ! 1108: /* ! 1109: * The following structure and macro are used to access the ! 1110: * WM_MOUSEMOVE, and WM_BUTTON message parameters ! 1111: */ ! 1112: typedef struct _MOUSEMSG { /* mousemsg */ ! 1113: USHORT codeHitTest; /* mp2 */ ! 1114: USHORT unused; ! 1115: SHORT x; /* mp1 */ ! 1116: SHORT y; ! 1117: } MSEMSG; ! 1118: ! 1119: #define MOUSEMSG(pmsg) \ ! 1120: ((struct _MOUSEMSG FAR *)((PBYTE)pmsg - sizeof(MPARAM) * 2)) ! 1121: ! 1122: /* ! 1123: * The following structure and macro are used to access the ! 1124: * WM_CHAR message parameters. ! 1125: */ ! 1126: typedef struct _CHARMSG { /* charmsg */ ! 1127: USHORT chr; /* mp2 */ ! 1128: USHORT vkey; ! 1129: USHORT fs; /* mp1 */ ! 1130: UCHAR cRepeat; ! 1131: UCHAR scancode; ! 1132: } CHRMSG; ! 1133: ! 1134: #define CHARMSG(pmsg) \ ! 1135: ((struct _CHARMSG FAR *)((PBYTE)pmsg - sizeof(MPARAM) * 2)) ! 1136: #endif /* INCL_32 */ ! 1137: ! 1138: /*** Virtual key values */ ! 1139: ! 1140: #define VK_BUTTON1 0x01 ! 1141: #define VK_BUTTON2 0x02 ! 1142: #define VK_BUTTON3 0x03 ! 1143: #define VK_BREAK 0x04 ! 1144: #define VK_BACKSPACE 0x05 ! 1145: #define VK_TAB 0x06 ! 1146: #define VK_BACKTAB 0x07 ! 1147: #define VK_NEWLINE 0x08 ! 1148: #define VK_SHIFT 0x09 ! 1149: #define VK_CTRL 0x0A ! 1150: #define VK_ALT 0x0B ! 1151: #define VK_ALTGRAF 0x0C ! 1152: #define VK_PAUSE 0x0D ! 1153: #define VK_CAPSLOCK 0x0E ! 1154: #define VK_ESC 0x0F ! 1155: #define VK_SPACE 0x10 ! 1156: #define VK_PAGEUP 0x11 ! 1157: #define VK_PAGEDOWN 0x12 ! 1158: #define VK_END 0x13 ! 1159: #define VK_HOME 0x14 ! 1160: #define VK_LEFT 0x15 ! 1161: #define VK_UP 0x16 ! 1162: #define VK_RIGHT 0x17 ! 1163: #define VK_DOWN 0x18 ! 1164: #define VK_PRINTSCRN 0x19 ! 1165: #define VK_INSERT 0x1A ! 1166: #define VK_DELETE 0x1B ! 1167: #define VK_SCRLLOCK 0x1C ! 1168: #define VK_NUMLOCK 0x1D ! 1169: #define VK_ENTER 0x1E ! 1170: #define VK_SYSRQ 0x1F ! 1171: #define VK_F1 0x20 ! 1172: #define VK_F2 0x21 ! 1173: #define VK_F3 0x22 ! 1174: #define VK_F4 0x23 ! 1175: #define VK_F5 0x24 ! 1176: #define VK_F6 0x25 ! 1177: #define VK_F7 0x26 ! 1178: #define VK_F8 0x27 ! 1179: #define VK_F9 0x28 ! 1180: #define VK_F10 0x29 ! 1181: #define VK_F11 0x2A ! 1182: #define VK_F12 0x2B ! 1183: #define VK_F13 0x2C ! 1184: #define VK_F14 0x2D ! 1185: #define VK_F15 0x2E ! 1186: #define VK_F16 0x2F ! 1187: #define VK_F17 0x30 ! 1188: #define VK_F18 0x31 ! 1189: #define VK_F19 0x32 ! 1190: #define VK_F20 0x33 ! 1191: #define VK_F21 0x34 ! 1192: #define VK_F22 0x35 ! 1193: #define VK_F23 0x36 ! 1194: #define VK_F24 0x37 ! 1195: ! 1196: ! 1197: #define VK_MENU VK_F10 ! 1198: #ifdef INCL_NLS ! 1199: #define VK_DBCSFIRST 0x0080 ! 1200: #define VK_DBCSLAST 0x00ff ! 1201: #endif /* INCL_NLS */ ! 1202: ! 1203: #define VK_USERFIRST 0x0100 ! 1204: #define VK_USERLAST 0x01ff ! 1205: ! 1206: #ifndef INCL_SAADEFS ! 1207: ! 1208: SHORT APIENTRY WinGetKeyState(HWND hwndDesktop, SHORT vkey); ! 1209: SHORT APIENTRY WinGetPhysKeyState(HWND hwndDesktop, SHORT sc); ! 1210: BOOL APIENTRY WinEnablePhysInput(HWND hwndDesktop, BOOL fEnable); ! 1211: BOOL APIENTRY WinIsPhysInputEnabled(HWND hwndDesktop); ! 1212: BOOL APIENTRY WinSetKeyboardStateTable(HWND hwndDesktop, ! 1213: PBYTE pKeyStateTable, BOOL fSet); ! 1214: ! 1215: ! 1216: /* Journal Notification messages */ ! 1217: #define WM_JOURNALNOTIFY 0x007c ! 1218: ! 1219: /*** Define the valid commands (lParm1) for journal notify message */ ! 1220: #define JRN_QUEUESTATUS 0x00000001L ! 1221: #define JRN_PHYSKEYSTATE 0x00000002L ! 1222: ! 1223: #endif /* !INCL_SAADEFS */ ! 1224: #endif /* INCL_WININPUT */ ! 1225: ! 1226: ! 1227: /**** Dialog Manager */ ! 1228: ! 1229: #if (defined(INCL_WINDIALOGS) || !defined(INCL_NOCOMMON)) ! 1230: /**** Dialog Manager COMMON subsection */ ! 1231: ! 1232: /* ! 1233: ** This is the standard function definition for dialog procedures. ! 1234: ** Typically they are names like "XxxxxxxxDlgProc", where the prefix ! 1235: ** "Xxxxxxxxx" is replaced by some name descriptive of the dialog procedure ! 1236: ** being declared. Dialog procedures must be EXPORTED in the definitions ! 1237: ** file used by the linker. The dialog procedure declaration is identical ! 1238: ** to that for window procedures. ! 1239: ** ! 1240: ** MRESULT EXPENTRY MydialogDlgProc(HWND hwnd, ** window handle ** ! 1241: ** USHORT msg, ** message number ** ! 1242: ** MPARAM mp1, ** 1st (packed) parms ** ! 1243: ** MPARAM mp2); ** 2nd (packed) parms ** ! 1244: */ ! 1245: ! 1246: BOOL APIENTRY WinGetDlgMsg(HWND hwndDlg, PQMSG pqmsg); ! 1247: ! 1248: ! 1249: HWND APIENTRY WinLoadDlg(HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc, ! 1250: HMODULE hmod, USHORT idDlg, PVOID pCreateParams); ! 1251: USHORT APIENTRY WinDlgBox(HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc, ! 1252: HMODULE hmod, USHORT idDlg, PVOID pCreateParams); ! 1253: ! 1254: BOOL APIENTRY WinDismissDlg(HWND hwndDlg, USHORT usResult); ! 1255: ! 1256: BOOL APIENTRY WinQueryDlgItemShort(HWND hwndDlg, USHORT idItem, ! 1257: PSHORT pResult, BOOL fSigned); ! 1258: BOOL APIENTRY WinSetDlgItemShort(HWND hwndDlg, USHORT idItem, ! 1259: USHORT usValue, BOOL fSigned); ! 1260: BOOL APIENTRY WinSetDlgItemText(HWND hwndDlg, USHORT idItem, PSZ pszText); ! 1261: USHORT APIENTRY WinQueryDlgItemText(HWND hwndDlg, USHORT idItem, ! 1262: SHORT cchBufferMax, PSZ pchBuffer); ! 1263: SHORT APIENTRY WinQueryDlgItemTextLength(HWND hwndDlg, USHORT idItem); ! 1264: ! 1265: MRESULT APIENTRY WinDefDlgProc(HWND hwndDlg, USHORT msg, MPARAM mp1, ! 1266: MPARAM mp2); ! 1267: ! 1268: /* Special item IDs */ ! 1269: ! 1270: #ifndef INCL_SAADEFS ! 1271: #define DID_OK 1 ! 1272: #define DID_CANCEL 2 ! 1273: #define DID_ERROR 0xffff ! 1274: #endif /* !INCL_SAADEFS */ ! 1275: ! 1276: BOOL APIENTRY WinAlarm(HWND hwndDesktop, USHORT rgfType); ! 1277: ! 1278: /* WinAlarm Codes */ ! 1279: ! 1280: #define WA_WARNING 0 ! 1281: #define WA_NOTE 1 ! 1282: #define WA_ERROR 2 ! 1283: #define WA_CWINALARMS 3 ! 1284: ! 1285: #ifdef INCL_32 ! 1286: ! 1287: USHORT APIENTRY WinMessageBox(HWND hwndParent, HWND hwndOwner, PSZ pszText, ! 1288: PSZ pszCaption, USHORT idWindow, ULONG flStyle); ! 1289: ! 1290: #else /* not INCL_32 */ ! 1291: ! 1292: USHORT APIENTRY WinMessageBox(HWND hwndParent, HWND hwndOwner, PSZ pszText, ! 1293: PSZ pszCaption, USHORT idWindow, USHORT fsStyle); ! 1294: ! 1295: #endif /* INCL_32 */ ! 1296: ! 1297: /* Message box types */ ! 1298: ! 1299: #define MB_OK 0x0000 ! 1300: #define MB_OKCANCEL 0x0001 ! 1301: #define MB_RETRYCANCEL 0x0002 ! 1302: #define MB_ABORTRETRYIGNORE 0x0003 ! 1303: #define MB_YESNO 0x0004 ! 1304: #define MB_YESNOCANCEL 0x0005 ! 1305: #define MB_CANCEL 0x0006 ! 1306: #define MB_ENTER 0x0007 ! 1307: #define MB_ENTERCANCEL 0x0008 ! 1308: ! 1309: #define MB_NOICON 0x0000 ! 1310: #define MB_CUANOTIFICATION 0x0000 ! 1311: #define MB_ICONQUESTION 0x0010 ! 1312: #define MB_ICONEXCLAMATION 0x0020 ! 1313: #define MB_CUAWARNING 0x0020 ! 1314: #define MB_ICONASTERISK 0x0030 ! 1315: #define MB_ICONHAND 0x0040 ! 1316: #define MB_CUACRITICAL 0x0040 ! 1317: #define MB_QUERY MB_ICONQUESTION ! 1318: #define MB_WARNING MB_CUAWARNING ! 1319: #define MB_INFORMATION MB_ICONASTERISK ! 1320: #define MB_CRITICAL MB_CUACRITICAL ! 1321: #define MB_ERROR MB_CRITICAL ! 1322: ! 1323: #define MB_DEFBUTTON1 0x0000 ! 1324: #define MB_DEFBUTTON2 0x0100 ! 1325: #define MB_DEFBUTTON3 0x0200 ! 1326: ! 1327: #define MB_APPLMODAL 0x0000 ! 1328: #define MB_SYSTEMMODAL 0x1000 ! 1329: #define MB_HELP 0x2000 ! 1330: #define MB_MOVEABLE 0x4000 ! 1331: ! 1332: ! 1333: /* Message box return codes */ ! 1334: ! 1335: #define MBID_OK 1 ! 1336: #define MBID_CANCEL 2 ! 1337: #define MBID_ABORT 3 ! 1338: #define MBID_RETRY 4 ! 1339: #define MBID_IGNORE 5 ! 1340: #define MBID_YES 6 ! 1341: #define MBID_NO 7 ! 1342: #define MBID_HELP 8 ! 1343: #define MBID_ENTER 9 ! 1344: #define MBID_ERROR 0xffff ! 1345: ! 1346: ! 1347: /* Useful macros */ ! 1348: ! 1349: /*************************************************************************** ! 1350: * USHORT WinCheckButton(HWND hwndDlg, USHORT id, USHORT checkState) ! 1351: * sets the check state of button #id. ! 1352: * returns the previous check state. ! 1353: \**************************************************************************/ ! 1354: #define WinCheckButton(hwndDlg, id, usCheckState) \ ! 1355: ((USHORT)WinSendDlgItemMsg(hwndDlg, id, BM_SETCHECK, \ ! 1356: MPFROMSHORT(usCheckState), (MPARAM)NULL)) ! 1357: ! 1358: /*************************************************************************** ! 1359: * USHORT WinQueryButtonCheckstate(HWND hwndDlg, USHORT id) ! 1360: * returns the check state of buttin #id. ! 1361: * ! 1362: \**************************************************************************/ ! 1363: #define WinQueryButtonCheckstate(hwndDlg, id) \ ! 1364: ((USHORT)WinSendDlgItemMsg(hwndDlg, id, BM_QUERYCHECK, \ ! 1365: (MPARAM)NULL, (MPARAM)NULL)) ! 1366: ! 1367: /*************************************************************************** ! 1368: * BOOL WinEnableControl(HWND hwndDlg, USHORT id, BOOL fEnable) ! 1369: * sets the enable state of button #id. ! 1370: * returns fSuccess. ! 1371: \**************************************************************************/ ! 1372: #define WinEnableControl(hwndDlg, id, fEnable) \ ! 1373: WinEnableWindow(WinWindowFromID(hwndDlg, id), fEnable) ! 1374: ! 1375: /*************************************************************************** ! 1376: * BOOL WinIsControlEnabled(HWND hwndDlg, USHORT id) ! 1377: * returns the enable state of control #id. ! 1378: * ! 1379: \**************************************************************************/ ! 1380: #define WinIsControlEnabled(hwndDlg, id) \ ! 1381: ((BOOL)WinIsWindowEnabled(WinWindowFromID(hwndDlg, id))) ! 1382: ! 1383: #endif /* Dialog Manager COMMON subsection */ ! 1384: ! 1385: ! 1386: #ifdef INCL_WINDIALOGS ! 1387: ! 1388: /* Dialog codes: returned by WM_QUERYDLGCODE msg */ ! 1389: ! 1390: #define DLGC_ENTRYFIELD 0x0001 /* Entry field item understands EM_SETSEL) */ ! 1391: #define DLGC_BUTTON 0x0002 /* Button item */ ! 1392: #define DLGC_RADIOBUTTON 0x0004 /* Radio button */ ! 1393: #define DLGC_STATIC 0x0008 /* Static item */ ! 1394: #define DLGC_DEFAULT 0x0010 /* Default push button */ ! 1395: #define DLGC_PUSHBUTTON 0x0020 /* Normal (Non-default) push button */ ! 1396: #define DLGC_CHECKBOX 0x0040 /* Check box button control */ ! 1397: #define DLGC_SCROLLBAR 0x0080 /* Scroll bar */ ! 1398: #define DLGC_MENU 0x0100 /* Menu */ ! 1399: #define DLGC_TABONCLICK 0x0200 ! 1400: #define DLGC_MLE 0x0400 /* Multiple Line Entry */ ! 1401: ! 1402: ! 1403: USHORT APIENTRY WinProcessDlg(HWND hwndDlg); ! 1404: MRESULT APIENTRY WinSendDlgItemMsg(HWND hwndDlg, USHORT idItem, USHORT msg, ! 1405: MPARAM mp1, MPARAM mp2); ! 1406: BOOL APIENTRY WinMapDlgPoints(HWND hwndDlg, PPOINTL prgwptl, USHORT cwpt, ! 1407: BOOL fCalcWindowCoords); ! 1408: HWND APIENTRY WinEnumDlgItem(HWND hwndDlg, HWND hwnd, USHORT code, ! 1409: BOOL fLock); ! 1410: SHORT APIENTRY WinSubstituteStrings(HWND hwnd, PSZ pszSrc, SHORT cchDstMax, ! 1411: PSZ pszDst); ! 1412: ! 1413: /* WinEnumDlgItem() constants ! 1414: * ! 1415: * In OS/2 1.2, WinEnumDlgItem() can enumerate a window such that the ! 1416: * selection cursor may be moved according to CUA (Common User Access) ! 1417: * rules. ! 1418: */ ! 1419: ! 1420: #define EDI_FIRSTTABITEM 0 ! 1421: #define EDI_LASTTABITEM 1 ! 1422: #define EDI_NEXTTABITEM 2 ! 1423: #define EDI_PREVTABITEM 3 ! 1424: #define EDI_FIRSTGROUPITEM 4 ! 1425: #define EDI_LASTGROUPITEM 5 ! 1426: #define EDI_NEXTGROUPITEM 6 ! 1427: #define EDI_PREVGROUPITEM 7 ! 1428: ! 1429: /*** Dialog template definitions */ ! 1430: ! 1431: /* Variable-sized dialog template items: */ ! 1432: ! 1433: ! 1434: /* ! 1435: * We pack the structures _DLGTITEM and _DLGTEMPLATE so that the structures ! 1436: * are identical in the 32bit and 16bit worlds. We have to do this because ! 1437: * is has been documented that one can pass a pointer to 'the binary resource ! 1438: * format' when calling WinCreateDlg. ! 1439: * ! 1440: */ ! 1441: ! 1442: /* XLATOFF */ ! 1443: #pragma pack(2) /* pack on wordboundary */ ! 1444: /* XLATON */ ! 1445: ! 1446: typedef struct _DLGTITEM { /* dlgti */ ! 1447: USHORT fsItemStatus; ! 1448: USHORT cChildren; ! 1449: USHORT cchClassName; ! 1450: USHORT offClassName; ! 1451: USHORT cchText; ! 1452: USHORT offText; ! 1453: ULONG flStyle; ! 1454: SHORT x; ! 1455: SHORT y; ! 1456: SHORT cx; ! 1457: SHORT cy; ! 1458: USHORT id; ! 1459: USHORT offPresParams; ! 1460: USHORT offCtlData; ! 1461: } DLGTITEM; ! 1462: typedef DLGTITEM FAR *PDLGTITEM; ! 1463: ! 1464: /* Dialog Template structure */ ! 1465: ! 1466: typedef struct _DLGTEMPLATE { /* dlgt */ ! 1467: USHORT cbTemplate; ! 1468: USHORT type; ! 1469: USHORT codepage; ! 1470: USHORT offadlgti; ! 1471: USHORT fsTemplateStatus; ! 1472: USHORT iItemFocus; ! 1473: USHORT coffPresParams; ! 1474: DLGTITEM adlgti[1]; ! 1475: } DLGTEMPLATE; ! 1476: typedef DLGTEMPLATE FAR *PDLGTEMPLATE; ! 1477: /* XLATOFF */ ! 1478: #pragma pack() /* reset to default packing */ ! 1479: /* XLATON */ ! 1480: ! 1481: HWND APIENTRY WinCreateDlg(HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc, ! 1482: PDLGTEMPLATE pdlgt, PVOID pCreateParams); ! 1483: ! 1484: ! 1485: #endif /* INCL_WINDIALOGS */ ! 1486: ! 1487: ! 1488: #ifdef INCL_WINSTATICS ! 1489: ! 1490: /*** Static Control Manager */ ! 1491: ! 1492: /* Static control styles: ! 1493: * ! 1494: * NOTE: the top 9 bits of the LOWORD of the window flStyle are used for ! 1495: * DT_* flags. The lower 7 bits are for SS_* styles. This gives us up ! 1496: * to 128 distinct static control types (we currently use 11 of them). ! 1497: */ ! 1498: #define SS_TEXT 0x0001L ! 1499: #define SS_GROUPBOX 0x0002L ! 1500: ! 1501: #ifndef INCL_SAADEFS ! 1502: #define SS_ICON 0x0003L ! 1503: #define SS_BITMAP 0x0004L ! 1504: #endif /* !INCL_SAADEFS */ ! 1505: #define SS_FGNDRECT 0x0005L ! 1506: #ifndef INCL_SAADEFS ! 1507: #define SS_HALFTONERECT 0x0006L ! 1508: #endif /* !INCL_SAADEFS */ ! 1509: #define SS_BKGNDRECT 0x0007L ! 1510: #define SS_FGNDFRAME 0x0008L ! 1511: #ifndef INCL_SAADEFS ! 1512: #define SS_HALFTONEFRAME 0x0009L ! 1513: #endif /* !INCL_SAADEFS */ ! 1514: #define SS_BKGNDFRAME 0x000aL ! 1515: #define SS_SYSICON 0x000bL ! 1516: ! 1517: #ifdef DCR_AUTOSIZE ! 1518: #define SS_AUTOSIZE 0x0040L ! 1519: #endif ! 1520: ! 1521: /* Static control class name */ ! 1522: ! 1523: #define WC_STATIC ((PSZ)0xffff0005L) ! 1524: ! 1525: /* Static control messages */ ! 1526: ! 1527: #define SM_SETHANDLE 0x0100 ! 1528: #define SM_QUERYHANDLE 0x0101 ! 1529: ! 1530: #endif /* INCL_WINSTATICS */ ! 1531: ! 1532: ! 1533: #ifdef INCL_WINBUTTONS ! 1534: /**** Button Controls Subsection */ ! 1535: ! 1536: /* Button control styles */ ! 1537: ! 1538: #define BS_PUSHBUTTON 0L ! 1539: #define BS_CHECKBOX 1L ! 1540: #define BS_AUTOCHECKBOX 2L ! 1541: #define BS_RADIOBUTTON 3L ! 1542: #define BS_AUTORADIOBUTTON 4L ! 1543: #define BS_3STATE 5L ! 1544: #define BS_AUTO3STATE 6L ! 1545: ! 1546: #ifndef INCL_SAADEFS ! 1547: #define BS_USERBUTTON 7L ! 1548: #endif /* !INCL_SAADEFS */ ! 1549: ! 1550: #define BS_HELP 0x0100L ! 1551: #define BS_SYSCOMMAND 0x0200L ! 1552: #define BS_DEFAULT 0x0400L ! 1553: #define BS_NOPOINTERFOCUS 0x0800L ! 1554: #define BS_NOBORDER 0x1000L ! 1555: #define BS_NOCURSORSELECT 0x2000L ! 1556: #ifdef DCR_AUTOSIZE ! 1557: #define BS_AUTOSIZE 0x4000L ! 1558: #define BS_OWNERDRAW 0x8000L ! 1559: #endif ! 1560: ! 1561: ! 1562: /* Button class name */ ! 1563: ! 1564: #define WC_BUTTON ((PSZ)0xffff0003L) ! 1565: ! 1566: ! 1567: #ifndef INCL_SAADEFS ! 1568: typedef struct _BTNCDATA { /* btncd */ ! 1569: USHORT cb; ! 1570: USHORT fsCheckState; ! 1571: USHORT fsHiliteState; ! 1572: } BTNCDATA; ! 1573: typedef BTNCDATA FAR *PBTNCDATA; ! 1574: #endif /* !INCL_SAADEFS */ ! 1575: ! 1576: /* User button structure (passed in WM_CONTROL msg) */ ! 1577: ! 1578: #ifndef INCL_SAADEFS ! 1579: typedef struct _USERBUTTON { /* ubtn */ ! 1580: HWND hwnd; ! 1581: HPS hps; ! 1582: USHORT fsState; ! 1583: USHORT fsStateOld; ! 1584: } USERBUTTON; ! 1585: typedef USERBUTTON FAR *PUSERBUTTON; ! 1586: #endif /* !INCL_SAADEFS */ ! 1587: ! 1588: /* Button control messages */ ! 1589: ! 1590: #define BM_CLICK 0x0120 ! 1591: #define BM_QUERYCHECKINDEX 0x0121 ! 1592: #define BM_QUERYHILITE 0x0122 ! 1593: #define BM_SETHILITE 0x0123 ! 1594: #define BM_QUERYCHECK 0x0124 ! 1595: #define BM_SETCHECK 0x0125 ! 1596: #define BM_SETDEFAULT 0x0126 ! 1597: ! 1598: /* Button notification codes */ ! 1599: ! 1600: #define BN_CLICKED 1 ! 1601: #define BN_DBLCLICKED 2 ! 1602: #define BN_PAINT 3 ! 1603: ! 1604: /* BN_PAINT button draw state codes (must be in high byte) */ ! 1605: ! 1606: #ifndef INCL_SAADEFS ! 1607: #define BDS_HILITED 0x0100 ! 1608: #define BDS_DISABLED 0x0200 ! 1609: #define BDS_DEFAULT 0x0400 ! 1610: ! 1611: #endif /* !INCL_SAADEFS */ ! 1612: ! 1613: #endif /* INCL_WINBUTTONS */ ! 1614: ! 1615: ! 1616: #ifdef INCL_WINENTRYFIELDS ! 1617: /**** Entryfield controls Subsection */ ! 1618: ! 1619: /* Entry field styles */ ! 1620: ! 1621: #define ES_LEFT 0x00000000L ! 1622: #define ES_CENTER 0x00000001L ! 1623: #define ES_RIGHT 0x00000002L ! 1624: ! 1625: #ifndef INCL_SAADEFS ! 1626: #define ES_AUTOSCROLL 0x00000004L ! 1627: #endif /* !INCL_SAADEFS */ ! 1628: ! 1629: #define ES_MARGIN 0x00000008L ! 1630: #define ES_AUTOTAB 0x00000010L ! 1631: #define ES_READONLY 0x00000020L ! 1632: #define ES_COMMAND 0x00000040L ! 1633: #define ES_UNREADABLE 0x00000080L ! 1634: #define ES_PICTUREMASK 0x00000100L ! 1635: #ifdef DCR_AUTOSIZE ! 1636: #define ES_AUTOSIZE 0x00000200L ! 1637: #endif ! 1638: ! 1639: #ifdef INCL_NLS ! 1640: #define ES_ANY 0x00000000L ! 1641: #define ES_SBCS 0x00001000L ! 1642: #define ES_DBCS 0x00002000L ! 1643: #define ES_MIXED 0x00003000L ! 1644: #endif /* INCL_NLS */ ! 1645: ! 1646: #define WC_COMBOBOX ((PSZ)0xffff0002L) ! 1647: ! 1648: /* ! 1649: * combo box styles ! 1650: */ ! 1651: #define CBS_SIMPLE 0x0001L ! 1652: #define CBS_DROPDOWN 0x0002L ! 1653: #define CBS_DROPDOWNLIST 0x0004L ! 1654: /* ! 1655: *The foolowing edit and listbox styles may be used in conjunction ! 1656: *with CBS_ styles ! 1657: *ES_AUTOTAB ES_ANY ES_SBCS ES_DBCS ES_MIXED LS_HORZSCROLL ! 1658: */ ! 1659: ! 1660: /* ! 1661: *IDs of combobox entry field and listbox. ! 1662: */ ! 1663: #define CBID_LIST 0x029A ! 1664: #define CBID_EDIT 0x029B ! 1665: ! 1666: #define CBM_SHOWLIST 0x0170L ! 1667: #define CBM_HILITE 0x0171L ! 1668: #define CBM_ISLISTSHOWING 0x0172L ! 1669: ! 1670: #define CBN_EFCHANGE 1 ! 1671: #define CBN_EFSCROLL 2 ! 1672: #define CBN_MEMERROR 3 ! 1673: #define CBN_LBSELECT 4 ! 1674: #define CBN_LBSCROLL 5 ! 1675: #define CBN_SHOWLIST 6 ! 1676: #define CBN_ENTER 7 ! 1677: ! 1678: #define WC_ENTRYFIELD ((PSZ)0xffff0006L) ! 1679: ! 1680: #ifndef INCL_SAADEFS ! 1681: typedef struct _ENTRYFDATA { /* efd */ ! 1682: USHORT cb; ! 1683: USHORT cchEditLimit; ! 1684: USHORT ichMinSel; ! 1685: USHORT ichMaxSel; ! 1686: } ENTRYFDATA; ! 1687: typedef ENTRYFDATA FAR *PENTRYFDATA; ! 1688: ! 1689: #endif /* !INCL_SAADEFS */ ! 1690: ! 1691: /* Entry Field messages */ ! 1692: ! 1693: #define EM_QUERYCHANGED 0x0140 ! 1694: #define EM_QUERYSEL 0x0141 ! 1695: #define EM_SETSEL 0x0142 ! 1696: #define EM_SETTEXTLIMIT 0x0143 ! 1697: ! 1698: #ifndef INCL_SAADEFS ! 1699: #define EM_CUT 0x0144 ! 1700: #define EM_COPY 0x0145 ! 1701: #endif /* !INCL_SAADEFS */ ! 1702: #define EM_CLEAR 0x0146 ! 1703: #ifndef INCL_SAADEFS ! 1704: #define EM_PASTE 0x0147 ! 1705: #endif /* !INCL_SAADEFS */ ! 1706: #define EM_QUERYFIRSTCHAR 0x0148 ! 1707: #define EM_SETFIRSTCHAR 0x0149 ! 1708: #ifndef INCL_SAADEFS ! 1709: #define EM_QUERYREADONLY 0x014a ! 1710: #define EM_SETREADONLY 0x014b ! 1711: #define EM_SETINSERTMODE 0x014c ! 1712: #endif /* !INCL_SAADEFS */ ! 1713: ! 1714: /* Entry Field notification messages */ ! 1715: ! 1716: #define EN_SETFOCUS 0x0001 ! 1717: #define EN_KILLFOCUS 0x0002 ! 1718: #define EN_CHANGE 0x0004 ! 1719: #define EN_SCROLL 0x0008 ! 1720: #ifndef INCL_SAADEFS ! 1721: #define EN_MEMERROR 0x0010 ! 1722: #define EN_OVERFLOW 0x0020 ! 1723: #define EN_INSERTMODETOGGLE 0x0040 ! 1724: #endif /* !INCL_SAADEFS */ ! 1725: ! 1726: #endif /* INCL_WINENTRYFIELDS */ ! 1727: ! 1728: ! 1729: /* Multiple Line Entrys */ ! 1730: #ifdef INCL_WINMLE ! 1731: #define WC_MLE ((PSZ)0xffff000aL) ! 1732: #include <pmmle.h> ! 1733: #endif /* !INCL_WINMLE */ ! 1734: #ifdef INCL_WINLISTBOXES ! 1735: ! 1736: /**** Listboxes */ ! 1737: ! 1738: /* List box styles */ ! 1739: ! 1740: #define LS_MULTIPLESEL 0x00000001L ! 1741: ! 1742: #ifndef INCL_SAADEFS ! 1743: #define LS_OWNERDRAW 0x00000002L ! 1744: #endif /* !INCL_SAADEFS */ ! 1745: ! 1746: #define LS_NOADJUSTPOS 0x00000004L ! 1747: #define LS_HORZSCROLL 0x00000008L ! 1748: ! 1749: #define LS_EXTENDEDSEL 0x00000010L ! 1750: ! 1751: /* Listbox class name */ ! 1752: ! 1753: #define WC_LISTBOX ((PSZ)0xffff0007L) ! 1754: ! 1755: /* List box notification messages */ ! 1756: ! 1757: #define LN_SELECT 1 ! 1758: #define LN_SETFOCUS 2 ! 1759: #define LN_KILLFOCUS 3 ! 1760: #define LN_SCROLL 4 ! 1761: #define LN_ENTER 5 ! 1762: ! 1763: /* List box messages */ ! 1764: ! 1765: #define LM_QUERYITEMCOUNT 0x0160 ! 1766: #define LM_INSERTITEM 0x0161 ! 1767: #define LM_SETTOPINDEX 0x0162 ! 1768: #define LM_DELETEITEM 0x0163 ! 1769: #define LM_SELECTITEM 0x0164 ! 1770: #define LM_QUERYSELECTION 0x0165 ! 1771: #define LM_SETITEMTEXT 0x0166 ! 1772: #define LM_QUERYITEMTEXTLENGTH 0x0167 ! 1773: #define LM_QUERYITEMTEXT 0x0168 ! 1774: ! 1775: #define LM_SETITEMHANDLE 0x0169 ! 1776: #define LM_QUERYITEMHANDLE 0x016a ! 1777: #define LM_SEARCHSTRING 0x016b ! 1778: #define LM_SETITEMHEIGHT 0x016c ! 1779: #define LM_QUERYTOPINDEX 0x016d ! 1780: #define LM_DELETEALL 0x016e ! 1781: ! 1782: /* List box constants */ ! 1783: ! 1784: #define LIT_ERROR (-3) ! 1785: #define LIT_MEMERROR (-2) ! 1786: #define LIT_NONE (-1) ! 1787: #define LIT_FIRST (-1) ! 1788: ! 1789: /* For LM_INSERTITEM msg */ ! 1790: ! 1791: #define LIT_END (-1) ! 1792: #define LIT_SORTASCENDING (-2) ! 1793: #define LIT_SORTDESCENDING (-3) ! 1794: ! 1795: /* For LM_SEARCHSTRING msg */ ! 1796: ! 1797: #define LSS_SUBSTRING 0x0001 ! 1798: #define LSS_PREFIX 0x0002 ! 1799: #define LSS_CASESENSITIVE 0x0004 ! 1800: ! 1801: ! 1802: /* Useful macros */ ! 1803: ! 1804: /*************************************************************************** ! 1805: * SHORT WinDeleteLboxItem(HWND hwndLbox, SHORT index) ! 1806: * deletes item index from the listbox. ! 1807: * returns the number of items left. ! 1808: \**************************************************************************/ ! 1809: #define WinDeleteLboxItem(hwndLbox, index) \ ! 1810: ((SHORT)WinSendMsg(hwndLbox, LM_DELETEITEM, MPFROMSHORT(index), \ ! 1811: (MPARAM)NULL)) ! 1812: ! 1813: /*************************************************************************** ! 1814: * SHORT WinInsertLboxItem(HWND hwndLbox, SHORT index, PSZ psz) ! 1815: * inserts psz into a listbox at index. Index may be an LIT_ constant. ! 1816: * returns the actual index where it was inserted. ! 1817: \**************************************************************************/ ! 1818: #define WinInsertLboxItem(hwndLbox, index, psz) \ ! 1819: ((SHORT)WinSendMsg(hwndLbox, LM_INSERTITEM, MPFROMSHORT(index), \ ! 1820: MPFROMP(psz))) ! 1821: ! 1822: /*************************************************************************** ! 1823: * SHORT WinQueryLboxCount(HWND hwndLbox) ! 1824: * returns the number of items in the listbox. ! 1825: * ! 1826: \**************************************************************************/ ! 1827: #define WinQueryLboxCount(hwndLbox) \ ! 1828: ((SHORT)WinSendMsg(hwndLbox, LM_QUERYITEMCOUNT, (MPARAM)NULL, \ ! 1829: (MPARAM)NULL)) ! 1830: ! 1831: /*************************************************************************** ! 1832: * SHORT WinQueryLboxItemText(HWND hwndLbox, SHORT index, PSZ psz, SHORT cchMax) ! 1833: * fills psz with the text if item index. ! 1834: * returns the text length copied. ! 1835: \**************************************************************************/ ! 1836: #define WinQueryLboxItemText(hwndLbox, index, psz, cchMax) \ ! 1837: ((SHORT)WinSendMsg(hwndLbox, LM_QUERYITEMTEXT, \ ! 1838: MPFROM2SHORT((index), (cchMax)), MPFROMP(psz))) ! 1839: ! 1840: /*************************************************************************** ! 1841: * SHORT WinQueryLboxItemTextLength(HWND hwndLbox, SHORT index) ! 1842: * returns the length of item index. ! 1843: * ! 1844: \**************************************************************************/ ! 1845: #define WinQueryLboxItemTextLength(hwndLbox, index) \ ! 1846: ((SHORT)WinSendMsg(hwndLbox, LM_QUERYITEMTEXTLENGTH, \ ! 1847: MPFROMSHORT(index), (MPARAM)NULL)) ! 1848: ! 1849: /*************************************************************************** ! 1850: * BOOL WinSetLboxItemText(HWND hwndLbox, SHORT index, PSZ psz) ! 1851: * sets the text of item index to psz. ! 1852: * returns fSuccess. ! 1853: \**************************************************************************/ ! 1854: #define WinSetLboxItemText(hwndLbox, index, psz) \ ! 1855: ((BOOL)WinSendMsg(hwndLbox, LM_SETITEMTEXT, \ ! 1856: MPFROMSHORT(index), MPFROMP(psz))) ! 1857: ! 1858: /*************************************************************************** ! 1859: * SHORT WinQueryLboxSelectedItem(HWND hwndLbox) ! 1860: * returns the item index selected. (for single selection only) ! 1861: * ! 1862: \**************************************************************************/ ! 1863: #define WinQueryLboxSelectedItem(handLbox) \ ! 1864: ((SHORT)WinSendMsg(hwndLbox, LM_QUERYSELECTION, MPFROMSHORT(LIT_FIRST), \ ! 1865: (MPARAM)NULL)) ! 1866: ! 1867: #endif /* INCL_WINLISTBOXES */ ! 1868: ! 1869: ! 1870: #ifdef INCL_WINMENUS ! 1871: ! 1872: /**** Menu Manager Subsection */ ! 1873: ! 1874: /* Menu control styles */ ! 1875: ! 1876: #define MS_ACTIONBAR 0x00000001L ! 1877: #define MS_TITLEBUTTON 0x00000002L ! 1878: #define MS_VERTICALFLIP 0x00000004L ! 1879: ! 1880: HWND APIENTRY WinLoadMenu(HWND hwndFrame, HMODULE hmod, USHORT idMenu); ! 1881: ! 1882: /* Menu class name */ ! 1883: ! 1884: #define WC_MENU ((PSZ)0xffff0004L) ! 1885: ! 1886: /* Menu control messages */ ! 1887: ! 1888: #define MM_INSERTITEM 0x0180 ! 1889: #define MM_DELETEITEM 0x0181 ! 1890: #define MM_QUERYITEM 0x0182 ! 1891: #define MM_SETITEM 0x0183 ! 1892: #define MM_QUERYITEMCOUNT 0x0184 ! 1893: #define MM_STARTMENUMODE 0x0185 ! 1894: #define MM_ENDMENUMODE 0x0186 ! 1895: #define MM_REMOVEITEM 0x0188 ! 1896: #define MM_SELECTITEM 0x0189 ! 1897: #define MM_QUERYSELITEMID 0x018a ! 1898: #define MM_QUERYITEMTEXT 0x018b ! 1899: #define MM_QUERYITEMTEXTLENGTH 0x018c ! 1900: #define MM_SETITEMHANDLE 0x018d ! 1901: #define MM_SETITEMTEXT 0x018e ! 1902: #define MM_ITEMPOSITIONFROMID 0x018f ! 1903: #define MM_ITEMIDFROMPOSITION 0x0190 ! 1904: #define MM_QUERYITEMATTR 0x0191 ! 1905: #define MM_SETITEMATTR 0x0192 ! 1906: #define MM_ISITEMVALID 0x0193 ! 1907: #define MM_QUERYITEMRECT 0x0194 ! 1908: ! 1909: ! 1910: HWND APIENTRY WinCreateMenu(HWND hwndParent, PVOID lpmt); ! 1911: ! 1912: /* Owner Item Structure (Also used for listboxes) */ ! 1913: ! 1914: #ifndef INCL_SAADEFS ! 1915: typedef struct _OWNERITEM { /* oi */ ! 1916: HWND hwnd; ! 1917: HPS hps; ! 1918: USHORT fsState; ! 1919: USHORT fsAttribute; ! 1920: USHORT fsStateOld; ! 1921: USHORT fsAttributeOld; ! 1922: RECTL rclItem; ! 1923: SHORT idItem; /* This field contains idItem for menus, iItem for lb. */ ! 1924: ULONG hItem; ! 1925: } OWNERITEM; ! 1926: typedef OWNERITEM FAR *POWNERITEM; ! 1927: #endif /* !INCL_SAADEFS */ ! 1928: ! 1929: /* Menu item */ ! 1930: ! 1931: typedef struct _MENUITEM { /* mi */ ! 1932: SHORT iPosition; ! 1933: USHORT afStyle; ! 1934: USHORT afAttribute; ! 1935: USHORT id; ! 1936: HWND hwndSubMenu; ! 1937: ULONG hItem; ! 1938: } MENUITEM; ! 1939: typedef MENUITEM FAR *PMENUITEM; ! 1940: ! 1941: #define MIT_END (-1) ! 1942: #define MIT_NONE (-1) ! 1943: #define MIT_MEMERROR (-1) ! 1944: #define MIT_ERROR (-1) ! 1945: #define MIT_FIRST (-2) ! 1946: #define MIT_LAST (-3) ! 1947: #define MID_NONE MIT_NONE ! 1948: #define MID_ERROR (-1) ! 1949: ! 1950: /* Menu item styles & attributes */ ! 1951: ! 1952: #define MIS_TEXT 0x0001 ! 1953: ! 1954: #ifndef INCL_SAADEFS ! 1955: #define MIS_BITMAP 0x0002 ! 1956: #endif /* !INCL_SAADEFS */ ! 1957: #define MIS_SEPARATOR 0x0004 ! 1958: ! 1959: #ifndef INCL_SAADEFS ! 1960: #define MIS_OWNERDRAW 0x0008 ! 1961: #endif /* !INCL_SAADEFS */ ! 1962: ! 1963: #define MIS_SUBMENU 0x0010 ! 1964: #define MIS_MULTMENU 0x0020 /* multiple choice submenu */ ! 1965: #define MIS_SYSCOMMAND 0x0040 ! 1966: #define MIS_HELP 0x0080 ! 1967: #define MIS_STATIC 0x0100 ! 1968: #define MIS_BUTTONSEPARATOR 0x0200 ! 1969: #define MIS_BREAK 0x0400 ! 1970: #define MIS_BREAKSEPARATOR 0x0800 ! 1971: #define MIS_GROUP 0x1000 /* multiple choice group start */ ! 1972: /* In multiple choice submenus a style of 'single' denotes the item is a ! 1973: ** radiobutton. Absence of this style defaults the item to a checkbox. */ ! 1974: #define MIS_SINGLE 0x2000 ! 1975: ! 1976: #define MIA_NODISMISS 0x0020 ! 1977: #define MIA_FRAMED 0x1000 ! 1978: #define MIA_CHECKED 0x2000 ! 1979: #define MIA_DISABLED 0x4000 ! 1980: #define MIA_HILITED 0x8000 ! 1981: ! 1982: ! 1983: BOOL APIENTRY WinPopupMenu(HWND hwndParent, HWND hwndOwner, HWND hwndMenu, ! 1984: SHORT x, SHORT y, SHORT idItem, USHORT fs); ! 1985: ! 1986: /* Values of fs in WinPopupMenu call */ ! 1987: ! 1988: #define PU_POSITIONONITEM 0x0001 /* Need SHORT idItem parameter */ ! 1989: ! 1990: #define PU_HCONSTRAIN 0x0002 /* Keep menu on left and right edge */ ! 1991: #define PU_VCONSTRAIN 0x0004 /* Keep menu on top and bottom edge */ ! 1992: ! 1993: #define PU_NONE 0x0000 /* If invoked by keyboard */ ! 1994: #define PU_MOUSEBUTTON1DOWN 0x0008 /* If invoked by button 1 */ ! 1995: #define PU_MOUSEBUTTON2DOWN 0x0010 /* If invoked by button 2 */ ! 1996: #define PU_MOUSEBUTTON3DOWN 0x0018 /* If invoked by button 3 */ ! 1997: ! 1998: #define PU_SELECTITEM 0x0020 /* Set selected item (use with kbd) */ ! 1999: ! 2000: #define PU_MOUSEBUTTON1 0x0040 /* If button1 use allowed */ ! 2001: #define PU_MOUSEBUTTON2 0x0080 /* If button2 use allowed */ ! 2002: #define PU_MOUSEBUTTON3 0x0100 /* If button3 use allowed */ ! 2003: #define PU_KEYBOARD 0x0200 /* If keyboard use allowed */ ! 2004: ! 2005: ! 2006: /* Useful macros */ ! 2007: ! 2008: /*************************************************************************** ! 2009: * BOOL WinCheckMenuItem(HWND hwndMenu, USHORT id, BOOL fcheck) ! 2010: * Sets the check state of menuitem #id to fcheck. ! 2011: * returns fSuccess. ! 2012: \**************************************************************************/ ! 2013: #define WinCheckMenuItem(hwndMenu, id, fcheck) \ ! 2014: ((BOOL)WinSendMsg(hwndMenu, MM_SETITEMATTR, \ ! 2015: MPFROM2SHORT(id, TRUE), \ ! 2016: MPFROM2SHORT(MIA_CHECKED, (BOOL)(fcheck) ? MIA_CHECKED : 0))) ! 2017: ! 2018: /*************************************************************************** ! 2019: * BOOL WinIsMenuItemChecked(HWND hwndMenu, USHORT id) ! 2020: * returns the check state of menuitem #id. ! 2021: * ! 2022: \**************************************************************************/ ! 2023: #define WinIsMenuItemChecked(hwndMenu, id) \ ! 2024: ((BOOL)WinSendMsg(hwndMenu, MM_QUERYITEMATTR, \ ! 2025: MPFROM2SHORT(id, TRUE), \ ! 2026: MPFROMSHORT(MIA_CHECKED))) ! 2027: ! 2028: /*************************************************************************** ! 2029: * BOOL WinEnableMenuItem(HWND hwndMenu, USHORT id, BOOL fenable) ! 2030: * sets the enable state of menuitem #id to fenable. ! 2031: * returns fSuccess. ! 2032: \**************************************************************************/ ! 2033: #define WinEnableMenuItem(hwndMenu, id, fEnable) \ ! 2034: ((BOOL)WinSendMsg(hwndMenu, MM_SETITEMATTR, \ ! 2035: MPFROM2SHORT(id, TRUE), \ ! 2036: MPFROM2SHORT(MIA_DISABLED, (BOOL)(fEnable) ? 0 : MIA_DISABLED))) ! 2037: ! 2038: /*************************************************************************** ! 2039: * BOOL WinIsMenuItemEnabled(HWND hwndMenu, USHORT id) ! 2040: * returns the enable state of menuitem #id. ! 2041: * ! 2042: \**************************************************************************/ ! 2043: #define WinIsMenuItemEnabled(hwndMenu, id) \ ! 2044: (!(BOOL)WinSendMsg(hwndMenu, MM_QUERYITEMATTR, \ ! 2045: MPFROM2SHORT(id, TRUE), \ ! 2046: MPFROMSHORT(MIA_DISABLED))) ! 2047: ! 2048: /*************************************************************************** ! 2049: * BOOL WinSetMenuItemText(HWND hwndMenu, USHORT id, PSZ psz) ! 2050: * sets the text of menuitem #id. ! 2051: * returns fSuccess. ! 2052: \**************************************************************************/ ! 2053: #define WinSetMenuItemText(hwndMenu, id, psz) \ ! 2054: ((BOOL)WinSendMsg(hwndMenu, MM_SETITEMTEXT, \ ! 2055: MPFROMSHORT(id), MPFROMP(psz))) ! 2056: ! 2057: /*************************************************************************** ! 2058: * BOOL WinIsMenuItemValid(HWND hwndMenu, USHORT id) ! 2059: * Returns TRUE if the specified item is a valid choice. ! 2060: \**************************************************************************/ ! 2061: #define WinIsMenuItemValid(hwndMenu, id) \ ! 2062: ((BOOL)WinSendMsg(hwndMenu, MM_ISITEMVALID, \ ! 2063: MPFROM2SHORT(id, TRUE), MPFROMSHORT(FALSE))) ! 2064: ! 2065: #endif /* INCL_WINMENUS */ ! 2066: ! 2067: ! 2068: #ifdef INCL_WINSCROLLBARS ! 2069: ! 2070: /*** Scroll Bar controls Subsection */ ! 2071: ! 2072: /* Scroll Bar styles */ ! 2073: ! 2074: #define SBS_HORZ 0L ! 2075: #define SBS_VERT 1L ! 2076: #define SBS_THUMBSIZE 2L ! 2077: #define SBS_AUTOTRACK 4L ! 2078: ! 2079: #ifdef DCR_AUTOSIZE ! 2080: #define SBS_AUTOSIZE 0x2000L ! 2081: #endif ! 2082: /* Scroll bar class name */ ! 2083: ! 2084: ! 2085: #define WC_SCROLLBAR ((PSZ)0xffff0008L) ! 2086: ! 2087: /* Scroll Bar messages */ ! 2088: ! 2089: #define SBM_SETSCROLLBAR 0x01a0 ! 2090: #define SBM_SETPOS 0x01a1 ! 2091: #define SBM_QUERYPOS 0x01a2 ! 2092: #define SBM_QUERYRANGE 0x01a3 ! 2093: #define SBM_SETTHUMBSIZE 0x01a6 ! 2094: ! 2095: /* Scroll Bar Commands */ ! 2096: ! 2097: #define SB_LINEUP 1 ! 2098: #define SB_LINEDOWN 2 ! 2099: #define SB_LINELEFT 1 ! 2100: #define SB_LINERIGHT 2 ! 2101: #define SB_PAGEUP 3 ! 2102: #define SB_PAGEDOWN 4 ! 2103: #define SB_PAGELEFT 3 ! 2104: #define SB_PAGERIGHT 4 ! 2105: #define SB_SLIDERTRACK 5 ! 2106: #define SB_SLIDERPOSITION 6 ! 2107: #define SB_ENDSCROLL 7 ! 2108: ! 2109: ! 2110: #ifndef INCL_SAADEFS ! 2111: typedef struct _SBCDATA { /* sbcd */ ! 2112: USHORT cb; ! 2113: USHORT sHilite; /* reserved, should be set to zero */ ! 2114: SHORT posFirst; ! 2115: SHORT posLast; ! 2116: SHORT posThumb; ! 2117: SHORT cVisible; ! 2118: SHORT cTotal; ! 2119: } SBCDATA; ! 2120: typedef SBCDATA FAR *PSBCDATA; ! 2121: #endif /* !INCL_SAADEFS */ ! 2122: ! 2123: #endif /* INCL_WINSCROLLBARS */ ! 2124: ! 2125: ! 2126: #if (defined(INCL_WINFRAMEMGR) || !defined(INCL_NOCOMMON)) ! 2127: /*** Frame Manager Common subsection */ ! 2128: ! 2129: #ifdef INCL_32 ! 2130: typedef struct _FRAMECDATA { /* fcdata */ ! 2131: USHORT cb; ! 2132: ULONG flCreateFlags; ! 2133: HMODULE hmodResources; ! 2134: USHORT idResources; ! 2135: } FRAMECDATA; ! 2136: typedef FRAMECDATA FAR *PFRAMECDATA; ! 2137: #else /* not INCL_32 */ ! 2138: typedef struct _FRAMECDATA { /* fcdata */ ! 2139: USHORT cb; ! 2140: ULONG flCreateFlags; ! 2141: USHORT hmodResources; ! 2142: USHORT idResources; ! 2143: } FRAMECDATA; ! 2144: typedef FRAMECDATA FAR *PFRAMECDATA; ! 2145: #endif /* INCL_32 */ ! 2146: ! 2147: /* Frame window styles */ ! 2148: ! 2149: #define FCF_TITLEBAR 0x00000001L ! 2150: #define FCF_SYSMENU 0x00000002L ! 2151: #define FCF_MENU 0x00000004L ! 2152: #define FCF_SIZEBORDER 0x00000008L ! 2153: #define FCF_MINBUTTON 0x00000010L ! 2154: #define FCF_MAXBUTTON 0x00000020L ! 2155: #define FCF_MINMAX 0x00000030L /* minmax means BOTH buttons */ ! 2156: #define FCF_VERTSCROLL 0x00000040L ! 2157: #define FCF_HORZSCROLL 0x00000080L ! 2158: #define FCF_DLGBORDER 0x00000100L ! 2159: #define FCF_BORDER 0x00000200L ! 2160: #define FCF_SHELLPOSITION 0x00000400L ! 2161: #define FCF_TASKLIST 0x00000800L ! 2162: #define FCF_NOBYTEALIGN 0x00001000L ! 2163: #define FCF_NOMOVEWITHOWNER 0x00002000L ! 2164: #define FCF_ICON 0x00004000L ! 2165: #define FCF_ACCELTABLE 0x00008000L ! 2166: #define FCF_SYSMODAL 0x00010000L ! 2167: #define FCF_SCREENALIGN 0x00020000L ! 2168: #define FCF_MOUSEALIGN 0x00040000L ! 2169: /* New values to enable multiple palettes. Note that if none of the four */ ! 2170: /* styles specified below are used then we default to the 'system' palette */ ! 2171: #define FCF_PALETTE_NORMAL 0x00080000L /* normal palette */ ! 2172: #define FCF_PALETTE_HELP 0x00100000L /* help palette */ ! 2173: #define FCF_PALETTE_POPUPODD 0x00200000L /* odd level popup palette */ ! 2174: #define FCF_PALETTE_POPUPEVEN 0x00400000L /* even level popup palette */ ! 2175: /* FCF_ 0x00800000L is reserved */ ! 2176: #ifdef INCL_NLS ! 2177: #define FCF_DBE_APPSTAT 0x80000000L ! 2178: #endif /* INCL_NLS */ ! 2179: ! 2180: /* FCF_TITLEBAR | FCF_SYSMENU | FCF_MENU | FCF_SIZEBORDER | FCF_MINMAX | ! 2181: FCF_ICON | FCF_ACCELTABLE | FCF_SHELLPOSITION | FCF_TASKLIST | FCF_PALETTE_NORMAL */ ! 2182: #define FCF_STANDARD 0x0008CC3FL ! 2183: ! 2184: ! 2185: #define FS_ICON 0x00000001L ! 2186: #define FS_ACCELTABLE 0x00000002L ! 2187: ! 2188: #ifndef INCL_SAADEFS ! 2189: #define FS_SHELLPOSITION 0x00000004L ! 2190: #endif /* !INCL_SAADEFS */ ! 2191: ! 2192: #define FS_TASKLIST 0x00000008L ! 2193: #define FS_NOBYTEALIGN 0x00000010L ! 2194: #define FS_NOMOVEWITHOWNER 0x00000020L ! 2195: #define FS_SYSMODAL 0x00000040L ! 2196: #define FS_DLGBORDER 0x00000080L ! 2197: #define FS_BORDER 0x00000100L ! 2198: #define FS_SCREENALIGN 0x00000200L ! 2199: #define FS_MOUSEALIGN 0x00000400L ! 2200: #define FS_SIZEBORDER 0x00000800L ! 2201: #ifdef INCL_NLS ! 2202: #define FS_DBE_APPSTAT 0x00008000L ! 2203: #endif /* INCL_NLS */ ! 2204: ! 2205: /* FS_ICON | FS_ACCELTABLE | FS_SHELLPOSITION | FS_TASKLIST */ ! 2206: #define FS_STANDARD 0x0000000FL ! 2207: ! 2208: ! 2209: /* Frame Window Flags accessed via WinSet/QueryWindowUShort(QWS_FLAGS) */ ! 2210: ! 2211: #ifndef INCL_SAADEFS ! 2212: #define FF_FLASHWINDOW 0x0001 ! 2213: #define FF_ACTIVE 0x0002 ! 2214: #define FF_FLASHHILITE 0x0004 ! 2215: #define FF_OWNERHIDDEN 0x0008 ! 2216: #define FF_DLGDISMISSED 0x0010 ! 2217: #define FF_OWNERDISABLED 0x0020 ! 2218: #define FF_SELECTED 0x0040 ! 2219: #define FF_NOACTIVATESWP 0x0080 ! 2220: #endif /* !INCL_SAADEFS */ ! 2221: ! 2222: ! 2223: HWND APIENTRY WinCreateStdWindow(HWND hwndParent, ULONG flStyle, ! 2224: PULONG pflCreateFlags, PSZ pszClientClass, ! 2225: PSZ pszTitle, ULONG styleClient, HMODULE hmod, ! 2226: USHORT idResources, PHWND phwndClient); ! 2227: ! 2228: ! 2229: #endif /* Frame Manager Common subsection */ ! 2230: ! 2231: ! 2232: #ifdef INCL_WINFRAMEMGR ! 2233: ! 2234: BOOL APIENTRY WinFlashWindow(HWND hwndFrame, BOOL fFlash); ! 2235: ! 2236: /* Frame window related messages */ ! 2237: ! 2238: #define WM_FLASHWINDOW 0x0040 ! 2239: #define WM_FORMATFRAME 0x0041 ! 2240: #define WM_UPDATEFRAME 0x0042 ! 2241: #define WM_FOCUSCHANGE 0x0043 ! 2242: ! 2243: #define WM_SETBORDERSIZE 0x0044 ! 2244: #define WM_TRACKFRAME 0x0045 ! 2245: #define WM_MINMAXFRAME 0x0046 ! 2246: #define WM_SETICON 0x0047 ! 2247: #define WM_QUERYICON 0x0048 ! 2248: #define WM_SETACCELTABLE 0x0049 ! 2249: #define WM_QUERYACCELTABLE 0x004a ! 2250: #define WM_TRANSLATEACCEL 0x004b ! 2251: #define WM_QUERYTRACKINFO 0x004c ! 2252: #define WM_QUERYBORDERSIZE 0x004d ! 2253: #define WM_NEXTMENU 0x004e ! 2254: #define WM_ERASEBACKGROUND 0x004f ! 2255: #define WM_QUERYFRAMEINFO 0x0050 ! 2256: #define WM_QUERYFOCUSCHAIN 0x0051 ! 2257: #define WM_OWNERPOSCHANGE 0x0052 ! 2258: #define WM_CALCFRAMERECT 0x0053 ! 2259: /* Note 0x0054 is reserved */ ! 2260: #define WM_WINDOWPOSCHANGED 0x0055 ! 2261: #define WM_ADJUSTFRAMEPOS 0x0056 ! 2262: #define WM_QUERYFRAMECTLCOUNT 0x0059 ! 2263: #ifndef INCL_SAADEFS ! 2264: /* Note 0x005A is reserved */ ! 2265: #define WM_QUERYHELPINFO 0x005B ! 2266: #define WM_SETHELPINFO 0x005C ! 2267: #define WM_ERROR 0x005D ! 2268: #define WM_REALIZEPALETTE 0x005E ! 2269: ! 2270: ! 2271: /* WM_QUERYFRAMEINFO constants */ ! 2272: ! 2273: #define FI_FRAME 0x00000001L ! 2274: #define FI_OWNERHIDE 0x00000002L ! 2275: #define FI_ACTIVATEOK 0x00000004L ! 2276: #define FI_NOMOVEWITHOWNER 0x00000008L ! 2277: ! 2278: ! 2279: #endif /* !INCL_SAADEFS */ ! 2280: ! 2281: /* Frame class name */ ! 2282: ! 2283: #define WC_FRAME ((PSZ)0xffff0001L) ! 2284: ! 2285: BOOL APIENTRY WinCreateFrameControls(HWND hwndFrame, PFRAMECDATA pfcdata, ! 2286: PSZ pszTitle); ! 2287: ! 2288: BOOL APIENTRY WinCalcFrameRect(HWND hwndFrame, PRECTL prcl, BOOL fClient); ! 2289: ! 2290: BOOL APIENTRY WinGetMinPosition(HWND hwnd, PSWP pswp, PPOINTL pptl); ! 2291: #ifndef INCL_SAADEFS ! 2292: BOOL APIENTRY WinGetMaxPosition(HWND hwnd, PSWP pswp); ! 2293: #endif /* !INCL_SAADEFS */ ! 2294: ! 2295: typedef LHANDLE HSAVEWP; /* hsvwp */ ! 2296: ! 2297: BOOL APIENTRY WinSaveWindowPos(HSAVEWP hsvwp, PSWP pswp, USHORT cswp); ! 2298: ! 2299: /* Frame control IDs */ ! 2300: ! 2301: #define FID_SYSMENU 0x8002 ! 2302: #define FID_TITLEBAR 0x8003 ! 2303: #define FID_MINMAX 0x8004 ! 2304: #define FID_MENU 0x8005 ! 2305: #define FID_VERTSCROLL 0x8006 ! 2306: #define FID_HORZSCROLL 0x8007 ! 2307: #define FID_CLIENT 0x8008 ! 2308: /* Note 0x8009 is reserved */ ! 2309: #define FID_DBE_APPSTAT 0x8010 ! 2310: #define FID_DBE_KBDSTAT 0x8011 ! 2311: #define FID_DBE_PECIC 0x8012 ! 2312: #define FID_DBE_KKPOPUP 0x8013 ! 2313: ! 2314: /* Standard WM_SYSCOMMAND command values */ ! 2315: ! 2316: #define SC_SIZE 0x8000 ! 2317: #define SC_MOVE 0x8001 ! 2318: #define SC_MINIMIZE 0x8002 ! 2319: #define SC_MAXIMIZE 0x8003 ! 2320: #define SC_CLOSE 0x8004 ! 2321: #define SC_NEXT 0x8005 ! 2322: #define SC_APPMENU 0x8006 ! 2323: #define SC_SYSMENU 0x8007 ! 2324: #define SC_RESTORE 0x8008 ! 2325: #define SC_NEXTFRAME 0x8009 ! 2326: #define SC_NEXTWINDOW 0x8010 ! 2327: #ifndef INCL_SAADEFS ! 2328: #define SC_TASKMANAGER 0x8011 ! 2329: #define SC_HELPKEYS 0x8012 ! 2330: #define SC_HELPINDEX 0x8013 ! 2331: #define SC_HELPEXTENDED 0x8014 ! 2332: #define SC_SWITCHPANELIDS 0x8015 ! 2333: #define SC_DBE_FIRST 0x8018 ! 2334: #define SC_DBE_LAST 0x801F ! 2335: ! 2336: #endif /* !INCL_SAADEFS */ ! 2337: ! 2338: #endif /* INCL_WINFRAMEMGR */ ! 2339: ! 2340: /*** Frame controls */ ! 2341: ! 2342: #ifdef INCL_WINFRAMECTLS ! 2343: ! 2344: /** Title bar controls */ ! 2345: ! 2346: /* Title bar control class name */ ! 2347: ! 2348: #define WC_TITLEBAR ((PSZ)0xffff0009L) ! 2349: ! 2350: /* Title bar control messages */ ! 2351: ! 2352: #define TBM_SETHILITE 0x01e3 ! 2353: #define TBM_QUERYHILITE 0x01e4 ! 2354: ! 2355: /* XLATOFF */ ! 2356: #ifdef INCL_16 ! 2357: ! 2358: #define TBM_TRACKMOVE 0x01e5 ! 2359: ! 2360: #endif /* INCL_16 */ ! 2361: /* XLATON */ ! 2362: ! 2363: #endif /* INCL_WINFRAMECTLS */ ! 2364: ! 2365: #ifdef INCL_WINRECTANGLES ! 2366: /*** Rectangle routines */ ! 2367: ! 2368: BOOL APIENTRY WinCopyRect(HAB hab, PRECTL prclDst, PRECTL prclSrc); ! 2369: ! 2370: #ifndef INCL_SAADEFS ! 2371: BOOL APIENTRY WinSetRect(HAB hab, PRECTL prcl, SHORT xLeft, SHORT yBottom, ! 2372: SHORT xRight, SHORT yTop); ! 2373: BOOL APIENTRY WinIsRectEmpty(HAB hab, PRECTL prcl); ! 2374: BOOL APIENTRY WinEqualRect(HAB hab, PRECTL prcl1, PRECTL prcl2); ! 2375: BOOL APIENTRY WinSetRectEmpty(HAB hab, PRECTL prcl); ! 2376: BOOL APIENTRY WinOffsetRect(HAB hab, PRECTL prcl, SHORT cx, SHORT cy); ! 2377: BOOL APIENTRY WinInflateRect(HAB hab, PRECTL prcl, SHORT cx, SHORT cy); ! 2378: BOOL APIENTRY WinPtInRect(HAB hab, PRECTL prcl, PPOINTL pptl); ! 2379: BOOL APIENTRY WinIntersectRect(HAB hab, PRECTL prclDst, PRECTL prclSrc1, ! 2380: PRECTL prclSrc2); ! 2381: BOOL APIENTRY WinUnionRect(HAB hab, PRECTL prclDst, PRECTL prclSrc1, ! 2382: PRECTL prclSrc2); ! 2383: BOOL APIENTRY WinSubtractRect(HAB hab, PRECTL prclDst, PRECTL prclSrc1, ! 2384: PRECTL prclSrc2); ! 2385: BOOL APIENTRY WinMakeRect(HAB hab, PWRECT pwrc); ! 2386: BOOL APIENTRY WinMakePoints(HAB hab, PWPOINT pwpt, USHORT cwpt); ! 2387: #endif /* !INCL_SAADEFS */ ! 2388: ! 2389: #endif /* INCL_WINRECTANGLES */ ! 2390: ! 2391: ! 2392: #ifdef INCL_WINSYS ! 2393: ! 2394: /*** System values */ ! 2395: ! 2396: LONG APIENTRY WinQuerySysValue(HWND hwndDesktop, SHORT iSysValue); ! 2397: BOOL APIENTRY WinSetSysValue(HWND hwndDesktop, SHORT iSysValue, LONG lValue); ! 2398: ! 2399: #define SV_SWAPBUTTON 0 ! 2400: #define SV_DBLCLKTIME 1 ! 2401: #define SV_CXDBLCLK 2 ! 2402: #define SV_CYDBLCLK 3 ! 2403: #define SV_CXSIZEBORDER 4 ! 2404: #define SV_CYSIZEBORDER 5 ! 2405: #define SV_ALARM 6 ! 2406: ! 2407: #ifndef INCL_SAADEFS ! 2408: #define SV_RESERVEDFIRST1 7 ! 2409: #define SV_RESERVEDLAST1 8 ! 2410: #endif /* !INCL_SAADEFS */ ! 2411: ! 2412: #define SV_CURSORRATE 9 ! 2413: #define SV_FIRSTSCROLLRATE 10 ! 2414: #define SV_SCROLLRATE 11 ! 2415: #define SV_NUMBEREDLISTS 12 ! 2416: #define SV_WARNINGFREQ 13 ! 2417: #define SV_NOTEFREQ 14 ! 2418: #define SV_ERRORFREQ 15 ! 2419: #define SV_WARNINGDURATION 16 ! 2420: #define SV_NOTEDURATION 17 ! 2421: #define SV_ERRORDURATION 18 ! 2422: ! 2423: #ifndef INCL_SAADEFS ! 2424: #define SV_RESERVEDFIRST 19 ! 2425: #define SV_RESERVEDLAST 19 ! 2426: #endif /* !INCL_SAADEFS */ ! 2427: ! 2428: #define SV_CXSCREEN 20 ! 2429: #define SV_CYSCREEN 21 ! 2430: #define SV_CXVSCROLL 22 ! 2431: #define SV_CYHSCROLL 23 ! 2432: #define SV_CYVSCROLLARROW 24 ! 2433: #define SV_CXHSCROLLARROW 25 ! 2434: #define SV_CXBORDER 26 ! 2435: #define SV_CYBORDER 27 ! 2436: #define SV_CXDLGFRAME 28 ! 2437: #define SV_CYDLGFRAME 29 ! 2438: #define SV_CYTITLEBAR 30 ! 2439: #define SV_CYVSLIDER 31 ! 2440: #define SV_CXHSLIDER 32 ! 2441: #define SV_CXMINMAXBUTTON 33 ! 2442: #define SV_CYMINMAXBUTTON 34 ! 2443: #define SV_CYMENU 35 ! 2444: #define SV_CXFULLSCREEN 36 ! 2445: #define SV_CYFULLSCREEN 37 ! 2446: #define SV_CXICON 38 ! 2447: #define SV_CYICON 39 ! 2448: #define SV_CXPOINTER 40 ! 2449: #define SV_CYPOINTER 41 ! 2450: ! 2451: #define SV_DEBUG 42 ! 2452: #define SV_CMOUSEBUTTONS 43 ! 2453: #define SV_CPOINTERBUTTONS 43 /*@FAR*/ ! 2454: #define SV_POINTERLEVEL 44 ! 2455: #define SV_CURSORLEVEL 45 ! 2456: #define SV_TRACKRECTLEVEL 46 ! 2457: ! 2458: #ifndef INCL_SAADEFS ! 2459: #define SV_CTIMERS 47 ! 2460: #endif /* !INCL_SAADEFS */ ! 2461: ! 2462: #define SV_MOUSEPRESENT 48 ! 2463: ! 2464: #define SV_CXBYTEALIGN 49 ! 2465: #define SV_CXALIGN 49 /*@FAR*/ ! 2466: #define SV_CYBYTEALIGN 50 ! 2467: #define SV_CYALIGN 50 /*@FAR*/ ! 2468: ! 2469: /* The following value enables any greater value to be set by WinSetSysVlaue. */ ! 2470: /* Values of 51-55 are spare for extra non-settable system values */ ! 2471: /* This is to enable the setting of SV_EXTRAKEYBEEP by applications. */ ! 2472: ! 2473: #define SV_NOTRESERVED 56 ! 2474: #define SV_EXTRAKEYBEEP 57 ! 2475: ! 2476: /* The following system value controls whether PM controls the keyboard */ ! 2477: /* lights for light key keystrokes (else applications will) */ ! 2478: #define SV_SETLIGHTS 58 ! 2479: #define SV_INSERTMODE 59 ! 2480: ! 2481: ! 2482: #define SV_MENUROLLDOWNDELAY 64 ! 2483: #define SV_MENUROLLUPDELAY 65 ! 2484: #define SV_ALTMNEMONIC 66 ! 2485: #define SV_TASKLISTMOUSEACCESS 67 ! 2486: ! 2487: #define SV_CCHICONTEXTWIDTH 68 ! 2488: #define SV_CICONTEXTLINES 69 ! 2489: ! 2490: /* The following is the total number of system values */ ! 2491: #define SV_CSYSVALUES 70 ! 2492: ! 2493: /* ! 2494: * Presentation parameter structures. ! 2495: */ ! 2496: typedef struct _PARAM { /* param */ ! 2497: ULONG id; ! 2498: ULONG cb; ! 2499: BYTE ab[1]; ! 2500: } PARAM; ! 2501: typedef PARAM NEAR *NPPARAM; ! 2502: typedef PARAM FAR *PPARAM; ! 2503: ! 2504: typedef struct _PRESPARAMS { /* pres */ ! 2505: ULONG cb; ! 2506: PARAM aparam[1]; ! 2507: } PRESPARAMS; ! 2508: typedef PRESPARAMS NEAR *NPPRESPARAMS; ! 2509: typedef PRESPARAMS FAR *PPRESPARAMS; ! 2510: ! 2511: ! 2512: /* ! 2513: * Presentation parameter APIs ! 2514: */ ! 2515: BOOL APIENTRY WinSetPresParam(HWND hwnd, ULONG id, ULONG cbParam, PVOID pbParam); ! 2516: ULONG APIENTRY WinQueryPresParam(HWND hwnd, ULONG id1, ULONG id2, PULONG pulId, ! 2517: ULONG cbBuf, PVOID pbBuf, USHORT fs); ! 2518: BOOL APIENTRY WinRemovePresParam(HWND hwnd, ULONG id); ! 2519: ! 2520: /* ! 2521: * Presentation parameter types. ! 2522: */ ! 2523: ! 2524: #define PP_FOREGROUNDCOLOR 1L ! 2525: #define PP_FOREGROUNDCOLORINDEX 2L ! 2526: #define PP_BACKGROUNDCOLOR 3L ! 2527: #define PP_BACKGROUNDCOLORINDEX 4L ! 2528: #define PP_HILITEFOREGROUNDCOLOR 5L ! 2529: #define PP_HILITEFOREGROUNDCOLORINDEX 6L ! 2530: #define PP_HILITEBACKGROUNDCOLOR 7L ! 2531: #define PP_HILITEBACKGROUNDCOLORINDEX 8L ! 2532: #define PP_DISABLEDFOREGROUNDCOLOR 9L ! 2533: #define PP_DISABLEDFOREGROUNDCOLORINDEX 10L ! 2534: #define PP_DISABLEDBACKGROUNDCOLOR 11L ! 2535: #define PP_DISABLEDBACKGROUNDCOLORINDEX 12L ! 2536: #define PP_BORDERCOLOR 13L ! 2537: #define PP_BORDERCOLORINDEX 14L ! 2538: #define PP_FONTNAMESIZE 15L ! 2539: #define PP_FONTHANDLE 16L ! 2540: #define PP_RESERVED 17L ! 2541: #define PP_ACTIVECOLOR 18L ! 2542: #define PP_ACTIVECOLORINDEX 19L ! 2543: #define PP_INACTIVECOLOR 20L ! 2544: #define PP_INACTIVECOLORINDEX 21L ! 2545: #define PP_ACTIVETEXTFGNDCOLOR 22L ! 2546: #define PP_ACTIVETEXTFGNDCOLORINDEX 23L ! 2547: #define PP_ACTIVETEXTBGNDCOLOR 24L ! 2548: #define PP_ACTIVETEXTBGNDCOLORINDEX 25L ! 2549: #define PP_INACTIVETEXTFGNDCOLOR 26L ! 2550: #define PP_INACTIVETEXTFGNDCOLORINDEX 27L ! 2551: #define PP_INACTIVETEXTBGNDCOLOR 28L ! 2552: #define PP_INACTIVETEXTBGNDCOLORINDEX 29L ! 2553: #define PP_SHADOW 30L ! 2554: ! 2555: #define PP_USER 0x8000L ! 2556: ! 2557: /* ! 2558: * Flags for WinQueryPresParams() ! 2559: */ ! 2560: #define QPF_NOINHERIT 0x0001 /* Don't inherit */ ! 2561: #define QPF_ID1COLORINDEX 0x0002 /* Convert id1 color index into RGB */ ! 2562: #define QPF_ID2COLORINDEX 0x0004 /* Convert id2 color index into RGB */ ! 2563: #define QPF_PURERGBCOLOR 0x0008 /* Return pure RGB colors */ ! 2564: #define QPF_VALIDFLAGS 0x000F /* Valid WinQueryPresParams() flags. */ ! 2565: ! 2566: /*** System color functions */ ! 2567: ! 2568: LONG APIENTRY WinQuerySysColor(HWND hwndDesktop, LONG clr, LONG lReserved); ! 2569: BOOL APIENTRY WinSetSysColors(HWND hwndDesktop, ULONG flOptions, ! 2570: ULONG flFormat, LONG clrFirst, ULONG cclr, ! 2571: PLONG pclr); ! 2572: #define SYSCLR_BUTTONLIGHT (-41L) ! 2573: #define SYSCLR_BUTTONMIDDLE (-40L) ! 2574: #define SYSCLR_BUTTONDARK (-39L) ! 2575: #define SYSCLR_BUTTONDEFAULT (-38L) ! 2576: #define SYSCLR_TITLEBOTTOM (-37L) ! 2577: #define SYSCLR_SHADOW (-36L) ! 2578: #define SYSCLR_ICONTEXT (-35L) ! 2579: #define SYSCLR_DIALOGBACKGROUND (-34L) ! 2580: #define SYSCLR_HILITEFOREGROUND (-33L) ! 2581: #define SYSCLR_HILITEBACKGROUND (-32L) ! 2582: #define SYSCLR_INACTIVETITLETEXTBGND (-31L) ! 2583: #define SYSCLR_ACTIVETITLETEXTBGND (-30L) ! 2584: #define SYSCLR_INACTIVETITLETEXT (-29L) ! 2585: #define SYSCLR_ACTIVETITLETEXT (-28L) ! 2586: #define SYSCLR_OUTPUTTEXT (-27L) ! 2587: #define SYSCLR_WINDOWSTATICTEXT (-26L) ! 2588: #define SYSCLR_SCROLLBAR (-25L) ! 2589: #define SYSCLR_BACKGROUND (-24L) ! 2590: #define SYSCLR_ACTIVETITLE (-23L) ! 2591: #define SYSCLR_INACTIVETITLE (-22L) ! 2592: #define SYSCLR_MENU (-21L) ! 2593: #define SYSCLR_WINDOW (-20L) ! 2594: #define SYSCLR_WINDOWFRAME (-19L) ! 2595: #define SYSCLR_MENUTEXT (-18L) ! 2596: #define SYSCLR_WINDOWTEXT (-17L) ! 2597: #define SYSCLR_TITLETEXT (-16L) ! 2598: #define SYSCLR_ACTIVEBORDER (-15L) ! 2599: #define SYSCLR_INACTIVEBORDER (-14L) ! 2600: #define SYSCLR_APPWORKSPACE (-13L) ! 2601: #define SYSCLR_HELPBACKGROUND (-12L) ! 2602: #define SYSCLR_HELPTEXT (-11L) ! 2603: #define SYSCLR_HELPHILITE (-10L) ! 2604: ! 2605: #define SYSCLR_CSYSCOLORS 32L ! 2606: ! 2607: #endif /* INCL_WINSYS */ ! 2608: ! 2609: ! 2610: #ifdef INCL_WINTIMER ! 2611: /**** Timer manager */ ! 2612: ! 2613: #ifndef INCL_SAADEFS ! 2614: ! 2615: #ifdef INCL_32 ! 2616: ! 2617: USHORT APIENTRY WinStartTimer(HAB hab, HWND hwnd, USHORT idTimer, ! 2618: ULONG dtTimeout); ! 2619: ! 2620: #else /* not INCL_32 */ ! 2621: ! 2622: USHORT APIENTRY WinStartTimer(HAB hab, HWND hwnd, USHORT idTimer, ! 2623: USHORT dtTimeout); ! 2624: ! 2625: #endif /* INCL_32 */ ! 2626: ! 2627: BOOL APIENTRY WinStopTimer(HAB hab, HWND hwnd, USHORT idTimer); ! 2628: ULONG APIENTRY WinGetCurrentTime(HAB hab); ! 2629: ! 2630: #define TID_CURSOR 0xffff /* Reserved cursor timer ID */ ! 2631: #define TID_SCROLL 0xfffe /* Reserved scrolling timer ID */ ! 2632: #define TID_FLASHWINDOW 0xfffd /* Reserved for window flashing timer ID */ ! 2633: #define TID_USERMAX 0x7fff /* Maximum user timer ID */ ! 2634: #endif /* !INCL_SAADEFS */ ! 2635: ! 2636: #endif /* INCL_WINTIMER */ ! 2637: ! 2638: ! 2639: #ifdef INCL_WINACCELERATORS ! 2640: /**** Accelerator functions */ ! 2641: ! 2642: /* ACCEL fs bits ! 2643: * ! 2644: * NOTE: the first six AF_ code bits have the same value ! 2645: * as their KC_ counterparts ! 2646: */ ! 2647: #ifndef INCL_SAADEFS ! 2648: #define AF_CHAR 0x0001 ! 2649: #define AF_VIRTUALKEY 0x0002 ! 2650: #define AF_SCANCODE 0x0004 ! 2651: #define AF_SHIFT 0x0008 ! 2652: #define AF_CONTROL 0x0010 ! 2653: #define AF_ALT 0x0020 ! 2654: #define AF_LONEKEY 0x0040 ! 2655: #define AF_SYSCOMMAND 0x0100 ! 2656: #define AF_HELP 0x0200 ! 2657: #endif /* !INCL_SAADEFS */ /* @FAR */ ! 2658: ! 2659: typedef LHANDLE HACCEL; /* haccel */ ! 2660: ! 2661: typedef struct _ACCEL { /* acc */ ! 2662: USHORT fs; ! 2663: USHORT key; ! 2664: USHORT cmd; ! 2665: } ACCEL; ! 2666: typedef ACCEL FAR *PACCEL; ! 2667: ! 2668: typedef struct _ACCELTABLE { /* acct */ ! 2669: USHORT cAccel; ! 2670: USHORT codepage; ! 2671: ACCEL aaccel[1]; ! 2672: } ACCELTABLE; ! 2673: typedef ACCELTABLE FAR *PACCELTABLE; ! 2674: ! 2675: HACCEL APIENTRY WinLoadAccelTable(HAB hab, HMODULE hmod, USHORT idAccelTable); ! 2676: HACCEL APIENTRY WinCreateAccelTable(HAB hab, PACCELTABLE pAccelTable); ! 2677: BOOL APIENTRY WinDestroyAccelTable(HACCEL haccel); ! 2678: USHORT APIENTRY WinCopyAccelTable(HACCEL haccel, PACCELTABLE pAccelTable, ! 2679: USHORT cbCopyMax); ! 2680: BOOL APIENTRY WinTranslateAccel(HAB hab, HWND hwnd, HACCEL haccel, ! 2681: PQMSG pqmsg); ! 2682: BOOL APIENTRY WinSetAccelTable(HAB hab, HACCEL haccel, HWND hwndFrame); ! 2683: HACCEL APIENTRY WinQueryAccelTable(HAB hab, HWND hwndFrame); ! 2684: ! 2685: #endif /* INCL_WINACCELERATORS */ ! 2686: ! 2687: /**** Extended Attribute Flags (Association Table) */ ! 2688: ! 2689: #define EAF_DEFAULTOWNER 0x0001 ! 2690: #define EAF_UNCHANGEABLE 0x0002 ! 2691: #define EAF_REUSEICON 0x0004 ! 2692: ! 2693: /*** WinTrackRect() information */ ! 2694: ! 2695: #ifdef INCL_WINTRACKRECT ! 2696: ! 2697: /* WinTrackRect() tracking information structure */ ! 2698: ! 2699: typedef struct _TRACKINFO { /* ti */ ! 2700: SHORT cxBorder; ! 2701: SHORT cyBorder; ! 2702: SHORT cxGrid; ! 2703: SHORT cyGrid; ! 2704: SHORT cxKeyboard; ! 2705: SHORT cyKeyboard; ! 2706: RECTL rclTrack; ! 2707: RECTL rclBoundary; ! 2708: POINTL ptlMinTrackSize; ! 2709: POINTL ptlMaxTrackSize; ! 2710: USHORT fs; ! 2711: } TRACKINFO; ! 2712: typedef TRACKINFO FAR *PTRACKINFO; ! 2713: ! 2714: #ifndef INCL_SAADEFS ! 2715: BOOL APIENTRY WinTrackRect(HWND hwnd, HPS hps, PTRACKINFO pti); ! 2716: BOOL APIENTRY WinShowTrackRect(HWND hwnd, BOOL fShow); ! 2717: ! 2718: /* WinTrackRect() flags */ ! 2719: ! 2720: #define TF_LEFT 0x0001 ! 2721: #define TF_TOP 0x0002 ! 2722: #define TF_RIGHT 0x0004 ! 2723: #define TF_BOTTOM 0x0008 ! 2724: /* TF_MOVE = TF_LEFT | TF_TOP | TF_RIGHT | TF_BOTTOM */ ! 2725: #define TF_MOVE 0x000F ! 2726: ! 2727: #define TF_SETPOINTERPOS 0x0010 ! 2728: #define TF_GRID 0x0020 ! 2729: #define TF_STANDARD 0x0040 ! 2730: #define TF_ALLINBOUNDARY 0x0080 ! 2731: #define TF_VALIDATETRACKRECT 0x0100 ! 2732: #define TF_PARTINBOUNDARY 0x0200 ! 2733: ! 2734: #endif /* !INCL_SAADEFS */ ! 2735: ! 2736: #endif /* INCL_WINTRACKRECT */ ! 2737: ! 2738: ! 2739: /**** Clipboard Manager */ ! 2740: ! 2741: #if (defined(INCL_WINCLIPBOARD) || defined(INCL_WINDDE)) ! 2742: #ifndef INCL_SAADEFS ! 2743: ! 2744: /* Clipboard messages */ ! 2745: ! 2746: #define WM_RENDERFMT 0x0060 ! 2747: #define WM_RENDERALLFMTS 0x0061 ! 2748: #define WM_DESTROYCLIPBOARD 0x0062 ! 2749: #define WM_PAINTCLIPBOARD 0x0063 ! 2750: #define WM_SIZECLIPBOARD 0x0064 ! 2751: #define WM_HSCROLLCLIPBOARD 0x0065 ! 2752: #define WM_VSCROLLCLIPBOARD 0x0066 ! 2753: #define WM_DRAWCLIPBOARD 0x0067 ! 2754: ! 2755: /* ! 2756: * Standard Clipboard formats ! 2757: */ ! 2758: #define CF_TEXT 1 ! 2759: #define CF_BITMAP 2 ! 2760: #define CF_DSPTEXT 3 ! 2761: #define CF_DSPBITMAP 4 ! 2762: #define CF_METAFILE 5 ! 2763: #define CF_DSPMETAFILE 6 ! 2764: /* ! 2765: * standard DDE and clipboard format stings ! 2766: */ ! 2767: #define SZFMT_TEXT "#1" ! 2768: #define SZFMT_BITMAP "#2" ! 2769: #define SZFMT_DSPTEXT "#3" ! 2770: #define SZFMT_DSPBITMAP "#4" ! 2771: #define SZFMT_METAFILE "#5" ! 2772: #define SZFMT_DSPMETAFILE "#6" ! 2773: #define SZFMT_SYLK "Sylk" ! 2774: #define SZFMT_DIF "Dif" ! 2775: #define SZFMT_TIFF "Tiff" ! 2776: #define SZFMT_OEMTEXT "OemText" ! 2777: #define SZFMT_DIB "Dib" ! 2778: #define SZFMT_OWNERDISPLAY "OwnerDisplay" ! 2779: #define SZFMT_LINK "Link" ! 2780: #define SZFMT_METAFILEPICT "MetaFilePict" ! 2781: #define SZFMT_DSPMETAFILEPICT "DspMetaFilePict" ! 2782: #define SZFMT_CPTEXT "Codepage Text" ! 2783: #define SZFMT_PALETTE "Palette" ! 2784: #define SZDDEFMT_RTF "Rich Text Format" ! 2785: #define SZDDEFMT_PTRPICT "Printer_Picture" ! 2786: ! 2787: typedef struct _MFP { /* mfp */ ! 2788: POINTL sizeBounds; /* metafile notional grid size */ ! 2789: POINTL sizeMM; /* metafile size high metric units */ ! 2790: ULONG cbLength; /* length of metafile data */ ! 2791: USHORT mapMode; /* a PM metaflie map mode */ ! 2792: USHORT reserved; ! 2793: BYTE abData[1]; /* metafile Data */ ! 2794: } MFP; ! 2795: typedef MFP FAR *PMFP; ! 2796: ! 2797: typedef struct _CPTEXT { /* cptxt */ ! 2798: USHORT idCountry; ! 2799: USHORT usCodepage; ! 2800: USHORT usLangID; ! 2801: USHORT usSubLangID; ! 2802: BYTE abText[1]; /* text string starts here */ ! 2803: } CPTEXT; ! 2804: typedef CPTEXT FAR *PCPTEXT; ! 2805: ! 2806: #endif /* not INCL_SAADEFS */ ! 2807: #endif /* INCL_WINCLIPBOARD | INCL_WINDDE */ ! 2808: ! 2809: #ifdef INCL_WINCLIPBOARD ! 2810: #ifndef INCL_SAADEFS ! 2811: BOOL APIENTRY WinSetClipbrdOwner(HAB hab, HWND hwnd); ! 2812: BOOL APIENTRY WinSetClipbrdData(HAB hab, ULONG ulData, USHORT fmt, USHORT rgfFmtInfo); ! 2813: ULONG APIENTRY WinQueryClipbrdData(HAB hab, USHORT fmt); ! 2814: BOOL APIENTRY WinQueryClipbrdFmtInfo(HAB hab, USHORT fmt, ! 2815: PUSHORT prgfFmtInfo); ! 2816: BOOL APIENTRY WinSetClipbrdViewer(HAB hab, HWND hwndNewClipViewer); ! 2817: ! 2818: /* WinSetClipbrdData() flags */ ! 2819: ! 2820: #define CFI_OWNERFREE 0x0001 ! 2821: #define CFI_OWNERDISPLAY 0x0002 ! 2822: #ifdef INCL_32 ! 2823: #define CFI_POINTER 0x0400 ! 2824: #else ! 2825: #define CFI_SELECTOR 0x0100 ! 2826: #endif ! 2827: #define CFI_HANDLE 0x0200 ! 2828: ! 2829: #endif /* !INCL_SAADEFS */ ! 2830: ! 2831: USHORT APIENTRY WinEnumClipbrdFmts(HAB hab, USHORT fmt); ! 2832: BOOL APIENTRY WinEmptyClipbrd(HAB hab); ! 2833: BOOL APIENTRY WinOpenClipbrd(HAB hab); ! 2834: BOOL APIENTRY WinCloseClipbrd(HAB hab); ! 2835: HWND APIENTRY WinQueryClipbrdOwner(HAB hab, BOOL fLock); ! 2836: HWND APIENTRY WinQueryClipbrdViewer(HAB hab, BOOL fLock); ! 2837: ! 2838: #endif /* INCL_WINCLIPBOARD */ ! 2839: ! 2840: ! 2841: #if (defined(INCL_WINCURSORS) || !defined(INCL_NOCOMMON)) ! 2842: /**** Cursor manager common subsection */ ! 2843: ! 2844: BOOL APIENTRY WinDestroyCursor(HWND hwnd); ! 2845: BOOL APIENTRY WinShowCursor(HWND hwnd, BOOL fShow); ! 2846: BOOL APIENTRY WinCreateCursor(HWND hwnd, SHORT x, SHORT y, SHORT cx, SHORT cy, ! 2847: USHORT fs, PRECTL prclClip); ! 2848: ! 2849: /* WinCreateCursor() flags */ ! 2850: ! 2851: #define CURSOR_SOLID 0x0000 ! 2852: #define CURSOR_HALFTONE 0x0001 ! 2853: #define CURSOR_FRAME 0x0002 ! 2854: #define CURSOR_FLASH 0x0004 ! 2855: #define CURSOR_SETPOS 0x8000 ! 2856: ! 2857: ! 2858: #endif /* Cursor manager common subsection */ ! 2859: ! 2860: #ifdef INCL_WINCURSORS ! 2861: ! 2862: typedef struct _CURSORINFO { /* csri */ ! 2863: HWND hwnd; ! 2864: SHORT x; ! 2865: SHORT y; ! 2866: SHORT cx; ! 2867: SHORT cy; ! 2868: USHORT fs; ! 2869: RECTL rclClip; ! 2870: } CURSORINFO; ! 2871: typedef CURSORINFO FAR *PCURSORINFO; ! 2872: ! 2873: BOOL APIENTRY WinQueryCursorInfo(HWND hwndDesktop, PCURSORINFO pCursorInfo); ! 2874: ! 2875: #endif /* INCL_WINCURSORS */ ! 2876: ! 2877: typedef LHANDLE HPOINTER; /* hptr */ ! 2878: ! 2879: #ifdef INCL_WINPOINTERS ! 2880: /**** Pointer manager */ ! 2881: ! 2882: BOOL APIENTRY WinSetPointer(HWND hwndDesktop, HPOINTER hptrNew); ! 2883: BOOL APIENTRY WinShowPointer(HWND hwndDesktop, BOOL fShow); ! 2884: HPOINTER APIENTRY WinQuerySysPointer(HWND hwndDesktop, SHORT iptr, BOOL fLoad); ! 2885: ! 2886: ! 2887: /* System pointers (NOTE: these are 1-based) */ ! 2888: ! 2889: #ifdef LATER ! 2890: ! 2891: #define SPTR_ARROW 1 ! 2892: #define SPTR_TEXT 2 ! 2893: #define SPTR_WAIT 3 ! 2894: #define SPTR_MOVE 4 ! 2895: #define SPTR_SIZENWSE 5 ! 2896: #define SPTR_SIZENESW 6 ! 2897: #define SPTR_SIZEWE 7 ! 2898: #define SPTR_SIZENS 8 ! 2899: #define SPTR_APPICON 9 ! 2900: ! 2901: #define SPTR_ICONINFORMATION 10 ! 2902: #define SPTR_ICONQUESTION 11 ! 2903: #define SPTR_ICONERROR 12 ! 2904: #define SPTR_ICONWARNING 13 ! 2905: ! 2906: #define SPTR_CPTR 13 /* Count of pointers loaded by PMWIN */ ! 2907: ! 2908: #define SPTR_ILLEGAL 14 ! 2909: #define SPTR_FILE 15 ! 2910: #define SPTR_FOLDER 16 ! 2911: #define SPTR_MULTFILE 17 ! 2912: #define SPTR_PROGRAM 18 ! 2913: ! 2914: #else ! 2915: ! 2916: #define SPTR_ARROW 1 ! 2917: #define SPTR_TEXT 2 ! 2918: #define SPTR_WAIT 3 ! 2919: #define SPTR_SIZE 4 ! 2920: #define SPTR_MOVE 5 ! 2921: #define SPTR_SIZENWSE 6 ! 2922: #define SPTR_SIZENESW 7 ! 2923: #define SPTR_SIZEWE 8 ! 2924: #define SPTR_SIZENS 9 ! 2925: #define SPTR_APPICON 10 ! 2926: #define SPTR_ICONINFORMATION 11 ! 2927: #define SPTR_ICONQUESTION 12 ! 2928: #define SPTR_ICONERROR 13 ! 2929: #define SPTR_ICONWARNING 14 ! 2930: #define SPTR_CPTR 14 /* count loaded by pmwin */ ! 2931: ! 2932: #define SPTR_ILLEGAL 18 ! 2933: #define SPTR_FILE 19 ! 2934: #define SPTR_FOLDER 20 ! 2935: #define SPTR_MULTFILE 21 ! 2936: #define SPTR_PROGRAM 22 ! 2937: ! 2938: /* backward compatibility */ ! 2939: #define SPTR_HANDICON SPTR_ICONERROR ! 2940: #define SPTR_QUESICON SPTR_ICONQUESTION ! 2941: #define SPTR_BANGICON SPTR_ICONWARNING ! 2942: #define SPTR_NOTEICON SPTR_ICONINFORMATION ! 2943: ! 2944: #endif /* LATER */ ! 2945: ! 2946: ! 2947: ! 2948: HPOINTER APIENTRY WinLoadPointer(HWND hwndDesktop, HMODULE hmod, USHORT idres); ! 2949: BOOL APIENTRY WinDestroyPointer(HPOINTER hptr); ! 2950: HPOINTER APIENTRY WinCreatePointer(HWND hwndDesktop, HBITMAP hbmPointer, ! 2951: BOOL fPointer, SHORT xHotspot, ! 2952: SHORT yHotspot); ! 2953: ! 2954: HPOINTER APIENTRY WinQueryPointer(HWND hwndDesktop); ! 2955: BOOL APIENTRY WinSetPointerPos(HWND hwndDesktop, SHORT x, SHORT y); ! 2956: BOOL APIENTRY WinQueryPointerPos(HWND hwndDesktop, PPOINTL pptl); ! 2957: ! 2958: typedef struct _POINTERINFO { /* ptri */ ! 2959: BOOL fPointer; ! 2960: SHORT xHotspot; ! 2961: SHORT yHotspot; ! 2962: HBITMAP hbmPointer; ! 2963: HBITMAP hbmColor; ! 2964: } POINTERINFO; ! 2965: typedef POINTERINFO FAR *PPOINTERINFO; ! 2966: ! 2967: HPOINTER APIENTRY WinCreatePointerIndirect(HWND hwndDesktop, PPOINTERINFO pptri); ! 2968: BOOL APIENTRY WinQueryPointerInfo(HPOINTER hptr, ! 2969: PPOINTERINFO pPointerInfo); ! 2970: BOOL APIENTRY WinDrawPointer(HPS hps, SHORT x, SHORT y, HPOINTER hptr, ! 2971: USHORT fs); ! 2972: ! 2973: ! 2974: ! 2975: /* WinDrawPointer() constants */ ! 2976: ! 2977: #define DP_NORMAL 0x0000 ! 2978: #define DP_HALFTONED 0x0001 ! 2979: #define DP_INVERTED 0x0002 ! 2980: ! 2981: ! 2982: HBITMAP APIENTRY WinGetSysBitmap(HWND hwndDesktop, USHORT ibm); ! 2983: ! 2984: /* System bitmaps (NOTE: these are 1-based) */ ! 2985: ! 2986: #define SBMP_OLD_SYSMENU 1 ! 2987: #define SBMP_OLD_SBUPARROW 2 ! 2988: #define SBMP_OLD_SBDNARROW 3 ! 2989: #define SBMP_OLD_SBRGARROW 4 ! 2990: #define SBMP_OLD_SBLFARROW 5 ! 2991: #define SBMP_MENUCHECK 6 ! 2992: #define SBMP_CHECKBOXES 7 ! 2993: #define SBMP_BTNCORNERS 8 ! 2994: #define SBMP_OLD_MINBUTTON 9 ! 2995: #define SBMP_OLD_MAXBUTTON 10 ! 2996: #define SBMP_OLD_RESTOREBUTTON 11 ! 2997: #define SBMP_OLD_CHILDSYSMENU 12 ! 2998: #define SBMP_DRIVE 15 ! 2999: #define SBMP_FILE 16 ! 3000: #define SBMP_FOLDER 17 ! 3001: #define SBMP_TREEPLUS 18 ! 3002: #define SBMP_TREEMINUS 19 ! 3003: #define SBMP_PROGRAM 22 ! 3004: #define SBMP_MENUATTACHED 23 ! 3005: #define SBMP_SIZEBOX 24 ! 3006: ! 3007: #define SBMP_SYSMENU 25 ! 3008: #define SBMP_MINBUTTON 26 ! 3009: #define SBMP_MAXBUTTON 27 ! 3010: #define SBMP_RESTOREBUTTON 28 ! 3011: #define SBMP_CHILDSYSMENU 29 ! 3012: #define SBMP_SYSMENUDEP 30 ! 3013: #define SBMP_MINBUTTONDEP 31 ! 3014: #define SBMP_MAXBUTTONDEP 32 ! 3015: #define SBMP_RESTOREBUTTONDEP 33 ! 3016: #define SBMP_CHILDSYSMENUDEP 34 ! 3017: #define SBMP_SBUPARROW 35 ! 3018: #define SBMP_SBDNARROW 36 ! 3019: #define SBMP_SBLFARROW 37 ! 3020: #define SBMP_SBRGARROW 38 ! 3021: #define SBMP_SBUPARROWDEP 39 ! 3022: #define SBMP_SBDNARROWDEP 40 ! 3023: #define SBMP_SBLFARROWDEP 41 ! 3024: #define SBMP_SBRGARROWDEP 42 ! 3025: #define SBMP_SBUPARROWDIS 43 ! 3026: #define SBMP_SBDNARROWDIS 44 ! 3027: #define SBMP_SBLFARROWDIS 45 ! 3028: #define SBMP_SBRGARROWDIS 46 ! 3029: #define SBMP_COMBODOWN 47 ! 3030: ! 3031: #endif /* INCL_WINPOINTERS */ ! 3032: ! 3033: ! 3034: /**** Hook manager */ ! 3035: ! 3036: #ifdef INCL_WINHOOKS ! 3037: ! 3038: #ifndef INCL_SAADEFS ! 3039: BOOL APIENTRY WinSetHook(HAB hab, HMQ hmq, SHORT iHook, PFN pfnHook, ! 3040: HMODULE hmod); ! 3041: BOOL APIENTRY WinReleaseHook(HAB hab, HMQ hmq, SHORT iHook, PFN pfnHook, ! 3042: HMODULE hmod); ! 3043: BOOL APIENTRY WinCallMsgFilter(HAB hab, PQMSG pqmsg, USHORT msgf); ! 3044: ! 3045: ! 3046: /* Hook codes */ ! 3047: ! 3048: #define HK_SENDMSG 0 ! 3049: /* VOID EXPENTRY SendMsgHook(HAB hab, ** installer's hab ** ! 3050: PSMHSTRUCT psmh, ** p send msg struct ** ! 3051: BOOL fInterTask); ** between threads */ ! 3052: #define HK_INPUT 1 ! 3053: /* BOOL EXPENTRY InputHook(HAB hab, ** installer's hab ** ! 3054: PQMSG pQmsg, ** p qmsg ** ! 3055: USHORT fs); ** remove/noremove */ ! 3056: #define HK_MSGFILTER 2 ! 3057: /* BOOL EXPENTRY MsgFilterHook(HAB hab, ** installer's hab ** ! 3058: PQMSG pQmsg, ** p qmsg ** ! 3059: USHORT msgf); ** filter flag */ ! 3060: #define HK_JOURNALRECORD 3 ! 3061: /* VOID EXPENTRY JournalRecordHook(HAB hab, ** installer's hab ** ! 3062: PQMSG pQmsg); ** p qmsg */ ! 3063: #define HK_JOURNALPLAYBACK 4 ! 3064: /* ULONG EXPENTRY JournalPlaybackHook(HAB hab, **installer's hab ** ! 3065: BOOL fSkip, ** skip messages ** ! 3066: PQMSG pQmsg); ** p qmsg */ ! 3067: #define HK_HELP 5 ! 3068: /* BOOL EXPENTRY HelpHook(HAB hab, ** installer's hab ** ! 3069: USHORT usMode, ** mode ** ! 3070: USHORT idTopic, ** main topic ** ! 3071: USHORT idSubTopic, ** sub topic ** ! 3072: PRECTL prcPosition); ** associated position */ ! 3073: ! 3074: #define HK_LOADER 6 ! 3075: /* BOOL EXPENTRY LoaderHook(HAB hab, ** installer's hab ** ! 3076: SHORT idContext, ** who called hook ** ! 3077: PSZ pszLibname, ** lib name string ** ! 3078: PHLIB hlib, ** p to lib handle ** ! 3079: PSZ pszProcname, ** procedure name ** ! 3080: PFNWP wndProc); ** window procedure */ ! 3081: #define HK_REGISTERUSERMSG 7 ! 3082: /* BOOL EXPENTRY RegisterUserHook(HAB hab, ** installer's hab ** ! 3083: ULONG cUshort, ** entries in arRMP ** ! 3084: PUSHORT arRMP, ** RMP array ** ! 3085: PBOOL fRegistered); ** msg parms already reg*/ ! 3086: #define HK_MSGCONTROL 8 ! 3087: /* BOOL EXPENTRY MsgControlHook(HAB hab, ** installer's hab ** ! 3088: SHORT idContext, ** who called hook ** ! 3089: HWND hwnd, ** SEI window handle ** ! 3090: PSZ pszClassname, ** window class name ** ! 3091: USHORT usMsgclass, ** interested msg class ** ! 3092: SHORT idControl, ** SMI_* ** ! 3093: PBOOL fSuccess); ** mode already set */ ! 3094: #define HK_PLIST_ENTRY 9 ! 3095: /* BOOL EXPENTRY ProgramListEntryHook(HAB hab, ** installer's hab ** ! 3096: PPRFHOOKPARMS pProfileHookParams,** data ** ! 3097: PBOOL fNoExecute); ** cease hook processing*/ ! 3098: #define HK_PLIST_EXIT 10 ! 3099: /* BOOL EXPENTRY ProgramListExitHook(HAB hab, ** installer's hab ** ! 3100: PPRFHOOKPARMS pProfileHookParams); ** data */ ! 3101: #define HK_FINDWORD 11 ! 3102: /* BOOL EXPENTRY FindWordHook(usCodepage, ** code page to use ** ! 3103: PSZ pszText, ** text to break ** ! 3104: ULONG cb, ** maximum text size ** ! 3105: ULONG ich, ** break 'near' here ** ! 3106: PULONG pichStart, ** where break began ** ! 3107: PULONG pichEnd, ** where break ended ** ! 3108: PULONG pichNext); ** where next word begin*/ ! 3109: #define HK_CODEPAGECHANGED 12 ! 3110: /* VOID EXPENTRY CodePageChangedHook(HMQ hmq, ** msg q handle ** ! 3111: USHORT usOldCodepage, ** old code page ** ! 3112: USHORT usNewCodepage);** new code page */ ! 3113: ! 3114: #define HMQ_CURRENT ((HMQ)1) ! 3115: ! 3116: /* WH_MSGFILTER context codes */ ! 3117: ! 3118: #define MSGF_DIALOGBOX 1 ! 3119: #define MSGF_MESSAGEBOX 2 ! 3120: #define MSGF_TRACK 8 ! 3121: ! 3122: /* HK_HELP Help modes */ ! 3123: ! 3124: #define HLPM_FRAME (-1) ! 3125: #define HLPM_WINDOW (-2) ! 3126: #define HLPM_MENU (-3) ! 3127: ! 3128: /* HK_SENDMSG structure */ ! 3129: ! 3130: #define PM_MODEL_1X 0 ! 3131: #define PM_MODEL_2X 1 ! 3132: ! 3133: #ifdef INCL_32 ! 3134: ! 3135: typedef struct _SMHSTRUCT { /* smhs */ ! 3136: MPARAM mp2; ! 3137: MPARAM mp1; ! 3138: USHORT msg; ! 3139: HWND hwnd; ! 3140: USHORT model; ! 3141: } SMHSTRUCT; ! 3142: typedef SMHSTRUCT *PSMHSTRUCT; ! 3143: ! 3144: #else /* not INCL_32 */ ! 3145: ! 3146: typedef struct _SMHSTRUCT { /* smhs */ ! 3147: MPARAM mp2; ! 3148: MPARAM mp1; ! 3149: USHORT msg; ! 3150: HWND hwnd; ! 3151: } SMHSTRUCT; ! 3152: typedef SMHSTRUCT FAR *PSMHSTRUCT; ! 3153: ! 3154: #endif /* INCL_32 */ ! 3155: ! 3156: /*HK_LOADER context codes */ /*@DIA*/ ! 3157: ! 3158: #define LHK_DELETEPROC 1 ! 3159: #define LHK_DELETELIB 2 ! 3160: #define LHK_LOADPROC 3 ! 3161: #define LHK_LOADLIB 4 ! 3162: ! 3163: /*HK_MSGCONTROL context codes */ ! 3164: ! 3165: #define MCHK_MSGINTEREST 1 ! 3166: #define MCHK_CLASSMSGINTEREST 2 ! 3167: #define MCHK_SYNCHRONISATION 3 ! 3168: #define MCHK_MSGMODE 4 ! 3169: ! 3170: /*HK_REGISTERUSERMSG conext codes */ ! 3171: ! 3172: #define RUMHK_DATATYPE 1 ! 3173: #define RUMHK_MSG 2 ! 3174: ! 3175: #endif /* INCL_SAADEFS */ ! 3176: ! 3177: #endif /* INCL_WINHOOKS */ ! 3178: ! 3179: ! 3180: #ifdef INCL_WINTHUNKAPI ! 3181: ! 3182: BOOL APIENTRY WinSetClassThunkProc(PSZ pszClassname, PFN pfnThunkProc); ! 3183: PFN APIENTRY WinQueryClassThunkProc(PSZ pszClassname); ! 3184: BOOL APIENTRY WinSetWindowThunkProc(HWND hwnd, PFN pfnThunkProc); ! 3185: PFN APIENTRY WinQueryWindowThunkProc(HWND hwnd); ! 3186: SHORT APIENTRY WinQueryWindowModel(HWND hwnd); ! 3187: ! 3188: #endif /* INCL_WINTHUNKAPI */ ! 3189: ! 3190: /* ! 3191: * Include Shell API ! 3192: */ ! 3193: #ifndef INCL_SAADEFS ! 3194: #include <pmshl.h> /* OS/2 Shell definitions */ ! 3195: #endif /* !INCL_SAADEFS */ ! 3196: ! 3197: #ifdef INCL_WINCOUNTRY ! 3198: ! 3199: USHORT APIENTRY WinQueryCp(HMQ hmq); ! 3200: ! 3201: #ifndef INCL_SAADEFS ! 3202: BOOL APIENTRY WinSetCp(HMQ hmq, USHORT idCodePage); ! 3203: USHORT APIENTRY WinQueryCpList(HAB hab, USHORT ccpMax, PUSHORT prgcp); ! 3204: ! 3205: #ifdef INCL_32 ! 3206: ! 3207: BOOL APIENTRY WinCpTranslateString(HAB hab, USHORT cpSrc, PSZ pszSrc, ! 3208: USHORT cpDst, ULONG cchDestMax, PSZ pchDest); ! 3209: ! 3210: #else /* not INCL_32 */ ! 3211: ! 3212: BOOL APIENTRY WinCpTranslateString(HAB hab, USHORT cpSrc, PSZ pszSrc, ! 3213: USHORT cpDst, USHORT cchDestMax, PSZ pchDest); ! 3214: ! 3215: #endif /* INCL_32 */ ! 3216: ! 3217: UCHAR APIENTRY WinCpTranslateChar(HAB hab, USHORT cpSrc, UCHAR chSrc, ! 3218: USHORT cpDst); ! 3219: ! 3220: USHORT APIENTRY WinUpper(HAB hab, USHORT idcp, USHORT idcc, PSZ psz); ! 3221: USHORT APIENTRY WinUpperChar(HAB hab, USHORT idcp, USHORT idcc, USHORT c); ! 3222: PSZ APIENTRY WinNextChar(HAB hab, USHORT idcp, USHORT idcc, PSZ psz); ! 3223: PSZ APIENTRY WinPrevChar(HAB hab, USHORT idcp, USHORT idcc, PSZ pszStart, ! 3224: PSZ psz); ! 3225: USHORT APIENTRY WinCompareStrings(HAB hab, USHORT idcp, USHORT idcc, PSZ psz1, ! 3226: PSZ psz2, USHORT reserved); ! 3227: #define WCS_ERROR 0 ! 3228: #define WCS_EQ 1 ! 3229: #define WCS_LT 2 ! 3230: #define WCS_GT 3 ! 3231: ! 3232: #endif /* !INCL_SAADEFS */ ! 3233: ! 3234: #endif /* INCL_WINCOUNTRY */ ! 3235: ! 3236: ! 3237: ! 3238: /* Heap Manager Interface declarations */ ! 3239: ! 3240: #ifdef INCL_WINHEAP ! 3241: ! 3242: #ifndef INCL_32 ! 3243: ! 3244: #ifndef INCL_SAADEFS ! 3245: typedef LHANDLE HHEAP; ! 3246: ! 3247: HHEAP APIENTRY WinCreateHeap(SEL selHeapBase, USHORT cbHeap, ! 3248: USHORT cbGrow, USHORT chMinDed, ! 3249: USHORT cbMaxDed, USHORT fOptions); ! 3250: HHEAP APIENTRY WinDestroyHeap(HHEAP hHeap); ! 3251: USHORT APIENTRY WinAvailMem(HHEAP hHeap, BOOL fCompact, USHORT cbMinFree); ! 3252: NPBYTE APIENTRY WinAllocMem(HHEAP hHeap, USHORT cb); ! 3253: NPBYTE APIENTRY WinReallocMem(HHEAP hHeap, NPBYTE npMem, ! 3254: USHORT cbOld, USHORT cbNew); ! 3255: NPBYTE APIENTRY WinFreeMem(HHEAP hHeap, NPBYTE npMem, USHORT cbMem); ! 3256: PVOID APIENTRY WinLockHeap(HHEAP hHeap); ! 3257: ! 3258: #define HM_MOVEABLE 0x0001 /* Parameters to WinCreateHeap */ ! 3259: #define HM_VALIDSIZE 0x0002 ! 3260: #endif /* !INCL_SAADEFS */ ! 3261: ! 3262: #endif /* !INCL_32 */ ! 3263: ! 3264: #endif /* INCL_WINHEAP */ ! 3265: ! 3266: ! 3267: /*** Atom Manager Interface declarations */ ! 3268: ! 3269: #ifdef INCL_WINATOM ! 3270: ! 3271: #ifndef INCL_SAADEFS ! 3272: typedef LHANDLE HATOMTBL; ! 3273: typedef USHORT ATOM; ! 3274: ! 3275: HATOMTBL APIENTRY WinQuerySystemAtomTable(VOID); ! 3276: HATOMTBL APIENTRY WinCreateAtomTable(USHORT cbInitial, USHORT cBuckets); ! 3277: HATOMTBL APIENTRY WinDestroyAtomTable(HATOMTBL hAtomTbl); ! 3278: ATOM APIENTRY WinAddAtom(HATOMTBL hAtomTbl, PSZ pszAtomName); ! 3279: ATOM APIENTRY WinFindAtom(HATOMTBL hAtomTbl, PSZ pszAtomName); ! 3280: ATOM APIENTRY WinDeleteAtom(HATOMTBL hAtomTbl, ATOM atom); ! 3281: USHORT APIENTRY WinQueryAtomUsage(HATOMTBL hAtomTbl, ATOM atom); ! 3282: USHORT APIENTRY WinQueryAtomLength(HATOMTBL hAtomTbl, ATOM atom); ! 3283: USHORT APIENTRY WinQueryAtomName(HATOMTBL hAtomTbl, ATOM atom, PSZ pchBuffer, ! 3284: USHORT cchBufferMax); ! 3285: ! 3286: #define MAKEINTATOM(a) ((PCH)MAKEULONG(a, 0xffff)) ! 3287: #endif /* !INCL_SAADEFS */ ! 3288: ! 3289: #endif /* INCL_WINATOM */ ! 3290: ! 3291: ! 3292: /*** Catch/Throw Interface declarations */ ! 3293: ! 3294: #ifdef INCL_WINCATCHTHROW ! 3295: ! 3296: #ifndef INCL_SAADEFS ! 3297: #ifdef INCL_32 ! 3298: typedef struct _CATCHBUF { /* ctchbf */ ! 3299: ULONG reserved[ 7 ]; ! 3300: } CATCHBUF; ! 3301: #else ! 3302: typedef struct _CATCHBUF { /* ctchbf */ ! 3303: ULONG reserved[ 4 ]; ! 3304: } CATCHBUF; ! 3305: #endif ! 3306: typedef CATCHBUF FAR *PCATCHBUF; ! 3307: ! 3308: SHORT APIENTRY WinCatch(PCATCHBUF pcatchbuf); ! 3309: VOID APIENTRY WinThrow(PCATCHBUF pcatchbuf, SHORT nThrowBack); ! 3310: #endif /* !INCL_SAADEFS */ ! 3311: ! 3312: #endif /* INCL_WINCATCHTHROW */ ! 3313: ! 3314: ! 3315: ! 3316: #ifdef INCL_WINERRORS ! 3317: ! 3318: #include <pmerr.h> ! 3319: ! 3320: /* Error codes for debugging support */ ! 3321: /* 0x1001 - 0x1021, 0x1034, 0x1036 - 0x1050 are reserved */ ! 3322: ! 3323: #define WINDBG_HWND_NOT_DESTROYED 0x1022 ! 3324: #define WINDBG_HPTR_NOT_DESTROYED 0x1023 ! 3325: #define WINDBG_HACCEL_NOT_DESTROYED 0x1024 ! 3326: #define WINDBG_HENUM_NOT_DESTROYED 0x1025 ! 3327: #define WINDBG_VISRGN_SEM_BUSY 0x1026 ! 3328: #define WINDBG_USER_SEM_BUSY 0x1027 ! 3329: #define WINDBG_DC_CACHE_BUSY 0x1028 ! 3330: #define WINDBG_HOOK_STILL_INSTALLED 0x1029 ! 3331: #define WINDBG_WINDOW_STILL_LOCKED 0x102a ! 3332: #define WINDBG_UPDATEPS_ASSERTION_FAIL 0x102b ! 3333: #define WINDBG_SENDMSG_WITHIN_USER_SEM 0x102c ! 3334: #define WINDBG_USER_SEM_NOT_ENTERED 0x102d ! 3335: #define WINDBG_PROC_NOT_EXPORTED 0x102e ! 3336: #define WINDBG_BAD_SENDMSG_HWND 0x102f ! 3337: #define WINDBG_ABNORMAL_EXIT 0x1030 ! 3338: #define WINDBG_INTERNAL_REVISION 0x1031 ! 3339: #define WINDBG_INITSYSTEM_FAILED 0x1032 ! 3340: #define WINDBG_HATOMTBL_NOT_DESTROYED 0x1033 ! 3341: #define WINDBG_WINDOW_UNLOCK_WAIT 0x1035 ! 3342: ! 3343: /* Get/Set Error Information Interface declarations */ ! 3344: ! 3345: typedef struct _ERRINFO { /* erri */ ! 3346: USHORT cbFixedErrInfo; ! 3347: ERRORID idError; ! 3348: USHORT cDetailLevel; ! 3349: USHORT offaoffszMsg; ! 3350: USHORT offBinaryData; ! 3351: } ERRINFO; ! 3352: typedef ERRINFO FAR *PERRINFO; ! 3353: ! 3354: ERRORID APIENTRY WinGetLastError(HAB hab); ! 3355: PERRINFO APIENTRY WinGetErrorInfo(HAB hab); ! 3356: BOOL APIENTRY WinFreeErrorInfo(PERRINFO perrinfo); ! 3357: ! 3358: #endif /* INCL_WINERRORS */ ! 3359: ! 3360: #ifndef INCL_SAADEFS ! 3361: /* include SetErrorInfo */ ! 3362: #ifdef INCL_WINSEI ! 3363: #ifndef SEI_PMWINP ! 3364: #define SEI_PMWIN ! 3365: #include <pmsei.h> ! 3366: #endif /* SEI_PMWINP */ ! 3367: #endif /* INCL_WINSEI */ ! 3368: #endif /* INCL_SAADEFS */ ! 3369: ! 3370: #ifndef INCL_SAADEFS ! 3371: #ifdef INCL_WINDDE ! 3372: ! 3373: /* ! 3374: * DDE standard system topic and item strings ! 3375: */ ! 3376: #define SZDDESYS_TOPIC "System" ! 3377: #define SZDDESYS_ITEM_TOPICS "Topics" ! 3378: #define SZDDESYS_ITEM_SYSITEMS "SysItems" ! 3379: #define SZDDESYS_ITEM_RTNMSG "ReturnMessage" ! 3380: #define SZDDESYS_ITEM_STATUS "Status" ! 3381: #define SZDDESYS_ITEM_FORMATS "Formats" ! 3382: #define SZDDESYS_ITEM_SECURITY "Security" ! 3383: #define SZDDESYS_ITEM_ITEMFORMATS "ItemFormats" ! 3384: #define SZDDESYS_ITEM_HELP "Help" ! 3385: #define SZDDESYS_ITEM_PROTOCOLS "Protocols" ! 3386: #define SZDDESYS_ITEM_RESTART "Restart" ! 3387: ! 3388: /* ! 3389: * Dynamic Data Exchange (DDE) Structure Declarations ! 3390: */ ! 3391: typedef struct _CONVCONTEXT { /* cctxt */ ! 3392: USHORT cb; /* sizeof(CONVCONTEXT) */ ! 3393: USHORT fsContext; ! 3394: USHORT idCountry; ! 3395: USHORT usCodepage; ! 3396: USHORT usLangID; ! 3397: USHORT usSubLangID; ! 3398: } CONVCONTEXT; ! 3399: typedef CONVCONTEXT FAR *PCONVCONTEXT; ! 3400: ! 3401: #define DDECTXT_CASESENSITIVE 0x0001 ! 3402: ! 3403: typedef struct _DDEINIT { /* ddei */ ! 3404: USHORT cb; /* sizeof(DDEINIT) */ ! 3405: PSZ pszAppName; ! 3406: PSZ pszTopic; ! 3407: USHORT offConvContext; ! 3408: } DDEINIT; ! 3409: typedef DDEINIT FAR *PDDEINIT; ! 3410: ! 3411: typedef struct _DDESTRUCT { /* dde */ ! 3412: ULONG cbData; ! 3413: USHORT fsStatus; ! 3414: USHORT usFormat; ! 3415: USHORT offszItemName; ! 3416: USHORT offabData; ! 3417: } DDESTRUCT; ! 3418: typedef DDESTRUCT FAR *PDDESTRUCT; ! 3419: ! 3420: /* DDE constants for wStatus field */ ! 3421: #define DDE_FACK 0x0001 ! 3422: #define DDE_FBUSY 0x0002 ! 3423: #define DDE_FNODATA 0x0004 ! 3424: #define DDE_FACKREQ 0x0008 ! 3425: #define DDE_FRESPONSE 0x0010 ! 3426: #define DDE_NOTPROCESSED 0x0020 ! 3427: #define DDE_FRESERVED 0x00C0 ! 3428: #define DDE_FAPPSTATUS 0xFF00 ! 3429: ! 3430: /* old DDE public formats - new ones are CF_ constants */ ! 3431: ! 3432: #define DDEFMT_TEXT 0x0001 ! 3433: ! 3434: /* Dynamic Data Exchange (DDE) Routines */ ! 3435: ! 3436: BOOL APIENTRY WinDdeInitiate(HWND hwndClient, PSZ pszAppName, ! 3437: PSZ pszTopicName); ! 3438: BOOL APIENTRY WinDdeInitiate2(HWND hwndClient, PSZ pszAppName, ! 3439: PSZ pszTopicName, PCONVCONTEXT pCC); ! 3440: ! 3441: MRESULT APIENTRY WinDdeRespond(HWND hwndClient, HWND hwndServer, ! 3442: PSZ pszAppName, PSZ pszTopicName); ! 3443: BOOL APIENTRY WinDdeRespond2(HWND hwndClient, HWND hwndServer, PSZ pszAppName, ! 3444: PSZ pszTopicName, PCONVCONTEXT pCC); ! 3445: ! 3446: BOOL APIENTRY WinDdePostMsg(HWND hwndTo, HWND hwndFrom, USHORT wm, ! 3447: PDDESTRUCT pddest, BOOL fRetry); ! 3448: BOOL APIENTRY WinDdePostMsg2(HWND hwndTo, HWND hwndFrom, USHORT wm, ! 3449: PDDESTRUCT pddest, ULONG flOptions); ! 3450: ! 3451: #define DDEPM_RETRY 0x00000001L ! 3452: #define DDEPM_NOFREE 0x00000002L ! 3453: ! 3454: /* Dynamic Data Exchange (DDE) Messages */ ! 3455: ! 3456: #define WM_DDE_FIRST 0x00A0 ! 3457: #define WM_DDE_INITIATE 0x00A0 ! 3458: #define WM_DDE_REQUEST 0x00A1 ! 3459: #define WM_DDE_ACK 0x00A2 ! 3460: #define WM_DDE_DATA 0x00A3 ! 3461: #define WM_DDE_ADVISE 0x00A4 ! 3462: #define WM_DDE_UNADVISE 0x00A5 ! 3463: #define WM_DDE_POKE 0x00A6 ! 3464: #define WM_DDE_EXECUTE 0x00A7 ! 3465: #define WM_DDE_TERMINATE 0x00A8 ! 3466: #define WM_DDE_INITIATEACK 0x00A9 ! 3467: #define WM_DDE_LAST 0x00AF ! 3468: ! 3469: /* DDE helper macros */ ! 3470: ! 3471: #define DDES_PSZITEMNAME(pddes) \ ! 3472: (((PSZ)pddes) + ((PDDESTRUCT)pddes)->offszItemName) ! 3473: ! 3474: #define DDES_PABDATA(pddes) \ ! 3475: (((PBYTE)pddes) + ((PDDESTRUCT)pddes)->offabData) ! 3476: ! 3477: #define DDEI_PCONVCONTEXT(pddei) \ ! 3478: ((PCONVCONTEXT)((PBYTE)pddei + pddei->offConvContext)) ! 3479: ! 3480: #define SELTOPDDES(sel) ((PDDESTRUCT)MAKEP(sel, 0)) ! 3481: #define PDDESTOSEL(pddes) (SELECTOROF(pddes)) ! 3482: #define PDDEITOSEL(pddei) (SELECTOROF(pddei)) ! 3483: ! 3484: #endif /* INCL_WINDDE */ ! 3485: #endif /* !INCL_SAADEFS */ ! 3486: ! 3487: #ifdef INCL_WINWINDOWMGR ! 3488: #define WM_QUERYCONVERTPOS 0x00b0 ! 3489: ! 3490: /* Return values for WM_QUERYCONVERTPOS */ ! 3491: #define QCP_CONVERT 0x0001 ! 3492: #define QCP_NOCONVERT 0x0000 ! 3493: ! 3494: #endif /* INCL_WINWINDOWMGR */ ! 3495: ! 3496: ! 3497: #ifdef INCL_WINHELP ! 3498: #include <pmhelp.h> ! 3499: #endif /* INCL_WINHELP */ ! 3500: ! 3501: /*Load/Delete Library/Procedure */ ! 3502: ! 3503: typedef HMODULE HLIB; ! 3504: typedef PHMODULE PHLIB; ! 3505: ! 3506: #ifdef INCL_WINLOAD ! 3507: BOOL APIENTRY WinDeleteProcedure(HAB hab, PFNWP wndproc); ! 3508: BOOL APIENTRY WinDeleteLibrary(HAB hab, HLIB libhandle); ! 3509: PFNWP APIENTRY WinLoadProcedure(HAB hab, HLIB libhandle, PSZ procname); ! 3510: HLIB APIENTRY WinLoadLibrary(HAB hab, PSZ libname); ! 3511: #endif /* INCL_WINLOAD */ ! 3512: ! 3513: ! 3514: #ifdef INCL_REMAPDLL ! 3515: #define STR_DLLNAME "keyremap" ! 3516: #endif /*INCL_REMAPDLL*/ ! 3517: ! 3518: #ifdef INCL_NLS ! 3519: ! 3520: #define WM_DBCSFIRST 0x00b0 ! 3521: #define WM_DBCSLAST 0x00cf ! 3522: #define WC_APPSTAT ((PSZ)0xffff0010L) ! 3523: #define WC_KBDSTAT ((PSZ)0xffff0011L) ! 3524: #define WC_PECIC ((PSZ)0xffff0012L) ! 3525: #define WC_DBE_KKPOPUP ((PSZ)0xffff0013L) ! 3526: ! 3527: #include <os2nls.h> ! 3528: #endif /* INCL_NLS */ ! 3529: ! 3530: #ifdef INCL_WINDESKTOP ! 3531: ! 3532: /*** Desktop API definitions ***/ ! 3533: ! 3534: typedef struct _DESKTOP { /* dsk */ ! 3535: ULONG cbSize; ! 3536: HBITMAP hbm; ! 3537: SHORT x; ! 3538: SHORT y; ! 3539: ULONG fl; ! 3540: CHAR szFile[260]; /* LATER: CCHMAXPATH */ ! 3541: } DESKTOP; ! 3542: typedef DESKTOP FAR *PDESKTOP; /* pdsk */ ! 3543: ! 3544: HBITMAP APIENTRY WinSetDesktopBkgnd(HWND hwndDesktop, PDESKTOP pdskNew); ! 3545: BOOL APIENTRY WinQueryDesktopBkgnd(HWND hwndDesktop, PDESKTOP pdsk); ! 3546: ! 3547: #define SDT_DESTROY 0x0001L ! 3548: #define SDT_NOBKGND 0x0002L ! 3549: #define SDT_TILE 0x0004L ! 3550: #define SDT_SCALE 0x0008L ! 3551: #define SDT_PATTERN 0x0010L ! 3552: #define SDT_CENTER 0x0020L ! 3553: #define SDT_RETAIN 0x0040L ! 3554: #define SDT_LOADFILE 0x0080L ! 3555: ! 3556: #endif /* INCL_WINDESKTOP */ ! 3557: ! 3558: #ifdef INCL_WINPALETTE ! 3559: ! 3560: /*** Palette Manager API definitions ***/ ! 3561: ! 3562: LONG APIENTRY WinRealizePalette(HWND hwnd, HPS hps); ! 3563: ! 3564: #endif /* INCL_WINPALETTE */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.