home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / watcoapi.zip / incl32 / pmwin.h < prev   
C/C++ Source or Header  |  2002-09-30  |  72KB  |  2,149 lines

  1. /*
  2.     OS/2 Presentation Manager window manager include file
  3.     for 32-bit development.
  4. */
  5.  
  6.  
  7. #define INCL_WININCLUDED
  8.  
  9. #ifdef INCL_WIN
  10.     #define INCL_WINATOM
  11.     #define INCL_WINBUTTONS
  12.     #define INCL_WINCLIPBOARD
  13.     #define INCL_WINCURSORS
  14.     #define INCL_WINDDE
  15.     #define INCL_WINDIALOGS
  16.     #define INCL_WINENTRYFIELDS
  17.     #define INCL_WINERRORS
  18.     #define INCL_WINFRAMECTLS
  19.     #define INCL_WINFRAMEMGR
  20.     #define INCL_WINHELP
  21.     #define INCL_WINHOOKS
  22.     #define INCL_WININPUT
  23.     #define INCL_WINLISTBOXES
  24.     #define INCL_WINMENUS
  25.     #define INCL_WINMESSAGEMGR
  26.     #define INCL_WINMLE
  27.     #define INCL_WINPOINTERS
  28.     #define INCL_WINPROGRAMLIST
  29.     #define INCL_WINRECTANGLES
  30.     #define INCL_WINSCROLLBARS
  31.     #define INCL_WINSHELLDATA
  32.     #define INCL_WINSTATICS
  33.     #define INCL_WINSTDDLGS
  34.     #define INCL_WINSYS
  35.     #define INCL_WINTIMER
  36.     #define INCL_WINTRACKRECT
  37.     #define INCL_WINWINDOWMGR
  38. #else
  39.   #ifdef RC_INVOKED
  40.     #define INCL_WININPUT
  41.     #define INCL_WINDIALOGS
  42.     #define INCL_WINSTATICS
  43.     #define INCL_WINBUTTONS
  44.     #define INCL_WINENTRYFIELDS
  45.     #define INCL_WINLISTBOXES
  46.     #define INCL_WINMENUS
  47.     #define INCL_WINSCROLLBARS
  48.     #define INCL_WINFRAMEMGR
  49.     #define INCL_WINFRAMECTLS
  50.     #define INCL_WINACCELERATORS
  51.     #define INCL_WINPOINTERS
  52.     #define INCL_WINMESSAGEMGR
  53.     #define INCL_WINMLE
  54.     #define INCL_WINHELP
  55.     #define INCL_WINSTDDLGS
  56.     #define INCL_WINSYS
  57.   #endif
  58. #endif
  59.  
  60. #define MPFROMP(p)          ((MPARAM)(VOID *)(p))
  61. #define MPFROMHWND(hwnd)    ((MPARAM)(HWND)(hwnd))
  62. #define MPFROMCHAR(ch)      ((MPARAM)(USHORT)(ch))
  63. #define MPFROMSHORT(s)      ((MPARAM)(USHORT)(s))
  64. #define MPFROM2SHORT(s1, s2)((MPARAM)MAKELONG(s1, s2))
  65. #define MPFROMSH2CH(s, uch1, uch2)   ((MPARAM)MAKELONG(s, MAKESHORT(uch1, uch2)))
  66. #define MPFROMLONG(l)       ((MPARAM)(ULONG)(l))
  67. #define PVOIDFROMMP(mp)     ((VOID *)(mp))
  68. #define HWNDFROMMP(mp)      ((HWND)(mp))
  69. #define CHAR1FROMMP(mp)     ((UCHAR)(mp))
  70. #define CHAR2FROMMP(mp)     ((UCHAR)((ULONG)mp >> 8))
  71. #define CHAR3FROMMP(mp)     ((UCHAR)((ULONG)mp >> 16))
  72. #define CHAR4FROMMP(mp)     ((UCHAR)((ULONG)mp >> 24))
  73. #define SHORT1FROMMP(mp)    ((USHORT)(ULONG)(mp))
  74. #define SHORT2FROMMP(mp)    ((USHORT)((ULONG)mp >> 16))
  75. #define LONGFROMMP(mp)      ((ULONG)(mp))
  76. #define MRFROMP(p)          ((MRESULT)(VOID *)(p))
  77. #define MRFROMSHORT(s)      ((MRESULT)(USHORT)(s))
  78. #define MRFROM2SHORT(s1, s2)((MRESULT)MAKELONG(s1, s2))
  79. #define MRFROMLONG(l)       ((MRESULT)(ULONG)(l))
  80. #define PVOIDFROMMR(mr)     ((VOID *)(mr))
  81. #define SHORT1FROMMR(mr)    ((USHORT)((ULONG)mr))
  82. #define SHORT2FROMMR(mr)    ((USHORT)((ULONG)mr >> 16))
  83. #define LONGFROMMR(mr)      ((ULONG)(mr))
  84.  
  85. #define HWND_DESKTOP       (HWND)1
  86. #define HWND_OBJECT        (HWND)2
  87. #define HWND_TOP           (HWND)3
  88. #define HWND_BOTTOM        (HWND)4
  89. #define HWND_THREADCAPTURE (HWND)5
  90.  
  91. #define WC_FRAME           ((PSZ)0xffff0001)
  92. #define WC_COMBOBOX        ((PSZ)0xffff0002)
  93. #define WC_BUTTON          ((PSZ)0xffff0003)
  94. #define WC_MENU            ((PSZ)0xffff0004)
  95. #define WC_STATIC          ((PSZ)0xffff0005)
  96. #define WC_ENTRYFIELD      ((PSZ)0xffff0006)
  97. #define WC_LISTBOX         ((PSZ)0xffff0007)
  98. #define WC_SCROLLBAR       ((PSZ)0xffff0008)
  99. #define WC_TITLEBAR        ((PSZ)0xffff0009)
  100. #define WC_MLE             ((PSZ)0xffff000A)
  101. #define WC_APPSTAT         ((PSZ)0xffff0010)
  102. #define WC_KBDSTAT         ((PSZ)0xffff0011)
  103. #define WC_PECIC           ((PSZ)0xffff0012)
  104. #define WC_DBE_KKPOPUP     ((PSZ)0xffff0013)
  105. #define WC_SPINBUTTON      ((PSZ)0xffff0020)
  106. #define WC_CONTAINER       ((PSZ)0xffff0025)
  107. #define WC_SLIDER          ((PSZ)0xffff0026)
  108. #define WC_VALUESET        ((PSZ)0xffff0027)
  109. #define WC_NOTEBOOK        ((PSZ)0xffff0028)
  110. #define WC_PENFIRST        ((PSZ)0xffff0029)
  111. #define WC_PENLAST         ((PSZ)0xffff002C)
  112. #define WC_MMPMFIRST       ((PSZ)0xffff0040)
  113. #define WC_CIRCULARSLIDER  ((PSZ)0xffff0041)
  114. #define WC_MMPMLAST        ((PSZ)0xffff004f)
  115. #define WC_PRISTDDLGFIRST  ((PSZ)0xffff0050)
  116. #define WC_PRISTDDLGLAST   ((PSZ)0xffff0057)
  117. #define WC_PUBSTDDLGFIRST  ((PSZ)0xffff0058)
  118. #define WC_PUBSTDDLGLAST   ((PSZ)0xffff005f)
  119.  
  120. #define WS_VISIBLE         0x80000000
  121. #define WS_DISABLED        0x40000000
  122. #define WS_CLIPCHILDREN    0x20000000
  123. #define WS_CLIPSIBLINGS    0x10000000
  124. #define WS_PARENTCLIP      0x08000000
  125. #define WS_SAVEBITS        0x04000000
  126. #define WS_SYNCPAINT       0x02000000
  127. #define WS_MINIMIZED       0x01000000
  128. #define WS_MAXIMIZED       0x00800000
  129. #define WS_ANIMATE         0x00400000
  130.  
  131. #define WS_GROUP           0x00010000
  132. #define WS_TABSTOP         0x00020000
  133. #define WS_MULTISELECT     0x00040000
  134.  
  135. #define CS_MOVENOTIFY      0x00000001
  136. #define CS_SIZEREDRAW      0x00000004
  137. #define CS_HITTEST         0x00000008
  138. #define CS_PUBLIC          0x00000010
  139. #define CS_FRAME           0x00000020
  140. #define CS_SYNCPAINT       0x02000000
  141. #define CS_SAVEBITS        0x04000000
  142. #define CS_PARENTCLIP      0x08000000
  143. #define CS_CLIPSIBLINGS    0x10000000
  144. #define CS_CLIPCHILDREN    0x20000000
  145.  
  146. #define FM_TYPE_FIXED     0x0001
  147. #define FM_TYPE_LICENSED  0x0002
  148. #define FM_TYPE_KERNING   0x0004
  149. #define FM_TYPE_DBCS      0x0010
  150. #define FM_TYPE_MBCS      0x0018
  151. #define FM_TYPE_UNICODE   0x0040
  152. #define FM_TYPE_64K       0x8000
  153. #define FM_TYPE_ATOMS     0x4000
  154. #define FM_TYPE_FAMTRUNC  0x2000
  155. #define FM_TYPE_FACETRUNC 0x1000
  156.  
  157. #define FM_DEFN_OUTLINE   0x0001
  158. #define FM_DEFN_IFI       0x0002
  159. #define FM_DEFN_WIN       0x0004
  160. #define FM_DEFN_GENERIC   0x8000
  161.  
  162. #define FATTR_SEL_ITALIC          0x0001
  163. #define FATTR_SEL_UNDERSCORE      0x0002
  164. #define FATTR_SEL_OUTLINE         0x0008
  165. #define FATTR_SEL_STRIKEOUT       0x0010
  166. #define FATTR_SEL_BOLD            0x0020
  167. #define FATTR_SEL_MUST_COLOR      0x0100
  168. #define FATTR_SEL_MUST_MIXEDMODES 0x0200
  169. #define FATTR_SEL_MUST_HOLLOW     0x0400
  170.  
  171. #define FATTR_TYPE_KERNING     0x0004
  172. #define FATTR_TYPE_MBCS        0x0008
  173. #define FATTR_TYPE_DBCS        0x0010
  174. #define FATTR_TYPE_ANTIALIASED 0x0020
  175.  
  176. #define FATTR_FONTUSE_NOMIX         0x0002
  177. #define FATTR_FONTUSE_OUTLINE       0x0004
  178. #define FATTR_FONTUSE_TRANSFORMABLE 0x0008
  179.  
  180. #define FACESIZE 32
  181.  
  182. typedef LHANDLE HWND, *PHWND;
  183. typedef LHANDLE HAB, *PHAB;
  184.  
  185. typedef LONG    FIXED, *PFIXED;
  186. typedef LONG    COLOR, *PCOLOR;
  187. typedef LHANDLE HBITMAP, *PHBITMAP;
  188. typedef LHANDLE HDC, *PHDC;
  189. typedef LHANDLE HMF, *PHMF;
  190. typedef LHANDLE HPAL, *PHPAL;
  191. typedef LHANDLE HPS, *PHPS;
  192. typedef LHANDLE HRGN, *PHRGN;
  193. typedef VOID    *MPARAM, **PMPARAM;
  194. typedef VOID    *MRESULT, **PMRESULT;
  195.  
  196. typedef CHAR STR8[8];
  197. typedef STR8 *PSTR8;
  198.  
  199. typedef MRESULT (APIENTRY *PFNWP)(HWND, ULONG, MPARAM, MPARAM);
  200.  
  201. typedef struct _POINTL {
  202.     LONG  x;
  203.     LONG  y;
  204. } POINTL, *PPOINTL;
  205.  
  206. typedef struct _POINTS {
  207.     SHORT x;
  208.     SHORT y;
  209. } POINTS, *PPOINTS;
  210.  
  211. typedef struct _RECTL {
  212.     LONG xLeft;
  213.     LONG yBottom;
  214.     LONG xRight;
  215.     LONG yTop;
  216. } RECTL, *PRECTL;
  217.  
  218. typedef struct _FATTRS {
  219.     USHORT usRecordLength;
  220.     USHORT fsSelection;
  221.     LONG   lMatch;
  222.     CHAR   szFacename[FACESIZE];
  223.     USHORT idRegistry;
  224.     USHORT usCodePage;
  225.     LONG   lMaxBaselineExt;
  226.     LONG   lAveCharWidth;
  227.     USHORT fsType;
  228.     USHORT fsFontUse;
  229. } FATTRS, *PFATTRS;
  230.  
  231. typedef struct _PANOSE {
  232.     BYTE bFamilyType;
  233.     BYTE bSerifStyle;
  234.     BYTE bWeight;
  235.     BYTE bProportion;
  236.     BYTE bContrast;
  237.     BYTE bStrokeVariation;
  238.     BYTE bArmStyle;
  239.     BYTE bLetterform;
  240.     BYTE bMidline;
  241.     BYTE bXHeight;
  242.     BYTE fbPassedISO;
  243.     BYTE fbFailedISO;
  244. } PANOSE, *PPANOSE;
  245.  
  246. typedef struct _FONTMETRICS {
  247.     CHAR   szFamilyname[FACESIZE];
  248.     CHAR   szFacename[FACESIZE];
  249.     USHORT idRegistry;
  250.     USHORT usCodePage;
  251.     LONG   lEmHeight;
  252.     LONG   lXHeight;
  253.     LONG   lMaxAscender;
  254.     LONG   lMaxDescender;
  255.     LONG   lLowerCaseAscent;
  256.     LONG   lLowerCaseDescent;
  257.     LONG   lInternalLeading;
  258.     LONG   lExternalLeading;
  259.     LONG   lAveCharWidth;
  260.     LONG   lMaxCharInc;
  261.     LONG   lEmInc;
  262.     LONG   lMaxBaselineExt;
  263.     SHORT  sCharSlope;
  264.     SHORT  sInlineDir;
  265.     SHORT  sCharRot;
  266.     USHORT usWeightClass;
  267.     USHORT usWidthClass;
  268.     SHORT  sXDeviceRes;
  269.     SHORT  sYDeviceRes;
  270.     SHORT  sFirstChar;
  271.     SHORT  sLastChar;
  272.     SHORT  sDefaultChar;
  273.     SHORT  sBreakChar;
  274.     SHORT  sNominalPointSize;
  275.     SHORT  sMinimumPointSize;
  276.     SHORT  sMaximumPointSize;
  277.     USHORT fsType;
  278.     USHORT fsDefn;
  279.     USHORT fsSelection;
  280.     USHORT fsCapabilities;
  281.     LONG   lSubscriptXSize;
  282.     LONG   lSubscriptYSize;
  283.     LONG   lSubscriptXOffset;
  284.     LONG   lSubscriptYOffset;
  285.     LONG   lSuperscriptXSize;
  286.     LONG   lSuperscriptYSize;
  287.     LONG   lSuperscriptXOffset;
  288.     LONG   lSuperscriptYOffset;
  289.     LONG   lUnderscoreSize;
  290.     LONG   lUnderscorePosition;
  291.     LONG   lStrikeoutSize;
  292.     LONG   lStrikeoutPosition;
  293.     SHORT  sKerningPairs;
  294.     SHORT  sFamilyClass;
  295.     LONG   lMatch;
  296.     LONG   FamilyNameAtom;
  297.     LONG   FaceNameAtom;
  298.     PANOSE panose;
  299. } FONTMETRICS, *PFONTMETRICS;
  300.  
  301. #if defined(INCL_WINATOM)
  302.  
  303. typedef ULONG ATOM;
  304. typedef LHANDLE HATOMTBL;
  305.  
  306. ATOM   APIENTRY WinAddAtom(HATOMTBL hatomtblAtomTbl, PCSZ AtomName);
  307.  
  308. ATOM   APIENTRY WinFindAtom(HATOMTBL hatomtblAtomTbl, PCSZ pszAtomName);
  309.  
  310. #endif
  311.  
  312. #if defined(INCL_WINBUTTONS)
  313.  
  314. #define BS_PUSHBUTTON          0
  315. #define BS_CHECKBOX            1
  316. #define BS_AUTOCHECKBOX        2
  317. #define BS_RADIOBUTTON         3
  318. #define BS_AUTORADIOBUTTON     4
  319. #define BS_3STATE              5
  320. #define BS_AUTO3STATE          6
  321. #define BS_USERBUTTON          7
  322. #define BS_NOTEBOOKBUTTON      8
  323. #define BS_PRIMARYSTYLES  0x000F
  324.  
  325. #define BS_TEXT           0x0010
  326. #define BS_MINIICON       0x0020
  327. #define BS_BITMAP         0x0040
  328. #define BS_ICON           0x0080
  329. #define BS_HELP           0x0100
  330. #define BS_SYSCOMMAND     0x0200
  331. #define BS_DEFAULT        0x0400
  332. #define BS_NOPOINTERFOCUS 0x0800
  333. #define BS_NOBORDER       0x1000
  334. #define BS_NOCURSORSELECT 0x2000
  335. #define BS_AUTOSIZE       0x4000
  336.  
  337. #define BN_CLICKED    1
  338. #define BN_DBLCLICKED 2
  339. #define BN_PAINT      3
  340.  
  341. #define BDS_HILITED  0x0100
  342. #define BDS_DISABLED 0x0200
  343. #define BDS_DEFAULT  0x0400
  344.  
  345. #define BM_CLICK           0x0120
  346. #define BM_QUERYCHECKINDEX 0x0121
  347. #define BM_QUERYHILITE     0x0122
  348. #define BM_SETHILITE       0x0123
  349. #define BM_QUERYCHECK      0x0124
  350. #define BM_SETCHECK        0x0125
  351. #define BM_SETDEFAULT      0x0126
  352. #define BM_AUTOSIZE        0x0128
  353.  
  354. #pragma pack(2)
  355.  
  356. typedef struct _BTNCDATA {
  357.     USHORT  cb;
  358.     USHORT  fsCheckState;
  359.     USHORT  fsHiliteState;
  360.     LHANDLE hImage;
  361. } BTNCDATA, *PBTNCDATA;
  362.  
  363. #pragma pack()
  364.  
  365. typedef struct _USERBUTTON {
  366.     HWND  hwnd;
  367.     HPS   hps;
  368.     ULONG fsState;
  369.     ULONG fsStateOld;
  370. } USERBUTTON, *PUSERBUTTON;
  371.  
  372. #endif
  373.  
  374. #if defined(INCL_WINCLIPBOARD)
  375.  
  376. #define CF_TEXT         1
  377. #define CF_BITMAP       2
  378. #define CF_DSPTEXT      3
  379. #define CF_DSPBITMAP    4
  380. #define CF_METAFILE     5
  381. #define CF_DSPMETAFILE  6
  382. #define CF_PALETTE      9
  383. #define CF_MMPMFIRST   10
  384. #define CF_MMPMLAST    19
  385.  
  386. #define CFI_OWNERFREE    0x0001
  387. #define CFI_OWNERDISPLAY 0x0002
  388. #define CFI_POINTER      0x0400
  389. #define CFI_HANDLE       0x0200
  390.  
  391. #define WM_RENDERFMT        0x0060
  392. #define WM_RENDERALLFMTS    0x0061
  393. #define WM_DESTROYCLIPBOARD 0x0062
  394. #define WM_PAINTCLIPBOARD   0x0063
  395. #define WM_SIZECLIPBOARD    0x0064
  396. #define WM_HSCROLLCLIPBOARD 0x0065
  397. #define WM_VSCROLLCLIPBOARD 0x0066
  398. #define WM_DRAWCLIPBOARD    0x0067
  399.  
  400. BOOL   APIENTRY WinCloseClipbrd(HAB hab);
  401. BOOL   APIENTRY WinEmptyClipbrd(HAB hab);
  402. BOOL   APIENTRY WinOpenClipbrd(HAB hab);
  403. ULONG  APIENTRY WinQueryClipbrdData(HAB hab, ULONG fmt);
  404. BOOL   APIENTRY WinQueryClipbrdFmtInfo(HAB hab, ULONG fmt, PULONG prgfFmtInfo);
  405. HWND   APIENTRY WinQueryClipbrdOwner(HAB hab);
  406. HWND   APIENTRY WinQueryClipbrdViewer(HAB hab);
  407. BOOL   APIENTRY WinSetClipbrdData(HAB hab, ULONG ulh, ULONG ulfmt, ULONG flFmtInfo);
  408. BOOL   APIENTRY WinSetClipbrdOwner(HAB hab, HWND hwnd);
  409. BOOL   APIENTRY WinSetClipbrdViewer(HAB hab, HWND hwndNewClipViewer);
  410.  
  411. #endif
  412.  
  413. #if defined(INCL_WINCURSORS)
  414.  
  415. BOOL  APIENTRY  WinShowCursor(HWND hwnd, BOOL fShow);
  416.  
  417. #endif
  418.  
  419. #if defined(INCL_WINWINDOWMGR) || !defined(INCL_NOCOMMON)
  420.  
  421. #define QW_NEXT       0
  422. #define QW_PREV       1
  423. #define QW_TOP        2
  424. #define QW_BOTTOM     3
  425. #define QW_OWNER      4
  426. #define QW_PARENT     5
  427. #define QW_NEXTTOP    6
  428. #define QW_PREVTOP    7
  429. #define QW_FRAMEOWNER 8
  430.  
  431. #define QWS_USER      0
  432. #define QWS_ID        (-1)
  433. #define QWS_MIN       (-1)
  434.  
  435. #define QWL_USER      0
  436. #define QWL_STYLE     (-2)
  437. #define QWP_PFNWP     (-3)
  438. #define QWL_HMQ       (-4)
  439. #define QWL_RESERVED  (-5)
  440. #define QWL_PENDATA   (-7)
  441. #define QWL_BD_ATTR   (-9)
  442. #define QWL_BD_STAT   (-10)
  443. #define QWL_KBDLAYER  (-11)
  444. #define QWL_MIN       (-11)
  445.  
  446. #define AWP_MINIMIZED  0x00010000
  447. #define AWP_MAXIMIZED  0x00020000
  448. #define AWP_RESTORED   0x00040000
  449. #define AWP_ACTIVATE   0x00080000
  450. #define AWP_DEACTIVATE 0x00100000
  451.  
  452. #define SWP_SIZE            0x0001
  453. #define SWP_MOVE            0x0002
  454. #define SWP_ZORDER          0x0004
  455. #define SWP_SHOW            0x0008
  456. #define SWP_HIDE            0x0010
  457. #define SWP_NOREDRAW        0x0020
  458. #define SWP_NOADJUST        0x0040
  459. #define SWP_ACTIVATE        0x0080
  460. #define SWP_DEACTIVATE      0x0100
  461. #define SWP_EXTSTATECHANGE  0x0200
  462. #define SWP_MINIMIZE        0x0400
  463. #define SWP_MAXIMIZE        0x0800
  464. #define SWP_RESTORE         0x1000
  465. #define SWP_FOCUSACTIVATE   0x2000
  466. #define SWP_FOCUSDEACTIVATE 0x4000
  467. #define SWP_NOAUTOCLOSE     0x8000
  468.  
  469. #define DT_LEFT            0x00000000
  470. #define DT_QUERYEXTENT     0x00000002
  471. #define DT_UNDERSCORE      0x00000010
  472. #define DT_STRIKEOUT       0x00000020
  473. #define DT_TEXTATTRS       0x00000040
  474. #define DT_EXTERNALLEADING 0x00000080
  475. #define DT_CENTER          0x00000100
  476. #define DT_RIGHT           0x00000200
  477. #define DT_TOP             0x00000000
  478. #define DT_VCENTER         0x00000400
  479. #define DT_BOTTOM          0x00000800
  480. #define DT_HALFTONE        0x00001000
  481. #define DT_MNEMONIC        0x00002000
  482. #define DT_WORDBREAK       0x00004000
  483. #define DT_ERASERECT       0x00008000
  484.  
  485. #define PSF_LOCKWINDOWUPDATE 0x0001
  486. #define PSF_CLIPUPWARDS      0x0002
  487. #define PSF_CLIPDOWNWARDS    0x0004
  488. #define PSF_CLIPSIBLINGS     0x0008
  489. #define PSF_CLIPCHILDREN     0x0010
  490. #define PSF_PARENTCLIP       0x0020
  491.  
  492. #define SW_SCROLLCHILDREN 1
  493. #define SW_INVALIDATERGN  2
  494.  
  495. #define DBM_NORMAL     0x0000
  496. #define DBM_INVERT     0x0001
  497. #define DBM_HALFTONE   0x0002
  498. #define DBM_STRETCH    0x0004
  499. #define DBM_IMAGEATTRS 0x0008
  500. #define DBM_XOR        0x0010
  501.  
  502. #define DB_PATCOPY     0x0000
  503. #define DB_PATINVERT   0x0001
  504. #define DB_DESTINVERT  0x0002
  505. #define DB_AREAMIXMODE 0x0003
  506. #define DB_ROP         0x0007
  507. #define DB_INTERIOR    0x0008
  508. #define DB_AREAATTRS   0x0010
  509. #define DB_STANDARD    0x0100
  510. #define DB_DLGBORDER   0x0200
  511.  
  512. typedef LHANDLE HENUM;
  513.  
  514. typedef struct _SWP {
  515.     ULONG fl;
  516.     LONG  cy;
  517.     LONG  cx;
  518.     LONG  y;
  519.     LONG  x;
  520.     HWND  hwndInsertBehind;
  521.     HWND  hwnd;
  522.     ULONG ulReserved1;
  523.     ULONG ulReserved2;
  524. } SWP, *PSWP;
  525.  
  526. HENUM   APIENTRY WinBeginEnumWindows(HWND hwnd);
  527. HPS     APIENTRY WinBeginPaint(HWND hwnd, HPS hps, PRECTL prclPaint);
  528. USHORT  APIENTRY WinCheckButton(HWND hwndDlg, USHORT usId, USHORT usChkstate);
  529. BOOL    APIENTRY WinCheckMenuItem(HWND hwndMenu, USHORT usId, BOOL fCheck);
  530. HWND    APIENTRY WinCreateWindow(HWND hwndParent, PCSZ pszClass, PCSZ pszName, ULONG flStyle,
  531.                    LONG x, LONG y, LONG cx, LONG cy, HWND hwndOwner,
  532.                    HWND hwndInsertBehind, ULONG id, PVOID pCtlData, PVOID pPresParams);
  533. MRESULT APIENTRY WinDefWindowProc(HWND hwnd, ULONG ulMsgid, MPARAM mpParam1, MPARAM mpParam2);
  534. BOOL    APIENTRY WinDestroyWindow(HWND hwnd);
  535. BOOL    APIENTRY WinDrawBitmap(HPS hpsDst, HBITMAP hbm, PRECTL pwrcSrc, PPOINTL pptlDst,
  536.                    LONG clrFore, LONG clrBack, ULONG fl);
  537. BOOL    APIENTRY WinDrawBorder(HPS hps, PRECTL prcl, LONG cx, LONG cy, LONG clrFore,
  538.                    LONG clrBack, ULONG flCmd);
  539. LONG    APIENTRY WinDrawText(HPS hps, LONG cchText, PCH lpchText,
  540.                    PRECTL prcl, LONG clrFore, LONG clrBack, ULONG flCmd);
  541.  
  542. BOOL    APIENTRY WinEnableWindow(HWND hwnd, BOOL fNewEnabled);
  543. BOOL    APIENTRY WinEnableWindowUpdate(HWND hwnd, BOOL fEnable);
  544. BOOL    APIENTRY WinEndEnumWindows(HENUM henum);
  545. BOOL    APIENTRY WinEndPaint(HPS hps);
  546. LONG    APIENTRY WinExcludeUpdateRegion(HPS hps, HWND hwnd);
  547. BOOL    APIENTRY WinFillRect(HPS hps, PRECTL prcl, LONG lColor);
  548. HPS     APIENTRY WinGetClipPS(HWND hwnd, HWND hwndClipWindow, ULONG ulClipflags);
  549. HWND    APIENTRY WinGetNextWindow(HENUM henum);
  550. HPS     APIENTRY WinGetPS(HWND hwnd);
  551. HPS     APIENTRY WinGetScreenPS(HWND hwndDeskTop);
  552. HAB     APIENTRY WinInitialize(ULONG fsOptions);
  553. BOOL    APIENTRY WinInvalidateRect(HWND hwnd, PRECTL pwrc, BOOL fIncludeChildren);
  554. BOOL    APIENTRY WinInvalidateRegion(HWND hwnd, HRGN hrgn, BOOL fIncludeChildren);
  555. BOOL    APIENTRY WinInvertRect(HPS hps, PRECTL prclRect);
  556. BOOL    APIENTRY WinIsChild(HWND hwnd, HWND hwndParent);
  557. BOOL    APIENTRY WinIsControlEnabled(HWND hwndDlg, USHORT usId);
  558. BOOL    APIENTRY WinIsMenuItemChecked(HWND hwndMenu, USHORT usId);
  559. BOOL    APIENTRY WinIsMenuItemEnabled(HWND hwndMenu, USHORT usId);
  560. BOOL    APIENTRY WinIsMenuItemValid(HWND hwndMenu, USHORT usId);
  561. BOOL    APIENTRY WinIsThreadActive(HAB hab);
  562. BOOL    APIENTRY WinIsWindow(HAB hab, HWND hwnd);
  563. BOOL    APIENTRY WinIsWindowEnabled(HWND hwnd);
  564. BOOL    APIENTRY WinIsWindowShowing(HWND hwnd);
  565. BOOL    APIENTRY WinIsWindowVisible(HWND hwnd);
  566. LONG    APIENTRY WinLoadMessage(HAB hab, HMODULE hmodMod, ULONG ulId, LONG lcchMax, PSZ pBuffer);
  567. LONG    APIENTRY WinLoadString(HAB hab, HMODULE hmodMod, ULONG ulId, LONG lcchMax, PSZ pBuffer);
  568. BOOL    APIENTRY WinLockVisRegions(HWND hwndDesktop, BOOL fLock);
  569. BOOL    APIENTRY WinLockWindowUpdate(HWND hwndDeskTop, HWND hwndLockUpdate);
  570. BOOL    APIENTRY WinMapWindowPoints(HWND hwndFrom, HWND hwndTo, PPOINTL prgptl, LONG cwpt);
  571. LONG    APIENTRY WinMultWindowFromIDs(HWND hwndParent, PHWND prghwnd,
  572.                    ULONG idFirst, ULONG idLast);
  573. HDC     APIENTRY WinOpenWindowDC(HWND hwnd);
  574. BOOL    APIENTRY WinPopupMenu(HWND hwndParent, HWND hwndOwner, HWND hwndMenu,
  575.                    LONG x, LONG y, LONG idItem, ULONG fs);
  576. HAB     APIENTRY WinQueryAnchorBlock(HWND hwnd);
  577.  
  578. HWND    APIENTRY WinQueryDesktopWindow(HAB hab, HDC hdc);
  579.  
  580. BOOL    APIENTRY WinQueryUpdateRect(HWND hwnd, PRECTL prclPrc);
  581. LONG    APIENTRY WinQueryUpdateRegion(HWND hwnd, HRGN hrgn);
  582. ULONG   APIENTRY WinQueryVersion(HAB hab);
  583. HWND    APIENTRY WinQueryWindow(HWND hwnd, LONG lCode);
  584. HDC     APIENTRY WinQueryWindowDC(HWND hwnd);
  585. BOOL    APIENTRY WinQueryWindowPos(HWND hwnd, PSWP pswp);
  586. BOOL    APIENTRY WinQueryWindowProcess(HWND hwnd, PPID ppid, PTID ptid);
  587. PVOID   APIENTRY WinQueryWindowPtr(HWND hwnd, LONG index);
  588. BOOL    APIENTRY WinQueryWindowRect(HWND hwnd, PRECTL prclDest);
  589. LONG    APIENTRY WinQueryWindowText(HWND hwnd, LONG lLength, PCH pun);
  590. LONG    APIENTRY WinQueryWindowTextLength(HWND hwnd);
  591. ULONG   APIENTRY WinQueryWindowULong(HWND hwnd, LONG index);
  592. USHORT  APIENTRY WinQueryWindowUShort(HWND hwnd, LONG index);
  593.  
  594. BOOL    APIENTRY WinRegisterClass(HAB hab, PCSZ pszClassName, PFNWP pfnWndProc,
  595.                    ULONG flStyle, ULONG cbWindowData);
  596. BOOL    APIENTRY WinReleasePS(HPS hps);
  597.  
  598. LONG    APIENTRY WinScrollWindow(HWND hwnd, LONG lDx, LONG lDy, PRECTL prclScroll,
  599.                    PRECTL prclClip, HRGN hrgnUpdateRgn, PRECTL prclUpdate, ULONG flOptions);
  600.  
  601. MRESULT APIENTRY WinSendMsg(HWND hwnd, ULONG ulMsgid, MPARAM mpParam1, MPARAM mpParam2);
  602.  
  603. BOOL    APIENTRY WinSetActiveWindow(HWND hwndDeskTop, HWND hwnd);
  604.  
  605. BOOL    APIENTRY WinSetOwner(HWND hwnd, HWND hwndNewOwner);
  606. BOOL    APIENTRY WinSetParent(HWND hwnd, HWND hwndNewParent, BOOL fRedraw);
  607. BOOL    APIENTRY WinSetSysModalWindow(HWND hwndDesktop, HWND hwnd);
  608. BOOL    APIENTRY WinSetWindowBits(HWND hwnd, LONG index, ULONG flData, ULONG flMask);
  609. BOOL    APIENTRY WinSetWindowPos(HWND hwnd, HWND hwndInsertBehind, LONG x, LONG y,
  610.                    LONG cx, LONG cy, ULONG fl);
  611. BOOL    APIENTRY WinSetWindowPtr(HWND hwnd, LONG lb, PVOID pp);
  612. BOOL    APIENTRY WinSetWindowText(HWND hwnd, PCSZ pszString);
  613. BOOL    APIENTRY WinSetWindowULong(HWND hwnd, LONG index, ULONG ul);
  614. BOOL    APIENTRY WinSetWindowUShort(HWND hwnd, LONG index, USHORT us);
  615. BOOL    APIENTRY WinShowWindow(HWND hwnd, BOOL fNewVisibility);
  616.  
  617. PFNWP   APIENTRY WinSubclassWindow(HWND hwnd, PFNWP pNewWindowProc);
  618. BOOL    APIENTRY WinTerminate(HAB hab);
  619.  
  620. BOOL    APIENTRY WinUpdateWindow(HWND hwnd);
  621. BOOL    APIENTRY WinValidateRect(HWND hwnd, PRECTL prclRect, BOOL fIncludeClippedChildren);
  622. BOOL    APIENTRY WinValidateRegion(HWND hwnd, HRGN hrgn, BOOL fIncludeClippedChildren);
  623. HWND    APIENTRY WinWindowFromDC(HDC hdc);
  624. HWND    APIENTRY WinWindowFromID(HWND hwndParent, ULONG id);
  625. HWND    APIENTRY WinWindowFromPoint(HWND hwndParent, PPOINTL pptlPoint, BOOL fEnumChildren);
  626.  
  627. #endif
  628.  
  629. #if defined(INCL_WINWINDOWMGR)
  630.  
  631. typedef struct _CLASSINFO {
  632.     ULONG     flClassStyle;
  633.     PFNWP     pfnWindowProc;
  634.     ULONG     cbWindowData;
  635. } CLASSINFO, *PCLASSINFO;
  636.  
  637. typedef struct _CREATESTRUCT {
  638.     PVOID pPresParams;
  639.     PVOID pCtlData;
  640.     ULONG id;
  641.     HWND  hwndInsertBehind;
  642.     HWND  hwndOwner;
  643.     LONG  cy;
  644.     LONG  cx;
  645.     LONG  y;
  646.     LONG  x;
  647.     ULONG flStyle;
  648.     PSZ   pszText;
  649.     PSZ   pszClass;
  650.     HWND  hwndParent;
  651. } CREATESTRUCT, *PCREATESTRUCT;
  652.  
  653. HWND    APIENTRY WinQueryActiveWindow(HWND hwndParent);
  654. BOOL    APIENTRY WinQueryClassInfo(HAB hab, PCSZ PSZClassName, PCLASSINFO PclsiClassInfo);
  655. LONG    APIENTRY WinQueryClassName(HWND hwnd, LONG lLength, PCH PCHBuffer);
  656.  
  657. #endif
  658.  
  659. #if defined(INCL_WINMESSAGEMGR) || !defined(INCL_NOCOMMON)
  660.  
  661. #define PM_REMOVE   1
  662. #define PM_NOREMOVE 0
  663.  
  664. #define CMDSRC_PUSHBUTTON  1
  665. #define CMDSRC_MENU        2
  666. #define CMDSRC_ACCELERATOR 3
  667. #define CMDSRC_FONTDLG     4
  668. #define CMDSRC_FILEDLG     5
  669. #define CMDSRC_PRINTDLG    6
  670. #define CMDSRC_COLORDLG    7
  671. #define CMDSRC_OTHER       0
  672.  
  673. #define WM_NULL                 0x0000
  674. #define WM_CREATE               0x0001
  675. #define WM_DESTROY              0x0002
  676. #define WM_ENABLE               0x0004
  677. #define WM_SHOW                 0x0005
  678. #define WM_MOVE                 0x0006
  679. #define WM_SIZE                 0x0007
  680. #define WM_ADJUSTWINDOWPOS      0x0008
  681. #define WM_CALCVALIDRECTS       0x0009
  682. #define WM_SETWINDOWPARAMS      0x000a
  683. #define WM_QUERYWINDOWPARAMS    0x000b
  684. #define WM_HITTEST              0x000c
  685. #define WM_ACTIVATE             0x000d
  686. #define WM_SETFOCUS             0x000f
  687. #define WM_SETSELECTION         0x0010
  688. #define WM_PPAINT               0x0011
  689. #define WM_PSETFOCUS            0x0012
  690. #define WM_PSYSCOLORCHANGE      0x0013
  691. #define WM_PSIZE                0x0014
  692. #define WM_PACTIVATE            0x0015
  693. #define WM_PCONTROL             0x0016
  694. #define WM_COMMAND              0x0020
  695. #define WM_SYSCOMMAND           0x0021
  696. #define WM_HELP                 0x0022
  697. #define WM_PAINT                0x0023
  698. #define WM_TIMER                0x0024
  699. #define WM_SEM1                 0x0025
  700. #define WM_SEM2                 0x0026
  701. #define WM_SEM3                 0x0027
  702. #define WM_SEM4                 0x0028
  703. #define WM_CLOSE                0x0029
  704. #define WM_QUIT                 0x002a
  705. #define WM_SYSCOLORCHANGE       0x002b
  706. #define WM_SYSVALUECHANGED      0x002d
  707. #define WM_APPTERMINATENOTIFY   0x002e
  708. #define WM_PRESPARAMCHANGED     0x002f
  709. #define WM_CONTROL              0x0030
  710. #define WM_VSCROLL              0x0031
  711. #define WM_HSCROLL              0x0032
  712. #define WM_INITMENU             0x0033
  713. #define WM_MENUSELECT           0x0034
  714. #define WM_MENUEND              0x0035
  715. #define WM_DRAWITEM             0x0036
  716. #define WM_MEASUREITEM          0x0037
  717. #define WM_CONTROLPOINTER       0x0038
  718. #define WM_QUERYDLGCODE         0x003a
  719. #define WM_INITDLG              0x003b
  720. #define WM_SUBSTITUTESTRING     0x003c
  721. #define WM_MATCHMNEMONIC        0x003d
  722. #define WM_SAVEAPPLICATION      0x003e
  723. #define WM_SEMANTICEVENT        0x0490
  724. #define WM_HELPBASE             0x0F00
  725. #define WM_HELPTOP              0x0FFF
  726. #define WM_USER                 0x1000
  727.  
  728. typedef LHANDLE HMQ, *PHMQ;
  729.  
  730. typedef struct _QMSG {
  731.     HWND  hwnd;
  732.     USHORT msg;
  733.     MPARAM mp1;
  734.     MPARAM mp2;
  735.     ULONG  time;
  736.     POINTL ptl;
  737. } QMSG, *PQMSG;
  738.  
  739. HMQ     APIENTRY WinCreateMsgQueue(HAB hab, LONG lQueuesize);
  740.  
  741. BOOL    APIENTRY WinDestroyMsgQueue(HMQ hmq);
  742.  
  743. MRESULT APIENTRY WinDispatchMsg(HAB hab, PQMSG pqmsgMsg);
  744.  
  745. BOOL    APIENTRY WinGetMsg(HAB hab, PQMSG pqmsgmsg, HWND hwndFltr, ULONG ulFirst, ULONG ulLast);
  746.  
  747. BOOL    APIENTRY WinPeekMsg(HAB hab, PQMSG pqmsg, HWND hwndFilter, ULONG ulFirst,
  748.                    ULONG ulLast, ULONG flOptions);
  749. BOOL    APIENTRY WinPostMsg(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
  750. BOOL    APIENTRY WinPostQueueMsg(HMQ hmq, ULONG msg, MPARAM mp1, MPARAM mp2);
  751.  
  752. BOOL    APIENTRY WinQueryMsgPos(HAB hab, PPOINTL pptl);
  753. BOOL    APIENTRY WinQueryMsgTime(HAB hab);
  754.  
  755. APIRET  APIENTRY WinWaitEventSem(HEV hev, ULONG ulTimeout);
  756. BOOL    APIENTRY WinWaitMsg(HAB hab, ULONG ulFirst, ULONG ulLast);
  757. APIRET  APIENTRY WinWaitMuxWaitSem(HMUX hmux, ULONG ulTimeout, PULONG pulUser);
  758.  
  759. #endif
  760.  
  761. #if defined(INCL_WINCURSORS)
  762.  
  763. #define CURSOR_SOLID       0x0000
  764. #define CURSOR_HALFTONE    0x0001
  765. #define CURSOR_FRAME       0x0002
  766. #define CURSOR_FLASH       0x0004
  767. #define CURSOR_SETPOS      0x8000
  768. #define CURSOR_BIDI_FIRST  0x0100
  769. #define CURSOR_BIDI_LAST   0x0200
  770.  
  771. typedef struct _CURSORINFO {
  772.     HWND  hwnd;
  773.     LONG  x;
  774.     LONG  y;
  775.     LONG  cx;
  776.     LONG  cy;
  777.     ULONG fs;
  778.     RECTL rclClip;
  779. } CURSORINFO, *PCURSORINFO;
  780.  
  781. BOOL   APIENTRY WinCreateCursor(HWND hwnd, LONG lx, LONG ly, LONG lcx, LONG lcy,
  782.                    ULONG ulrgf, PRECTL prclClip);
  783. BOOL   APIENTRY WinDestroyCursor(HWND hwnd);
  784.  
  785. #endif
  786.  
  787. #if defined(INCL_WINDDE)
  788.  
  789. #define DDE_FACK         0x0001
  790. #define DDE_FBUSY        0x0002
  791. #define DDE_FNODATA      0x0004
  792. #define DDE_FACKREQ      0x0008
  793. #define DDE_FRESPONSE    0x0010
  794. #define DDE_NOTPROCESSED 0x0020
  795. #define DDE_FRESERVED    0x00C0
  796. #define DDE_FAPPSTATUS   0xFF00
  797.  
  798. #define DDEPM_RETRY  1
  799. #define DDEPM_NOFREE 2
  800.  
  801. #define DDEFMT_TEXT  1
  802.  
  803. #define DDECTXT_CASESENSITIVE 1
  804.  
  805. #define DDES_PSZITEMNAME(pddes)  (((PSZ)pddes) + ((PDDESTRUCT)pddes)->offszItemName)
  806. #define DDES_PABDATA(pddes)      (((PBYTE)pddes) + ((PDDESTRUCT)pddes)->offabData)
  807. #define DDEI_PCONVCONTEXT(pddei) ((PCONVCONTEXT)((PBYTE)pddei + pddei->offConvContext))
  808.  
  809. #define WM_DDE_FIRST       0x00A0
  810. #define WM_DDE_INITIATE    0x00A0
  811. #define WM_DDE_REQUEST     0x00A1
  812. #define WM_DDE_ACK         0x00A2
  813. #define WM_DDE_DATA        0x00A3
  814. #define WM_DDE_ADVISE      0x00A4
  815. #define WM_DDE_UNADVISE    0x00A5
  816. #define WM_DDE_POKE        0x00A6
  817. #define WM_DDE_EXECUTE     0x00A7
  818. #define WM_DDE_TERMINATE   0x00A8
  819. #define WM_DDE_INITIATEACK 0x00A9
  820. #define WM_DDE_LAST        0x00AF
  821.  
  822. typedef struct _DDESTRUCT {
  823.     ULONG  cbData;
  824.     USHORT fsStatus;
  825.     USHORT usFormat;
  826.     USHORT offszItemName;
  827.     USHORT offabData;
  828. } DDESTRUCT, *PDDESTRUCT;
  829.  
  830. typedef struct _CONVCONTEXT {
  831.     ULONG  cb;
  832.     ULONG fsContext;
  833.     ULONG idCountry;
  834.     ULONG usCodepage;
  835.     ULONG usLangID;
  836.     ULONG usSubLangID;
  837. } CONVCONTEXT, *PCONVCONTEXT;
  838.  
  839. typedef struct _DDEINIT {
  840.     ULONG cb;
  841.     PSZ   pszAppName;
  842.     PSZ   pszTopic;
  843.     ULONG offConvContext;
  844. } DDEINIT, *PDDEINIT;
  845.  
  846. BOOL    APIENTRY WinDdeInitiate(HWND hwndClient, PCSZ pszAppName,
  847.                    PCSZ pszTopicName, PCONVCONTEXT pContext);
  848. BOOL    APIENTRY WinDdePostMsg(HWND hwndTo, HWND hwndFrom, ULONG usMsgId,
  849.                    PDDESTRUCT pData, ULONG ulOptions);
  850. MRESULT APIENTRY WinDdeRespond(HWND hwndClient, HWND hwndServer,
  851.                    PCSZ pszAppName, PCSZ pszTopicName, PCONVCONTEXT pContext);
  852.  
  853. #endif
  854.  
  855. #if defined(INCL_WINDIALOGS)
  856.  
  857. #define DID_OK     1
  858. #define DID_CANCEL 2
  859. #define DID_ERROR  0xffff
  860.  
  861. #define WA_WARNING    0
  862. #define WA_NOTE       1
  863. #define WA_ERROR      2
  864. #define WA_CWINALARMS 3
  865.  
  866. #define MB_OK               0x0000
  867. #define MB_OKCANCEL         0x0001
  868. #define MB_RETRYCANCEL      0x0002
  869. #define MB_ABORTRETRYIGNORE 0x0003
  870. #define MB_YESNO            0x0004
  871. #define MB_YESNOCANCEL      0x0005
  872. #define MB_CANCEL           0x0006
  873. #define MB_ENTER            0x0007
  874. #define MB_ENTERCANCEL      0x0008
  875.  
  876. #define MB_NOICON           0x0000
  877. #define MB_CUANOTIFICATION  0x0000
  878. #define MB_ICONQUESTION     0x0010
  879. #define MB_ICONEXCLAMATION  0x0020
  880. #define MB_CUAWARNING       0x0020
  881. #define MB_ICONASTERISK     0x0030
  882. #define MB_ICONHAND         0x0040
  883. #define MB_CUACRITICAL      0x0040
  884. #define MB_QUERY            MB_ICONQUESTION
  885. #define MB_WARNING          MB_CUAWARNING
  886. #define MB_INFORMATION      MB_ICONASTERISK
  887. #define MB_CRITICAL         MB_CUACRITICAL
  888. #define MB_ERROR            MB_CRITICAL
  889.  
  890. #define MB_DEFBUTTON1       0x0000
  891. #define MB_DEFBUTTON2       0x0100
  892. #define MB_DEFBUTTON3       0x0200
  893.  
  894. #define MB_APPLMODAL        0x0000
  895. #define MB_SYSTEMMODAL      0x1000
  896. #define MB_HELP             0x2000
  897. #define MB_MOVEABLE         0x4000
  898.  
  899. #define MBID_OK             1
  900. #define MBID_CANCEL         2
  901. #define MBID_ABORT          3
  902. #define MBID_RETRY          4
  903. #define MBID_IGNORE         5
  904. #define MBID_YES            6
  905. #define MBID_NO             7
  906. #define MBID_HELP           8
  907. #define MBID_ENTER          9
  908. #define MBID_ERROR          (-1)
  909.  
  910. #pragma pack(2)
  911.  
  912. typedef struct _DLGTITEM {
  913.     USHORT fsItemStatus;
  914.     USHORT cChildren;
  915.     USHORT cchClassName;
  916.     USHORT offClassName;
  917.     USHORT cchText;
  918.     USHORT offText;
  919.     ULONG  flStyle;
  920.     SHORT  x;
  921.     SHORT  y;
  922.     SHORT  cx;
  923.     SHORT  cy;
  924.     USHORT id;
  925.     USHORT offPresParams;
  926.     USHORT offCtlData;
  927. } DLGTITEM, *PDLGITEM;
  928.  
  929. typedef struct _DLGTEMPLATE {
  930.     USHORT   cbTemplate;
  931.     USHORT   type;
  932.     USHORT   codepage;
  933.     USHORT   offadlgti;
  934.     USHORT   fsTemplateStatus;
  935.     USHORT   iItemFocus;
  936.     USHORT   coffPresParams;
  937.     DLGTITEM adlgti[1];
  938. } DLGTEMPLATE, *PDLGTEMPLATE;
  939.  
  940. #pragma pack()
  941.  
  942. HWND    APIENTRY WinCreateDlg(HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc,
  943.                    PDLGTEMPLATE pdlgt, PVOID pCreateParams);
  944. MRESULT APIENTRY WinDefDlgProc(HWND hwndDlg, ULONG msg, MPARAM mp1, MPARAM mp2);
  945. USHORT  APIENTRY WinMessageBox(HWND hwndParent, HWND hwndOwner, PSZ pszText, PSZ pszTitle,
  946.                     USHORT usWindow, USHORT fsStyle);
  947. BOOL    APIENTRY WinDismissDlg(HWND hwndDlg, ULONG usResult);
  948.  
  949. HWND    APIENTRY WinLoadDlg(HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc,
  950.                     HMODULE hmod, ULONG idDlg, PVOID pCreateParams);
  951. BOOL    APIENTRY WinMapDlgPoints(HWND hwndDlg, PPOINTL prgwptl, ULONG cwpt, BOOL fCalcWinCoords);
  952.  
  953. ULONG   APIENTRY WinProcessDlg(HWND hwndDlg);
  954.  
  955. BOOL    APIENTRY WinQueryDlgItemShort(HWND hwndDlg, ULONG idItem, PSHORT psResult, BOOL fSigned);
  956. ULONG   APIENTRY WinQueryDlgItemText(HWND hwndDlg, ULONG idItem, LONG lMaxText, PSZ pszText);
  957. LONG    APIENTRY WinQueryDlgItemTextLength(HWND hwndDlg, ULONG idItem);
  958.  
  959. BOOL    APIENTRY WinSetDlgItemText(HWND hwndDlg, ULONG idItem, PCSZ pszText);
  960.  
  961. #endif
  962.  
  963. #if defined(INCL_WINENTRYFIELDS)
  964.  
  965. #define ES_LEFT       0x00000000
  966. #define ES_CENTER     0x00000001
  967. #define ES_RIGHT      0x00000002
  968. #define ES_AUTOSCROLL 0x00000004
  969. #define ES_MARGIN     0x00000008
  970. #define ES_AUTOTAB    0x00000010
  971. #define ES_READONLY   0x00000020
  972. #define ES_COMMAND    0x00000040
  973. #define ES_UNREADABLE 0x00000080
  974. #define ES_AUTOSIZE   0x00000200
  975.  
  976. #define ES_ANY        0x00000000
  977. #define ES_SBCS       0x00001000
  978. #define ES_DBCS       0x00002000
  979. #define ES_MIXED      0x00003000
  980.  
  981. #define CBM_SHOWLIST      0x0170
  982. #define CBM_HILITE        0x0171
  983. #define CBM_ISLISTSHOWING 0x0172
  984.  
  985. #define CBID_LIST 0x029A
  986. #define CBID_EDIT 0x029B
  987.  
  988. #define CBN_EFCHANGE 1
  989. #define CBN_EFSCROLL 2
  990. #define CBN_MEMERROR 3
  991. #define CBN_LBSELECT 4
  992. #define CBN_LBSCROLL 5
  993. #define CBN_SHOWLIST 6
  994. #define CBN_ENTER    7
  995.  
  996. #define CBS_SIMPLE       1
  997. #define CBS_DROPDOWN     2
  998. #define CBS_DROPDOWNLIST 4
  999. #define CBS_COMPATIBLE   8
  1000.  
  1001. #define EN_SETFOCUS         0x0001
  1002. #define EN_KILLFOCUS        0x0002
  1003. #define EN_CHANGE           0x0004
  1004. #define EN_SCROLL           0x0008
  1005. #define EN_MEMERROR         0x0010
  1006. #define EN_OVERFLOW         0x0020
  1007. #define EN_INSERTMODETOGGLE 0x0040
  1008.  
  1009. #define EM_QUERYCHANGED   0x0140
  1010. #define EM_QUERYSEL       0x0141
  1011. #define EM_SETSEL         0x0142
  1012. #define EM_SETTEXTLIMIT   0x0143
  1013. #define EM_CUT            0x0144
  1014. #define EM_COPY           0x0145
  1015. #define EM_CLEAR          0x0146
  1016. #define EM_PASTE          0x0147
  1017. #define EM_QUERYFIRSTCHAR 0x0148
  1018. #define EM_SETFIRSTCHAR   0x0149
  1019. #define EM_QUERYREADONLY  0x014a
  1020. #define EM_SETREADONLY    0x014b
  1021. #define EM_SETINSERTMODE  0x014c
  1022.  
  1023. #pragma pack(2)
  1024.  
  1025. typedef struct _COMBOCDATA {
  1026.     ULONG cbSize;
  1027.     ULONG reserved;
  1028.     PVOID pHWXCtlData;
  1029. } COMBOCDATA, *PCOMBOCDATA;
  1030.  
  1031. typedef struct _ENTRYFDATA {
  1032.     USHORT cb;
  1033.     USHORT cchEditLimit;
  1034.     USHORT ichMinSel;
  1035.     USHORT ichMaxSel;
  1036.     PVOID  pHWXCtlData;
  1037. } ENTRYFDATA, *PENTRYFDATA;
  1038.  
  1039. #pragma pack()
  1040.  
  1041. #endif
  1042.  
  1043. #if defined(INCL_WINERRORS)
  1044.  
  1045. #include <pmerr.h>
  1046.  
  1047. typedef ULONG   ERRORID, *PERRORID;
  1048.  
  1049. typedef struct _ERRINFO {
  1050.     USHORT  cbFixedErrInfo;
  1051.     ERRORID idError;
  1052.     USHORT  cDetailLevel;
  1053.     USHORT  offaoffszMsg;
  1054.     USHORT  offBinaryData;
  1055. } ERRINFO, *PERRINFO;
  1056.  
  1057. BOOL     APIENTRY WinFreeErrorInfo(PERRINFO perrinfo);
  1058. PERRINFO APIENTRY WinGetErrorInfo(HAB hab);
  1059. ERRORID  APIENTRY WinGetLastError(HAB hab);
  1060.  
  1061. #endif
  1062.  
  1063. #if defined(INCL_WINFRAMECTLS)
  1064.  
  1065. #define TBM_SETHILITE   0x01e3
  1066. #define TBM_QUERYHILITE 0x01e4
  1067.  
  1068. #endif
  1069.  
  1070. #if defined(INCL_WINFRAMEMGR) || !defined(INCL_NOCOMMON)
  1071.  
  1072. #define FCF_TITLEBAR        0x00000001
  1073. #define FCF_SYSMENU         0x00000002
  1074. #define FCF_MENU            0x00000004
  1075. #define FCF_SIZEBORDER      0x00000008
  1076. #define FCF_MINBUTTON       0x00000010
  1077. #define FCF_MAXBUTTON       0x00000020
  1078. #define FCF_MINMAX          0x00000030
  1079. #define FCF_VERTSCROLL      0x00000040
  1080. #define FCF_HORZSCROLL      0x00000080
  1081. #define FCF_DLGBORDER       0x00000100
  1082. #define FCF_BORDER          0x00000200
  1083. #define FCF_SHELLPOSITION   0x00000400
  1084. #define FCF_TASKLIST        0x00000800
  1085. #define FCF_NOBYTEALIGN     0x00001000
  1086. #define FCF_NOMOVEWITHOWNER 0x00002000
  1087. #define FCF_ICON            0x00004000
  1088. #define FCF_ACCELTABLE      0x00008000
  1089. #define FCF_SYSMODAL        0x00010000
  1090. #define FCF_SCREENALIGN     0x00020000
  1091. #define FCF_MOUSEALIGN      0x00040000
  1092. #define FCF_HIDEBUTTON      0x01000000
  1093. #define FCF_HIDEMAX         0x01000020
  1094. #define FCF_CLOSEBUTTON     0x04000000
  1095. #define FCF_AUTOICON        0x40000000
  1096. #define FCF_DBE_APPSTAT     0x80000000
  1097.  
  1098. #define FCF_STANDARD        0x0000CC3F
  1099.  
  1100. #define FS_ICON            0x00000001
  1101. #define FS_ACCELTABLE      0x00000002
  1102. #define FS_SHELLPOSITION   0x00000004
  1103. #define FS_TASKLIST        0x00000008
  1104. #define FS_NOBYTEALIGN     0x00000010
  1105. #define FS_NOMOVEWITHOWNER 0x00000020
  1106. #define FS_SYSMODAL        0x00000040
  1107. #define FS_DLGBORDER       0x00000080
  1108. #define FS_BORDER          0x00000100
  1109. #define FS_SCREENALIGN     0x00000200
  1110. #define FS_MOUSEALIGN      0x00000400
  1111. #define FS_SIZEBORDER      0x00000800
  1112. #define FS_AUTOICON        0x00001000
  1113. #define FS_DBE_APPSTAT     0x00008000
  1114.  
  1115. #define FS_STANDARD        0x0000000F
  1116.  
  1117. #define FF_FLASHWINDOW     0x0001
  1118. #define FF_ACTIVE          0x0002
  1119. #define FF_FLASHHILITE     0x0004
  1120. #define FF_OWNERHIDDEN     0x0008
  1121. #define FF_DLGDISMISSED    0x0010
  1122. #define FF_OWNERDISABLED   0x0020
  1123. #define FF_SELECTED        0x0040
  1124. #define FF_NOACTIVATESWP   0x0080
  1125. #define FF_DIALOGBOX       0x0100
  1126.  
  1127. #define FI_FRAME           1
  1128. #define FI_OWNERHIDE       2
  1129. #define FI_ACTIVATEOK      4
  1130. #define FI_NOMOVEWITHOWNER 8
  1131.  
  1132. #define FID_SYSMENU      0x8002
  1133. #define FID_TITLEBAR     0x8003
  1134. #define FID_MINMAX       0x8004
  1135. #define FID_MENU         0x8005
  1136. #define FID_VERTSCROLL   0x8006
  1137. #define FID_HORZSCROLL   0x8007
  1138. #define FID_CLIENT       0x8008
  1139. #define FID_DBE_APPSTAT  0x8010
  1140. #define FID_DBE_KBDSTAT  0x8011
  1141. #define FID_DBE_PECIC    0x8012
  1142. #define FID_DBE_KKPOPUP  0x8013
  1143.  
  1144. #define SC_SIZE           0x8000
  1145. #define SC_MOVE           0x8001
  1146. #define SC_MINIMIZE       0x8002
  1147. #define SC_MAXIMIZE       0x8003
  1148. #define SC_CLOSE          0x8004
  1149. #define SC_NEXT           0x8005
  1150. #define SC_APPMENU        0x8006
  1151. #define SC_SYSMENU        0x8007
  1152. #define SC_RESTORE        0x8008
  1153. #define SC_NEXTFRAME      0x8009
  1154. #define SC_NEXTWINDOW     0x8010
  1155. #define SC_TASKMANAGER    0x8011
  1156. #define SC_HELPKEYS       0x8012
  1157. #define SC_HELPINDEX      0x8013
  1158. #define SC_HELPEXTENDED   0x8014
  1159. #define SC_SWITCHPANELIDS 0x8015
  1160. #define SC_DBE_FIRST      0x8018
  1161. #define SC_DBE_LAST       0x801F
  1162. #define SC_BEGINDRAG      0x8020
  1163. #define SC_ENDDRAG        0x8021
  1164. #define SC_SELECT         0x8022
  1165. #define SC_OPEN           0x8023
  1166. #define SC_CONTEXTMENU    0x8024
  1167. #define SC_CONTEXTHELP    0x8025
  1168. #define SC_TEXTEDIT       0x8026
  1169. #define SC_BEGINSELECT    0x8027
  1170. #define SC_ENDSELECT      0x8028
  1171. #define SC_WINDOW         0x8029
  1172. #define SC_HIDE           0x802a
  1173.  
  1174.  
  1175. #define WM_FLASHWINDOW        0x0040
  1176. #define WM_FORMATFRAME        0x0041
  1177. #define WM_UPDATEFRAME        0x0042
  1178. #define WM_FOCUSCHANGE        0x0043
  1179.  
  1180. #define WM_SETBORDERSIZE      0x0044
  1181. #define WM_TRACKFRAME         0x0045
  1182. #define WM_MINMAXFRAME        0x0046
  1183. #define WM_SETICON            0x0047
  1184. #define WM_QUERYICON          0x0048
  1185. #define WM_SETACCELTABLE      0x0049
  1186. #define WM_QUERYACCELTABLE    0x004a
  1187. #define WM_TRANSLATEACCEL     0x004b
  1188. #define WM_QUERYTRACKINFO     0x004c
  1189. #define WM_QUERYBORDERSIZE    0x004d
  1190. #define WM_NEXTMENU           0x004e
  1191. #define WM_ERASEBACKGROUND    0x004f
  1192. #define WM_QUERYFRAMEINFO     0x0050
  1193. #define WM_QUERYFOCUSCHAIN    0x0051
  1194. #define WM_OWNERPOSCHANGE     0x0052
  1195. #define WM_CALCFRAMERECT      0x0053
  1196.  
  1197. #define WM_WINDOWPOSCHANGED   0x0055
  1198. #define WM_ADJUSTFRAMEPOS     0x0056
  1199. #define WM_QUERYFRAMECTLCOUNT 0x0059
  1200.  
  1201. #define WM_QUERYHELPINFO      0x005B
  1202. #define WM_SETHELPINFO        0x005C
  1203. #define WM_ERROR              0x005D
  1204. #define WM_REALIZEPALETTE     0x005E
  1205.  
  1206. #pragma pack(2)
  1207.  
  1208. typedef struct _FRAMECDATA {
  1209.     USHORT cb;
  1210.     ULONG  flCreateFlags;
  1211.     USHORT hmodResources;
  1212.     USHORT idResources;
  1213. } FRAMECDATA;
  1214.  
  1215. #pragma pack()
  1216.  
  1217. BOOL   APIENTRY WinCalcFrameRect(HWND hwndFrame, PRECTL prcl, BOOL fClient);
  1218.  
  1219. HWND   APIENTRY WinCreateStdWindow(HWND hwndParent, ULONG flStyle, PULONG pflCreateFlags,
  1220.                    PCSZ pszClassClient, PCSZ pszTitle, ULONG flStyleClient, HMODULE Resource,
  1221.                    ULONG ulId, PHWND phwndClient);
  1222.  
  1223. #endif
  1224.  
  1225. #if defined(INCL_WINHELP)
  1226.  
  1227. #include <pmhelp.h>
  1228.  
  1229. #endif
  1230.  
  1231. #if defined(INCL_WINHOOKS)
  1232.  
  1233. #define HK_SENDMSG          0
  1234. #define HK_INPUT            1
  1235. #define HK_MSGFILTER        2
  1236. #define HK_JOURNALRECORD    3
  1237. #define HK_JOURNALPLAYBACK  4
  1238. #define HK_HELP             5
  1239. #define HK_LOADER           6
  1240. #define HK_REGISTERUSERMSG  7
  1241. #define HK_MSGCONTROL       8
  1242. #define HK_PLIST_ENTRY      9
  1243. #define HK_PLIST_EXIT      10
  1244. #define HK_FINDWORD        11
  1245. #define HK_CODEPAGECHANGED 12
  1246. #define HK_WINDOWDC        15
  1247. #define HK_DESTROYWINDOW   16
  1248. #define HK_CHECKMSGFILTER  20
  1249. #define HK_MSGINPUT        21
  1250. #define HK_LOCKUP          23
  1251. #define HK_FLUSHBUF        24
  1252.  
  1253. #define HMQ_CURRENT ((HMQ)1)
  1254.  
  1255. #define PM_MODEL_1X 0
  1256. #define PM_MODEL_2X 1
  1257.  
  1258. typedef struct _SMHSTRUCT {
  1259.     MPARAM mp2;
  1260.     MPARAM mp1;
  1261.     ULONG  msg;
  1262.     HWND   hwnd;
  1263.     ULONG  model;
  1264. } SMHSTRUCT, *PSMHSTRUCT;
  1265.  
  1266. BOOL   APIENTRY WinReleaseHook(HAB hab, HMQ hmq, LONG lHook, PFN pAddress, HMODULE Module);
  1267. BOOL   APIENTRY WinSetHook(HAB hab, HMQ hmq, LONG lHookType, PFN pHookProc, HMODULE Module);
  1268.  
  1269. #endif
  1270.  
  1271. #if defined(INCL_WININPUT)
  1272.  
  1273. #define VK_BUTTON1                 0x01
  1274. #define VK_BUTTON2                 0x02
  1275. #define VK_BUTTON3                 0x03
  1276. #define VK_BREAK                   0x04
  1277. #define VK_BACKSPACE               0x05
  1278. #define VK_TAB                     0x06
  1279. #define VK_BACKTAB                 0x07
  1280. #define VK_NEWLINE                 0x08
  1281. #define VK_SHIFT                   0x09
  1282. #define VK_CTRL                    0x0A
  1283. #define VK_ALT                     0x0B
  1284. #define VK_ALTGRAF                 0x0C
  1285. #define VK_PAUSE                   0x0D
  1286. #define VK_CAPSLOCK                0x0E
  1287. #define VK_ESC                     0x0F
  1288. #define VK_SPACE                   0x10
  1289. #define VK_PAGEUP                  0x11
  1290. #define VK_PAGEDOWN                0x12
  1291. #define VK_END                     0x13
  1292. #define VK_HOME                    0x14
  1293. #define VK_LEFT                    0x15
  1294. #define VK_UP                      0x16
  1295. #define VK_RIGHT                   0x17
  1296. #define VK_DOWN                    0x18
  1297. #define VK_PRINTSCRN               0x19
  1298. #define VK_INSERT                  0x1A
  1299. #define VK_DELETE                  0x1B
  1300. #define VK_SCRLLOCK                0x1C
  1301. #define VK_NUMLOCK                 0x1D
  1302. #define VK_ENTER                   0x1E
  1303. #define VK_SYSRQ                   0x1F
  1304. #define VK_F1                      0x20
  1305. #define VK_F2                      0x21
  1306. #define VK_F3                      0x22
  1307. #define VK_F4                      0x23
  1308. #define VK_F5                      0x24
  1309. #define VK_F6                      0x25
  1310. #define VK_F7                      0x26
  1311. #define VK_F8                      0x27
  1312. #define VK_F9                      0x28
  1313. #define VK_F10                     0x29
  1314. #define VK_F11                     0x2A
  1315. #define VK_F12                     0x2B
  1316. #define VK_F13                     0x2C
  1317. #define VK_F14                     0x2D
  1318. #define VK_F15                     0x2E
  1319. #define VK_F16                     0x2F
  1320. #define VK_F17                     0x30
  1321. #define VK_F18                     0x31
  1322. #define VK_F19                     0x32
  1323. #define VK_F20                     0x33
  1324. #define VK_F21                     0x34
  1325. #define VK_F22                     0x35
  1326. #define VK_F23                     0x36
  1327. #define VK_F24                     0x37
  1328. #define VK_ENDDRAG                 0x38
  1329. #define VK_CLEAR                   0x39
  1330. #define VK_EREOF                   0x3A
  1331. #define VK_PA1                     0x3B
  1332. #define VK_ATTN                    0x3C
  1333. #define VK_CRSEL                   0x3D
  1334. #define VK_EXSEL                   0x3E
  1335. #define VK_COPY                    0x3F
  1336. #define VK_BLK1                    0x40
  1337. #define VK_BLK2                    0x41
  1338.  
  1339. #define KC_NONE        0x0000
  1340. #define KC_CHAR        0x0001
  1341. #define KC_VIRTUALKEY  0x0002
  1342. #define KC_SCANCODE    0x0004
  1343. #define KC_SHIFT       0x0008
  1344. #define KC_CTRL        0x0010
  1345. #define KC_ALT         0x0020
  1346. #define KC_KEYUP       0x0040
  1347. #define KC_PREVDOWN    0x0080
  1348. #define KC_LONEKEY     0x0100
  1349. #define KC_DEADKEY     0x0200
  1350. #define KC_COMPOSITE   0x0400
  1351. #define KC_INVALIDCOMP 0x0800
  1352. #define KC_TOGGLE      0x1000
  1353. #define KC_INVALIDCHAR 0x2000
  1354. #define KC_DBCSRSRVD1  0x4000
  1355. #define KC_DBCSRSRVD2  0x8000
  1356.  
  1357. #define WM_MOUSEFIRST       0x0070
  1358. #define WM_MOUSELAST        0x0079
  1359. #define WM_BUTTONCLICKFIRST 0x0071
  1360. #define WM_BUTTONCLICKLAST  0x0079
  1361.  
  1362. #define WM_MOUSEMOVE        0x0070
  1363. #define WM_BUTTON1DOWN      0x0071
  1364. #define WM_BUTTON1UP        0x0072
  1365. #define WM_BUTTON1DBLCLK    0x0073
  1366. #define WM_BUTTON2DOWN      0x0074
  1367. #define WM_BUTTON2UP        0x0075
  1368. #define WM_BUTTON2DBLCLK    0x0076
  1369. #define WM_BUTTON3DOWN      0x0077
  1370. #define WM_BUTTON3UP        0x0078
  1371. #define WM_BUTTON3DBLCLK    0x0079
  1372. #define WM_MOUSEMAP         0x007D
  1373.  
  1374. #define WM_EXTMOUSEFIRST    0x0410
  1375. #define WM_EXTMOUSELAST     0x0419
  1376.  
  1377. #define WM_CHORD                0x0410
  1378. #define WM_BUTTON1MOTIONSTART   0x0411
  1379. #define WM_BUTTON1MOTIONEND     0x0412
  1380. #define WM_BUTTON1CLICK         0x0413
  1381. #define WM_BUTTON2MOTIONSTART   0x0414
  1382. #define WM_BUTTON2MOTIONEND     0x0415
  1383. #define WM_BUTTON2CLICK         0x0416
  1384. #define WM_BUTTON3MOTIONSTART   0x0417
  1385. #define WM_BUTTON3MOTIONEND     0x0418
  1386. #define WM_BUTTON3CLICK         0x0419
  1387.  
  1388. #define WM_BEGINDRAG            0x0420
  1389. #define WM_ENDDRAG              0x0421
  1390. #define WM_SINGLESELECT         0x0422
  1391. #define WM_OPEN                 0x0423
  1392. #define WM_CONTEXTMENU          0x0424
  1393. #define WM_CONTEXTHELP          0x0425
  1394. #define WM_TEXTEDIT             0x0426
  1395. #define WM_BEGINSELECT          0x0427
  1396. #define WM_ENDSELECT            0x0428
  1397. #define WM_PICKUP               0x0429
  1398.  
  1399. #define WM_PENFIRST             0x04C0
  1400. #define WM_PENLAST              0x04FF
  1401. #define WM_MMPMFIRST            0x0500
  1402. #define WM_MMPMLAST             0x05FF
  1403. #define WM_STDDLGFIRST          0x0600
  1404. #define WM_STDDLGLAST           0x065F
  1405.  
  1406. #define WM_BIDI_FIRST           0x0BD0
  1407. #define WM_BIDI_LAST            0x0BFF
  1408.  
  1409. #define WM_CHAR             0x007A
  1410. #define WM_VIOCHAR          0x007B
  1411.  
  1412. LONG   APIENTRY WinGetKeyState(HWND hwndDeskTop, LONG vkey);
  1413. LONG   APIENTRY WinGetPhysKeyState(HWND hwndDeskTop, LONG sc);
  1414. HWND   APIENTRY WinQueryCapture(HWND hwndDesktop);
  1415. HWND   APIENTRY WinQueryFocus(HWND hwndDeskTop);
  1416. BOOL   APIENTRY WinSetCapture(HWND hwndDesktop, HWND hwnd);
  1417. BOOL   APIENTRY WinSetFocus(HWND hwndDeskTop, HWND hwndNewFocus);
  1418.  
  1419. #endif
  1420.  
  1421. #if defined(INCL_WINLISTBOXES)
  1422.  
  1423. #define LN_SELECT    1
  1424. #define LN_SETFOCUS  2
  1425. #define LN_KILLFOCUS 3
  1426. #define LN_SCROLL    4
  1427. #define LN_ENTER     5
  1428.  
  1429. #define LS_MULTIPLESEL 0x0001
  1430. #define LS_OWNERDRAW   0x0002
  1431. #define LS_NOADJUSTPOS 0x0004
  1432. #define LS_HORZSCROLL  0x0008
  1433. #define LS_EXTENDEDSEL 0x0010
  1434.  
  1435. #define LM_QUERYITEMCOUNT      0x0160
  1436. #define LM_INSERTITEM          0x0161
  1437. #define LM_SETTOPINDEX         0x0162
  1438. #define LM_DELETEITEM          0x0163
  1439. #define LM_SELECTITEM          0x0164
  1440. #define LM_QUERYSELECTION      0x0165
  1441. #define LM_SETITEMTEXT         0x0166
  1442. #define LM_QUERYITEMTEXTLENGTH 0x0167
  1443. #define LM_QUERYITEMTEXT       0x0168
  1444. #define LM_SETITEMHANDLE       0x0169
  1445. #define LM_QUERYITEMHANDLE     0x016a
  1446. #define LM_SEARCHSTRING        0x016b
  1447. #define LM_SETITEMHEIGHT       0x016c
  1448. #define LM_QUERYTOPINDEX       0x016d
  1449. #define LM_DELETEALL           0x016e
  1450. #define LM_INSERTMULTITEMS     0x016f
  1451. #define LM_SETITEMWIDTH        0x0660
  1452.  
  1453. #define LIT_CURSOR   (-4)
  1454. #define LIT_ERROR    (-3)
  1455. #define LIT_MEMERROR (-2)
  1456. #define LIT_NONE     (-1)
  1457. #define LIT_FIRST    (-1)
  1458.  
  1459. #define LIT_END            (-1)
  1460. #define LIT_SORTASCENDING  (-2)
  1461. #define LIT_SORTDESCENDING (-3)
  1462.  
  1463. #define LSS_SUBSTRING     1
  1464. #define LSS_PREFIX        2
  1465. #define LSS_CASESENSITIVE 4
  1466.  
  1467. #define WinDeleteLboxItem(hwndLbox, index) \
  1468.     ((LONG)WinSendMsg(hwndLbox, LM_DELETEITEM, MPFROMLONG(index), (MPARAM)NULL))
  1469. #define WinInsertLboxItem(hwndLbox, index, psz) \
  1470.     ((LONG)WinSendMsg(hwndLbox, LM_INSERTITEM, MPFROMLONG(index), MPFROMP(psz)))
  1471. #define WinQueryLboxCount(hwndLbox) \
  1472.     ((LONG)WinSendMsg(hwndLbox, LM_QUERYITEMCOUNT, (MPARAM)NULL, (MPARAM)NULL))
  1473. #define WinQueryLboxItemText(hwndLbox, index, psz, cchMax) \
  1474.     ((LONG)WinSendMsg(hwndLbox, LM_QUERYITEMTEXT, MPFROM2SHORT((index), (cchMax)), MPFROMP(psz)))
  1475. #define WinQueryLboxItemTextLength(hwndLbox, index) \
  1476.     ((SHORT)WinSendMsg(hwndLbox, LM_QUERYITEMTEXTLENGTH, MPFROMSHORT(index), (MPARAM)NULL))
  1477. #define WinSetLboxItemText(hwndLbox, index, psz) \
  1478.     ((BOOL)WinSendMsg(hwndLbox, LM_SETITEMTEXT, MPFROMLONG(index), MPFROMP(psz)))
  1479. #define WinQueryLboxSelectedItem(hwndLbox) \
  1480.     ((LONG)WinSendMsg(hwndLbox, LM_QUERYSELECTION, MPFROMLONG(LIT_FIRST), (MPARAM)NULL))
  1481.  
  1482. typedef struct _LBOXINFO {
  1483.     LONG  lItemIndex;
  1484.     ULONG ulItemCount;
  1485.     ULONG reserved;
  1486.     ULONG reserved2;
  1487. } LBOXINFO, *PLBOXINFO;
  1488.  
  1489. #endif
  1490.  
  1491. #if defined(INCL_WINMLE)
  1492.  
  1493. #define MLM_SETTEXTLIMIT          0x01b0
  1494. #define MLM_QUERYTEXTLIMIT        0x01b1
  1495. #define MLM_SETFORMATRECT         0x01b2
  1496. #define MLM_QUERYFORMATRECT       0x01b3
  1497. #define MLM_SETWRAP               0x01b4
  1498. #define MLM_QUERYWRAP             0x01b5
  1499. #define MLM_SETTABSTOP            0x01b6
  1500. #define MLM_QUERYTABSTOP          0x01b7
  1501. #define MLM_SETREADONLY           0x01b8
  1502. #define MLM_QUERYREADONLY         0x01b9
  1503. #define MLM_QUERYCHANGED          0x01ba
  1504. #define MLM_SETCHANGED            0x01bb
  1505. #define MLM_QUERYLINECOUNT        0x01bc
  1506. #define MLM_CHARFROMLINE          0x01bd
  1507. #define MLM_LINEFROMCHAR          0x01be
  1508. #define MLM_QUERYLINELENGTH       0x01bf
  1509. #define MLM_QUERYTEXTLENGTH       0x01c0
  1510. #define MLM_FORMAT                0x01c1
  1511. #define MLM_SETIMPORTEXPORT       0x01c2
  1512. #define MLM_IMPORT                0x01c3
  1513. #define MLM_EXPORT                0x01c4
  1514. #define MLM_DELETE                0x01c6
  1515. #define MLM_QUERYFORMATLINELENGTH 0x01c7
  1516. #define MLM_QUERYFORMATTEXTLENGTH 0x01c8
  1517. #define MLM_INSERT                0x01c9
  1518. #define MLM_SETSEL                0x01ca
  1519. #define MLM_QUERYSEL              0x01cb
  1520. #define MLM_QUERYSELTEXT          0x01cc
  1521. #define MLM_QUERYUNDO             0x01cd
  1522. #define MLM_UNDO                  0x01ce
  1523. #define MLM_RESETUNDO             0x01cf
  1524. #define MLM_QUERYFONT             0x01d0
  1525. #define MLM_SETFONT               0x01d1
  1526. #define MLM_SETTEXTCOLOR          0x01d2
  1527. #define MLM_QUERYTEXTCOLOR        0x01d3
  1528. #define MLM_SETBACKCOLOR          0x01d4
  1529. #define MLM_QUERYBACKCOLOR        0x01d5
  1530. #define MLM_QUERYFIRSTCHAR        0x01d6
  1531. #define MLM_SETFIRSTCHAR          0x01d7
  1532. #define MLM_CUT                   0x01d8
  1533. #define MLM_COPY                  0x01d9
  1534. #define MLM_PASTE                 0x01da
  1535. #define MLM_CLEAR                 0x01db
  1536. #define MLM_ENABLEREFRESH         0x01dc
  1537. #define MLM_DISABLEREFRESH        0x01dd
  1538. #define MLM_SEARCH                0x01de
  1539. #define MLM_QUERYIMPORTEXPORT     0x01df
  1540. #define MLN_OVERFLOW              0x0001
  1541. #define MLN_PIXHORZOVERFLOW       0x0002
  1542. #define MLN_PIXVERTOVERFLOW       0x0003
  1543. #define MLN_TEXTOVERFLOW          0x0004
  1544. #define MLN_VSCROLL               0x0005
  1545. #define MLN_HSCROLL               0x0006
  1546. #define MLN_CHANGE                0x0007
  1547. #define MLN_SETFOCUS              0x0008
  1548. #define MLN_KILLFOCUS             0x0009
  1549. #define MLN_MARGIN                0x000a
  1550. #define MLN_SEARCHPAUSE           0x000b
  1551. #define MLN_MEMERROR              0x000c
  1552. #define MLN_UNDOOVERFLOW          0x000d
  1553. #define MLN_CLPBDFAIL             0x000f
  1554.  
  1555. #endif
  1556.  
  1557. #if defined(INCL_WINMENUS)
  1558.  
  1559. #define MIT_END             (-1)
  1560. #define MIT_NONE            (-1)
  1561. #define MIT_MEMERROR        (-1)
  1562. #define MIT_ERROR           (-1)
  1563. #define MIT_FIRST           (-2)
  1564. #define MIT_LAST            (-3)
  1565. #define MID_ERROR           (-1)
  1566. #define MID_NONE            MIT_NONE
  1567.  
  1568. #define MIS_TEXT            0x0001
  1569. #define MIS_BITMAP          0x0002
  1570. #define MIS_SEPARATOR       0x0004
  1571. #define MIS_OWNERDRAW       0x0008
  1572. #define MIS_SUBMENU         0x0010
  1573. #define MIS_MULTMENU        0x0020
  1574. #define MIS_SYSCOMMAND      0x0040
  1575. #define MIS_HELP            0x0080
  1576. #define MIS_STATIC          0x0100
  1577. #define MIS_BUTTONSEPARATOR 0x0200
  1578. #define MIS_BREAK           0x0400
  1579. #define MIS_BREAKSEPARATOR  0x0800
  1580. #define MIS_GROUP           0x1000
  1581. #define MIS_SINGLE          0x2000
  1582.  
  1583. #define MIA_NODISMISS 0x0020
  1584. #define MIA_FRAMED    0x1000
  1585. #define MIA_CHECKED   0x2000
  1586. #define MIA_DISABLED  0x4000
  1587. #define MIA_HILITED   0x8000
  1588.  
  1589. #define MS_ACTIONBAR           0x0001
  1590. #define MS_TITLEBUTTON         0x0002
  1591. #define MS_VERTICALFLIP        0x0004
  1592. #define MS_CONDITIONALCASCADE  0x0040
  1593.  
  1594. #define PU_POSITIONONITEM   0x0001
  1595. #define PU_HCONSTRAIN       0x0002
  1596. #define PU_VCONSTRAIN       0x0004
  1597. #define PU_NONE             0x0000
  1598. #define PU_MOUSEBUTTON1DOWN 0x0008
  1599. #define PU_MOUSEBUTTON2DOWN 0x0010
  1600. #define PU_MOUSEBUTTON3DOWN 0x0018
  1601. #define PU_SELECTITEM       0x0020
  1602. #define PU_MOUSEBUTTON1     0x0040
  1603. #define PU_MOUSEBUTTON2     0x0080
  1604. #define PU_MOUSEBUTTON3     0x0100
  1605. #define PU_KEYBOARD         0x0200
  1606.  
  1607. #define MM_INSERTITEM          0x0180
  1608. #define MM_DELETEITEM          0x0181
  1609. #define MM_QUERYITEM           0x0182
  1610. #define MM_SETITEM             0x0183
  1611. #define MM_QUERYITEMCOUNT      0x0184
  1612. #define MM_STARTMENUMODE       0x0185
  1613. #define MM_ENDMENUMODE         0x0186
  1614. #define MM_REMOVEITEM          0x0188
  1615. #define MM_SELECTITEM          0x0189
  1616. #define MM_QUERYSELITEMID      0x018a
  1617. #define MM_QUERYITEMTEXT       0x018b
  1618. #define MM_QUERYITEMTEXTLENGTH 0x018c
  1619. #define MM_SETITEMHANDLE       0x018d
  1620. #define MM_SETITEMTEXT         0x018e
  1621. #define MM_ITEMPOSITIONFROMID  0x018f
  1622. #define MM_ITEMIDFROMPOSITION  0x0190
  1623. #define MM_QUERYITEMATTR       0x0191
  1624. #define MM_SETITEMATTR         0x0192
  1625. #define MM_ISITEMVALID         0x0193
  1626. #define MM_QUERYITEMRECT       0x0194
  1627. #define MM_QUERYDEFAULTITEMID  0x0431
  1628. #define MM_SETDEFAULTITEMID    0x0432
  1629.  
  1630. #define WinCheckMenuItem(hwndMenu, id, fcheck) \
  1631.     ((BOOL)WinSendMsg(hwndMenu, MM_SETITEMATTR, MPFROM2SHORT(id, TRUE), \
  1632.     MPFROM2SHORT(MIA_CHECKED, (USHORT)(fcheck) ? MIA_CHECKED : 0)))
  1633. #define WinIsMenuItemChecked(hwndMenu, id) \
  1634.     ((BOOL)WinSendMsg(hwndMenu, MM_QUERYITEMATTR, \
  1635.     MPFROM2SHORT(id, TRUE), MPFROMLONG(MIA_CHECKED)))
  1636. #define WinEnableMenuItem(hwndMenu, id, fEnable) \
  1637.     ((BOOL)WinSendMsg(hwndMenu, MM_SETITEMATTR, MPFROM2SHORT(id, TRUE), \
  1638.     MPFROM2SHORT(MIA_DISABLED, (USHORT)(fEnable) ? 0 : MIA_DISABLED)))
  1639. #define WinIsMenuItemEnabled(hwndMenu, id)  \
  1640.     (!(BOOL)WinSendMsg(hwndMenu, MM_QUERYITEMATTR, \
  1641.     MPFROM2SHORT(id, TRUE), MPFROMLONG(MIA_DISABLED)))
  1642. #define WinSetMenuItemText(hwndMenu, id, psz) \
  1643.     ((BOOL)WinSendMsg(hwndMenu, MM_SETITEMTEXT, MPFROMLONG(id), MPFROMP(psz)))
  1644. #define WinIsMenuItemValid(hwndMenu, id) \
  1645.     ((BOOL)WinSendMsg(hwndMenu, MM_ISITEMVALID, MPFROM2SHORT(id, TRUE), MPFROMLONG(FALSE)))
  1646.  
  1647. #pragma pack(2)
  1648.  
  1649. typedef struct _MENUITEM {
  1650.     SHORT  iPosition;
  1651.     USHORT afStyle;
  1652.     USHORT afAttribute;
  1653.     USHORT id;
  1654.     HWND   hwndSubMenu;
  1655.     ULONG  hItem;
  1656. } MENUITEM, *PMENUITEM;
  1657.  
  1658. #pragma pack()
  1659.  
  1660. HWND   APIENTRY WinCreateMenu(HWND hwndParent, PVOID lpmt);
  1661.  
  1662. HWND   APIENTRY WinLoadMenu(HWND hwndFrame, HMODULE hmod, ULONG idMenu);
  1663.  
  1664.  
  1665. #endif
  1666.  
  1667. #if defined(INCL_WINPOINTERS)
  1668.  
  1669. #define SPTR_ARROW            1
  1670. #define SPTR_TEXT             2
  1671. #define SPTR_WAIT             3
  1672. #define SPTR_SIZE             4
  1673. #define SPTR_MOVE             5
  1674. #define SPTR_SIZENWSE         6
  1675. #define SPTR_SIZENESW         7
  1676. #define SPTR_SIZEWE           8
  1677. #define SPTR_SIZENS           9
  1678. #define SPTR_APPICON         10
  1679. #define SPTR_ICONINFORMATION 11
  1680. #define SPTR_ICONQUESTION    12
  1681. #define SPTR_ICONERROR       13
  1682. #define SPTR_ICONWARNING     14
  1683. #define SPTR_ILLEGAL         18
  1684. #define SPTR_FILE            19
  1685. #define SPTR_FOLDER          20
  1686. #define SPTR_MULTFILE        21
  1687. #define SPTR_PROGRAM         22
  1688. #define SPTR_DISPLAY_PTRS    22
  1689. #define SPTR_PENFIRST        23
  1690. #define SPTR_PENLAST         39
  1691. #define SPTR_CPTR            39
  1692.  
  1693. #define SBMP_OLD_SYSMENU        1
  1694. #define SBMP_OLD_SBUPARROW      2
  1695. #define SBMP_OLD_SBDNARROW      3
  1696. #define SBMP_OLD_SBRGARROW      4
  1697. #define SBMP_OLD_SBLFARROW      5
  1698. #define SBMP_MENUCHECK          6
  1699. #define SBMP_OLD_CHECKBOXES     7
  1700. #define SBMP_BTNCORNERS         8
  1701. #define SBMP_OLD_MINBUTTON      9
  1702. #define SBMP_OLD_MAXBUTTON     10
  1703. #define SBMP_OLD_RESTOREBUTTON 11
  1704. #define SBMP_OLD_CHILDSYSMENU  12
  1705. #define SBMP_DRIVE             15
  1706. #define SBMP_FILE              16
  1707. #define SBMP_FOLDER            17
  1708. #define SBMP_TREEPLUS          18
  1709. #define SBMP_TREEMINUS         19
  1710. #define SBMP_PROGRAM           22
  1711. #define SBMP_MENUATTACHED      23
  1712. #define SBMP_SIZEBOX           24
  1713. #define SBMP_SYSMENU           25
  1714. #define SBMP_MINBUTTON         26
  1715. #define SBMP_MAXBUTTON         27
  1716. #define SBMP_RESTOREBUTTON     28
  1717. #define SBMP_CHILDSYSMENU      29
  1718. #define SBMP_SYSMENUDEP        30
  1719. #define SBMP_MINBUTTONDEP      31
  1720. #define SBMP_MAXBUTTONDEP      32
  1721. #define SBMP_RESTOREBUTTONDEP  33
  1722. #define SBMP_CHILDSYSMENUDEP   34
  1723. #define SBMP_SBUPARROW         35
  1724. #define SBMP_SBDNARROW         36
  1725. #define SBMP_SBLFARROW         37
  1726. #define SBMP_SBRGARROW         38
  1727. #define SBMP_SBUPARROWDEP      39
  1728. #define SBMP_SBDNARROWDEP      40
  1729. #define SBMP_SBLFARROWDEP      41
  1730. #define SBMP_SBRGARROWDEP      42
  1731. #define SBMP_SBUPARROWDIS      43
  1732. #define SBMP_SBDNARROWDIS      44
  1733. #define SBMP_SBLFARROWDIS      45
  1734. #define SBMP_SBRGARROWDIS      46
  1735. #define SBMP_COMBODOWN         47
  1736. #define SBMP_CHECKBOXES        48
  1737. #define SBMP_HIDE              50
  1738. #define SBMP_HIDEDEP           51
  1739. #define SBMP_CLOSE             52
  1740. #define SBMP_CLOSEDEP          53
  1741.  
  1742. typedef LHANDLE HPOINTER, *PHPOINTER;
  1743.  
  1744. typedef struct _POINTERINFO {
  1745.     ULONG   fPointer;
  1746.     LONG    xHotSpot;
  1747.     LONG    yHotSpot;
  1748.     HBITMAP hbmPointer;
  1749.     HBITMAP hbmColor;
  1750.     HBITMAP hbmMiniPointer;
  1751.     HBITMAP hbmMiniColor;
  1752. } POINTERINFO, *PPOINTERINFO;
  1753.  
  1754. BOOL     APIENTRY WinDestroyPointer(HPOINTER hptrPointer);
  1755.  
  1756. HBITMAP  APIENTRY WinGetSysBitmap(HWND hwndDesktop, ULONG ibm);
  1757.  
  1758. HPOINTER APIENTRY WinLoadPointer(HWND hwndDeskTop, HMODULE Resource, ULONG idPointer);
  1759.  
  1760. HPOINTER APIENTRY WinQueryPointer(HWND hwndDeskTop);
  1761. BOOL     APIENTRY WinQueryPointerInfo(HPOINTER hptr, PPOINTERINFO pptriPointerInfo);
  1762. BOOL     APIENTRY WinQueryPointerPos(HWND hwndDeskTop, PPOINTL pptlPoint);
  1763. HPOINTER APIENTRY WinQuerySysPointer(HWND hwndDeskTop, LONG lIdentifier, BOOL fCopy);
  1764.  
  1765. BOOL     APIENTRY WinSetPointer(HWND hwndDeskTop, HPOINTER hptrNewPointer);
  1766. BOOL     APIENTRY WinSetPointerOwner(HPOINTER hptr, PID pid, BOOL fDestroy);
  1767. BOOL     APIENTRY WinSetPointerPos(HWND hwndDeskTop, LONG lx, LONG ly);
  1768.  
  1769. BOOL     APIENTRY WinShowPointer(HWND hwndDeskTop, BOOL fShow);
  1770.  
  1771. #endif
  1772.  
  1773. #if !defined(SESMGR)
  1774.  
  1775. #define HINI_PROFILE       ((HINI)NULL)
  1776. #define HINI_USERPROFILE   ((HINI)-1)
  1777. #define HINI_SYSTEMPROFILE ((HINI)-2)
  1778. #define HINI_USER          HINI_USERPROFILE
  1779. #define HINI_SYSTEM        HINI_SYSTEMPROFILE
  1780.  
  1781. typedef LHANDLE HPROGRAM, *PHPROGRAM;
  1782. typedef LHANDLE HAPP, *PHAPP;
  1783. typedef LHANDLE HINI, *PHINI;
  1784.  
  1785. typedef struct _PRFPROFILE {
  1786.     ULONG cchUserName;
  1787.     PSZ   pszUserName;
  1788.     ULONG cchSysName;
  1789.     PSZ   pszSysName;
  1790. } PRFPROFILE, *PPRFPROFILE;
  1791.  
  1792. #endif
  1793.  
  1794. #if defined(INCL_WINPROGRAMLIST)
  1795.  
  1796. #define PROG_DEFAULT              (PROGCATEGORY)0
  1797. #define PROG_FULLSCREEN           (PROGCATEGORY)1
  1798. #define PROG_WINDOWABLEVIO        (PROGCATEGORY)2
  1799. #define PROG_PM                   (PROGCATEGORY)3
  1800. #define PROG_GROUP                (PROGCATEGORY)5
  1801. #define PROG_REAL                 (PROGCATEGORY)4
  1802. #define PROG_VDM                  (PROGCATEGORY)4
  1803. #define PROG_WINDOWEDVDM          (PROGCATEGORY)7
  1804. #define PROG_DLL                  (PROGCATEGORY)6
  1805. #define PROG_PDD                  (PROGCATEGORY)8
  1806. #define PROG_VDD                  (PROGCATEGORY)9
  1807. #define PROG_WINDOW_REAL          (PROGCATEGORY)10
  1808. #define PROG_WINDOW_PROT          (PROGCATEGORY)11
  1809. #define PROG_30_STD               (PROGCATEGORY)11
  1810. #define PROG_WINDOW_AUTO          (PROGCATEGORY)12
  1811. #define PROG_SEAMLESSVDM          (PROGCATEGORY)13
  1812. #define PROG_30_STDSEAMLESSVDM    (PROGCATEGORY)13
  1813. #define PROG_SEAMLESSCOMMON       (PROGCATEGORY)14
  1814. #define PROG_30_STDSEAMLESSCOMMON (PROGCATEGORY)14
  1815. #define PROG_31_STDSEAMLESSVDM    (PROGCATEGORY)15
  1816. #define PROG_31_STDSEAMLESSCOMMON (PROGCATEGORY)16
  1817. #define PROG_31_ENHSEAMLESSVDM    (PROGCATEGORY)17
  1818. #define PROG_31_ENHSEAMLESSCOMMON (PROGCATEGORY)18
  1819. #define PROG_31_ENH               (PROGCATEGORY)19
  1820. #define PROG_31_STD               (PROGCATEGORY)20
  1821. #define PROG_DOS_GAME             (PROGCATEGORY)21
  1822. #define PROG_WIN_GAME             (PROGCATEGORY)22
  1823. #define PROG_DOS_MODE             (PROGCATEGORY)23
  1824. #define PROG_RESERVED             (PROGCATEGORY)255
  1825.  
  1826. typedef ULONG PROGCATEGORY, *PPROGCATEGORY;
  1827.  
  1828. #endif
  1829.  
  1830. #if defined(INCL_WINRECTANGLES)
  1831.  
  1832. BOOL    APIENTRY WinInflateRect(HAB hab, PRECTL prcl, LONG cx, LONG cy);
  1833. BOOL    APIENTRY WinIntersectRect(HAB hab, PRECTL pcrlDst, PRECTL pcrlSrc1, PRECTL pcrlSrc2);
  1834. BOOL    APIENTRY WinIsRectEmpty(HAB hab, PRECTL prclprc);
  1835. BOOL    APIENTRY WinMakePoints(HAB hab, PPOINTL pwpt, ULONG cwpt);
  1836. BOOL    APIENTRY WinMakeRect(HAB hab, PRECTL pwrc);
  1837. BOOL    APIENTRY WinOffsetRect(HAB hab, PRECTL prcl, LONG cx, LONG cy);
  1838. BOOL    APIENTRY WinPtInRect(HAB hab, PRECTL prcl, PPOINTL pptl);
  1839.  
  1840. #endif
  1841.  
  1842. #if defined(INCL_WINSCROLLBARS)
  1843.  
  1844. #define SBS_HORZ      0x0000
  1845. #define SBS_VERT      0x0001
  1846. #define SBS_THUMBSIZE 0x0002
  1847. #define SBS_AUTOTRACK 0x0004
  1848. #define SBS_AUTOSIZE  0x2000
  1849.  
  1850. #define SB_LINEUP         1
  1851. #define SB_LINEDOWN       2
  1852. #define SB_LINELEFT       1
  1853. #define SB_LINERIGHT      2
  1854. #define SB_PAGEUP         3
  1855. #define SB_PAGEDOWN       4
  1856. #define SB_PAGELEFT       3
  1857. #define SB_PAGERIGHT      4
  1858. #define SB_SLIDERTRACK    5
  1859. #define SB_SLIDERPOSITION 6
  1860. #define SB_ENDSCROLL      7
  1861.  
  1862. #define SBM_SETSCROLLBAR  0x01a0
  1863. #define SBM_SETPOS        0x01a1
  1864. #define SBM_QUERYPOS      0x01a2
  1865. #define SBM_QUERYRANGE    0x01a3
  1866. #define SBM_SETTHUMBSIZE  0x01a6
  1867.  
  1868. #pragma pack(2)
  1869.  
  1870. typedef struct _SBCDATA {
  1871.     USHORT cb;
  1872.     USHORT sHilite;
  1873.     SHORT  posFirst;
  1874.     SHORT  posLast;
  1875.     SHORT  posThumb;
  1876.     SHORT  cVisible;
  1877.     SHORT  cTotal;
  1878. } SBCDATA, *PSBCDATA;
  1879.  
  1880. #pragma pack()
  1881.  
  1882. #endif
  1883.  
  1884. #if defined(INCL_WINSHELLDATA)
  1885.  
  1886. #define PL_ALTERED 0x008E
  1887.  
  1888. BOOL   APIENTRY PrfCloseProfile(HINI hini);
  1889. HINI   APIENTRY PrfOpenProfile(HAB hab, PCSZ pszFileName);
  1890. BOOL   APIENTRY PrfQueryProfile(HAB hab, PPRFPROFILE pprfproProfile);
  1891. BOOL   APIENTRY PrfQueryProfileData(HINI hini, PCSZ pszApp, PCSZ pszKey,
  1892.                    PVOID pBuffer, PULONG pulBufferMax);
  1893. LONG   APIENTRY PrfQueryProfileInt(HINI hini, PCSZ pszApp, PCSZ pszKey, LONG lDefault);
  1894. BOOL   APIENTRY PrfQueryProfileSize(HINI hini, PCSZ pszApp, PCSZ pszKey, PULONG pulDataLen);
  1895. ULONG  APIENTRY PrfQueryProfileString(HINI hini, PCSZ pszApp, PCSZ pszKey, PCSZ pszDefault,
  1896.                    PVOID pBuffer, ULONG ulBufferMax);
  1897. BOOL   APIENTRY PrfReset(HAB hab, PPRFPROFILE pPrfProfile);
  1898. BOOL   APIENTRY PrfWriteProfileData(HINI hini, PCSZ pszApp, PCSZ pszKey,
  1899.                    PVOID pData, ULONG ulDataLen);
  1900. BOOL   APIENTRY  PrfWriteProfileString(HINI hini, PCSZ pszApp, PCSZ pszKey, PCSZ pszData);
  1901.  
  1902. #endif
  1903.  
  1904. #if defined(INCL_WINSTATICS)
  1905.  
  1906. #define SS_TEXT          0x0001
  1907. #define SS_GROUPBOX      0x0002
  1908. #define SS_ICON          0x0003
  1909. #define SS_BITMAP        0x0004
  1910. #define SS_FGNDRECT      0x0005
  1911. #define SS_HALFTONERECT  0x0006
  1912. #define SS_BKGNDRECT     0x0007
  1913. #define SS_FGNDFRAME     0x0008
  1914. #define SS_HALFTONEFRAME 0x0009
  1915. #define SS_BKGNDFRAME    0x000A
  1916. #define SS_SYSICON       0x000B
  1917. #define SS_AUTOSIZE      0x0040
  1918.  
  1919. #define SM_SETHANDLE     0x0100
  1920. #define SM_QUERYHANDLE   0x0101
  1921.  
  1922. #define WM_MSGBOXINIT    0x010E
  1923. #define WM_MSGBOXDISMISS 0x010F
  1924.  
  1925. #endif
  1926.  
  1927. #if defined(INCL_WINSYS)
  1928.  
  1929. #define SV_SWAPBUTTON           0
  1930. #define SV_DBLCLKTIME           1
  1931. #define SV_CXDBLCLK             2
  1932. #define SV_CYDBLCLK             3
  1933. #define SV_CXSIZEBORDER         4
  1934. #define SV_CYSIZEBORDER         5
  1935. #define SV_ALARM                6
  1936. #define SV_RESERVEDFIRST1       7
  1937. #define SV_RESERVEDLAST1        8
  1938. #define SV_CURSORRATE           9
  1939. #define SV_FIRSTSCROLLRATE     10
  1940. #define SV_SCROLLRATE          11
  1941. #define SV_NUMBEREDLISTS       12
  1942. #define SV_WARNINGFREQ         13
  1943. #define SV_NOTEFREQ            14
  1944. #define SV_ERRORFREQ           15
  1945. #define SV_WARNINGDURATION     16
  1946. #define SV_NOTEDURATION        17
  1947. #define SV_ERRORDURATION       18
  1948. #define SV_RESERVEDFIRST       19
  1949. #define SV_RESERVEDLAST        19
  1950. #define SV_CXSCREEN            20
  1951. #define SV_CYSCREEN            21
  1952. #define SV_CXVSCROLL           22
  1953. #define SV_CYHSCROLL           23
  1954. #define SV_CYVSCROLLARROW      24
  1955. #define SV_CXHSCROLLARROW      25
  1956. #define SV_CXBORDER            26
  1957. #define SV_CYBORDER            27
  1958. #define SV_CXDLGFRAME          28
  1959. #define SV_CYDLGFRAME          29
  1960. #define SV_CYTITLEBAR          30
  1961. #define SV_CYVSLIDER           31
  1962. #define SV_CXHSLIDER           32
  1963. #define SV_CXMINMAXBUTTON      33
  1964. #define SV_CYMINMAXBUTTON      34
  1965. #define SV_CYMENU              35
  1966. #define SV_CXFULLSCREEN        36
  1967. #define SV_CYFULLSCREEN        37
  1968. #define SV_CXICON              38
  1969. #define SV_CYICON              39
  1970. #define SV_CXPOINTER           40
  1971. #define SV_CYPOINTER           41
  1972. #define SV_DEBUG               42
  1973. #define SV_CMOUSEBUTTONS       43
  1974. #define SV_CPOINTERBUTTONS     43
  1975. #define SV_POINTERLEVEL        44
  1976. #define SV_CURSORLEVEL         45
  1977. #define SV_TRACKRECTLEVEL      46
  1978. #define SV_CTIMERS             47
  1979. #define SV_MOUSEPRESENT        48
  1980. #define SV_CXBYTEALIGN         49
  1981. #define SV_CXALIGN             49
  1982. #define SV_CYBYTEALIGN         50
  1983. #define SV_CYALIGN             50
  1984. #define SV_NOTRESERVED         56
  1985. #define SV_EXTRAKEYBEEP        57
  1986. #define SV_SETLIGHTS           58
  1987. #define SV_INSERTMODE          59
  1988. #define SV_MENUROLLDOWNDELAY   64
  1989. #define SV_MENUROLLUPDELAY     65
  1990. #define SV_ALTMNEMONIC         66
  1991. #define SV_TASKLISTMOUSEACCESS 67
  1992. #define SV_CXICONTEXTWIDTH     68
  1993. #define SV_CICONTEXTLINES      69
  1994. #define SV_CHORDTIME           70
  1995. #define SV_CXCHORD             71
  1996. #define SV_CYCHORD             72
  1997. #define SV_CXMOTIONSTART       73
  1998. #define SV_CYMOTIONSTART       74
  1999. #define SV_BEGINDRAG           75
  2000. #define SV_ENDDRAG             76
  2001. #define SV_SINGLESELECT        77
  2002. #define SV_OPEN                78
  2003. #define SV_CONTEXTMENU         79
  2004. #define SV_CONTEXTHELP         80
  2005. #define SV_TEXTEDIT            81
  2006. #define SV_BEGINSELECT         82
  2007. #define SV_ENDSELECT           83
  2008. #define SV_BEGINDRAGKB         84
  2009. #define SV_ENDDRAGKB           85
  2010. #define SV_SELECTKB            86
  2011. #define SV_OPENKB              87
  2012. #define SV_CONTEXTMENUKB       88
  2013. #define SV_CONTEXTHELPKB       89
  2014. #define SV_TEXTEDITKB          90
  2015. #define SV_BEGINSELECTKB       91
  2016. #define SV_ENDSELECTKB         92
  2017. #define SV_ANIMATION           93
  2018. #define SV_ANIMATIONSPEED      94
  2019. #define SV_MONOICONS           95
  2020. #define SV_KBDALTERED          96
  2021. #define SV_PRINTSCREEN         97
  2022. #define SV_LOCKSTARTINPUT      98
  2023. #define SV_CSYSVALUES         108
  2024.  
  2025. #define PP_FOREGROUNDCOLOR                       1
  2026. #define PP_FOREGROUNDCOLORINDEX                  2
  2027. #define PP_BACKGROUNDCOLOR                       3
  2028. #define PP_BACKGROUNDCOLORINDEX                  4
  2029. #define PP_HILITEFOREGROUNDCOLOR                 5
  2030. #define PP_HILITEFOREGROUNDCOLORINDEX            6
  2031. #define PP_HILITEBACKGROUNDCOLOR                 7
  2032. #define PP_HILITEBACKGROUNDCOLORINDEX            8
  2033. #define PP_DISABLEDFOREGROUNDCOLOR               9
  2034. #define PP_DISABLEDFOREGROUNDCOLORINDEX         10
  2035. #define PP_DISABLEDBACKGROUNDCOLOR              11
  2036. #define PP_DISABLEDBACKGROUNDCOLORINDEX         12
  2037. #define PP_BORDERCOLOR                          13
  2038. #define PP_BORDERCOLORINDEX                     14
  2039. #define PP_FONTNAMESIZE                         15
  2040. #define PP_FONTHANDLE                           16
  2041. #define PP_RESERVED                             17
  2042. #define PP_ACTIVECOLOR                          18
  2043. #define PP_ACTIVECOLORINDEX                     19
  2044. #define PP_INACTIVECOLOR                        20
  2045. #define PP_INACTIVECOLORINDEX                   21
  2046. #define PP_ACTIVETEXTFGNDCOLOR                  22
  2047. #define PP_ACTIVETEXTFGNDCOLORINDEX             23
  2048. #define PP_ACTIVETEXTBGNDCOLOR                  24
  2049. #define PP_ACTIVETEXTBGNDCOLORINDEX             25
  2050. #define PP_INACTIVETEXTFGNDCOLOR                26
  2051. #define PP_INACTIVETEXTFGNDCOLORINDEX           27
  2052. #define PP_INACTIVETEXTBGNDCOLOR                28
  2053. #define PP_INACTIVETEXTBGNDCOLORINDEX           29
  2054. #define PP_SHADOW                               30
  2055. #define PP_MENUFOREGROUNDCOLOR                  31
  2056. #define PP_MENUFOREGROUNDCOLORINDEX             32
  2057. #define PP_MENUBACKGROUNDCOLOR                  33
  2058. #define PP_MENUBACKGROUNDCOLORINDEX             34
  2059. #define PP_MENUHILITEFGNDCOLOR                  35
  2060. #define PP_MENUHILITEFGNDCOLORINDEX             36
  2061. #define PP_MENUHILITEBGNDCOLOR                  37
  2062. #define PP_MENUHILITEBGNDCOLORINDEX             38
  2063. #define PP_MENUDISABLEDFGNDCOLOR                39
  2064. #define PP_MENUDISABLEDFGNDCOLORINDEX           40
  2065. #define PP_MENUDISABLEDBGNDCOLOR                41
  2066. #define PP_MENUDISABLEDBGNDCOLORINDEX           42
  2067. #define PP_SHADOWTEXTCOLOR                      43
  2068. #define PP_SHADOWTEXTCOLORINDEX                 44
  2069. #define PP_SHADOWHILITEFGNDCOLOR                45
  2070. #define PP_SHADOWHILITEFGNDCOLORINDEX           46
  2071. #define PP_SHADOWHILITEBGNDCOLOR                47
  2072. #define PP_SHADOWHILITEBGNDCOLORINDEX           48
  2073. #define PP_ICONTEXTBACKGROUNDCOLOR              49
  2074. #define PP_ICONTEXTBACKGROUNDCOLORINDEX         50
  2075. #define PP_BORDERLIGHTCOLOR                     51
  2076. #define PP_BORDERDARKCOLOR                      52
  2077. #define PP_BORDER2COLOR                         53
  2078. #define PP_BORDER2LIGHTCOLOR                    54
  2079. #define PP_BORDER2DARKCOLOR                     55
  2080. #define PP_BORDERDEFAULTCOLOR                   56
  2081. #define PP_FIELDBACKGROUNDCOLOR                 57
  2082. #define PP_BUTTONBACKGROUNDCOLOR                58
  2083. #define PP_BUTTONBORDERLIGHTCOLOR               59
  2084. #define PP_BUTTONBORDERDARKCOLOR                60
  2085. #define PP_ARROWCOLOR                           61
  2086. #define PP_ARROWBORDERLIGHTCOLOR                62
  2087. #define PP_ARROWBORDERDARKCOLOR                 63
  2088. #define PP_ARROWDISABLEDCOLOR                   64
  2089. #define PP_CHECKLIGHTCOLOR                      65
  2090. #define PP_CHECKMIDDLECOLOR                     66
  2091. #define PP_CHECKDARKCOLOR                       67
  2092. #define PP_PAGEFOREGROUNDCOLOR                  68
  2093. #define PP_PAGEBACKGROUNDCOLOR                  69
  2094. #define PP_MAJORTABFOREGROUNDCOLOR              70
  2095. #define PP_MAJORTABBACKGROUNDCOLOR              71
  2096. #define PP_MINORTABFOREGROUNDCOLOR              72
  2097. #define PP_MINORTABBACKGROUNDCOLOR              73
  2098.  
  2099. typedef struct _PARAM {
  2100.     ULONG id;
  2101.     ULONG cb;
  2102.     BYTE  ab[1];
  2103. } PARAM, *PPARAM;
  2104.  
  2105. typedef struct _PRESPARAMS {
  2106.     ULONG cb;
  2107.     PARAM aparam[1];
  2108. } PRESPARAMS, *PPRESPARAMS;
  2109.  
  2110. ULONG  APIENTRY WinQueryPresParam(HWND hwnd, ULONG idAttrType1, ULONG idAttrType2,
  2111.                    PULONG pidAttrTypeFound, ULONG cbAttrValueLen,
  2112.                    PPVOID pAttrValue, ULONG flOptions);
  2113. LONG   APIENTRY WinQuerySysValue(HWND hwndDeskTop, LONG iSysValue);
  2114. BOOL   APIENTRY WinRemovePresParam(HWND hwnd, ULONG idAttrType);
  2115. BOOL   APIENTRY WinSetPresParam(HWND hwnd, ULONG idAttrType,
  2116.                    ULONG cbAttrValueLen, PVOID pAttrValue);
  2117. BOOL   APIENTRY WinSetSysValue(HWND hwndDeskTop, LONG iSysValue, LONG lValue);
  2118.  
  2119. #endif
  2120.  
  2121. #if defined(INCL_WINTIMER)
  2122.  
  2123. ULONG  APIENTRY WinGetCurrentTime(HAB hab);
  2124. ULONG  APIENTRY WinStartTimer(HAB hab, HWND hwnd, ULONG idTimer, ULONG dtTimeout);
  2125. BOOL   APIENTRY WinStopTimer(HAB hab, HWND hwnd, ULONG ulTimer);
  2126.  
  2127. #endif
  2128.  
  2129. #if defined(INCL_WINTRACKRECT)
  2130.  
  2131. typedef struct _TRACKINFO {
  2132.     LONG   cxBorder;
  2133.     LONG   cyBorder;
  2134.     LONG   cxGrid;
  2135.     LONG   cyGrid;
  2136.     LONG   cxKeyboard;
  2137.     LONG   cyKeyboard;
  2138.     RECTL  rclTrack;
  2139.     RECTL  rclBoundary;
  2140.     POINTL ptlMinTrackSize;
  2141.     POINTL ptlMaxTrackSize;
  2142.     ULONG  fs;
  2143. } TRACKINFO, *PTRACKINFO;
  2144.  
  2145. BOOL   APIENTRY WinShowTrackRect(HWND hwnd, BOOL fShow);
  2146. BOOL   APIENTRY WinTrackRect(HWND hwnd, HPS hps, PTRACKINFO ptiTrackinfo);
  2147.  
  2148. #endif
  2149.