home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c034 / 7.ddi / INCLUDE / PMWIN.H$ / PMWIN.bin
Encoding:
Text File  |  1989-11-29  |  83.8 KB  |  3,006 lines

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