home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / detk45he.zip / OS2WIN.H < prev    next >
C/C++ Source or Header  |  1999-03-15  |  232KB  |  7,305 lines

  1. /******************************* Module Header ******************************
  2.  *
  3.  * Module Name: OS2WIN.H
  4.  *
  5.  * OS/2 Developer API Extensions Include File
  6.  *
  7.  * Copyright (c) International Business Machines Corporation 1995
  8.  *
  9.  ***************************************************************************/
  10. #ifndef _OS2WIN_H
  11. #define _OS2WIN_H
  12.  
  13.  
  14. #if __IBMC__ || __IBMCPP__
  15.    #pragma info( none )
  16.    #ifndef __CHKHDR__
  17.       #pragma info( none )
  18.    #endif
  19.    #pragma info( restore )
  20. #endif
  21.  
  22. #pragma pack(4)
  23.  
  24.  
  25. /* Base definitions and error codes defined in separate files
  26.  */
  27. #include "os2wdef.h"
  28. #include "os2werr.h"
  29.  
  30.  
  31. /* Macro Definitions
  32.  */
  33. #define MAKEINTRESOURCE(i)   ((LPSTR)(ULONG)(USHORT)(i))
  34.  
  35. #define MAKEWORD(a, b)       ((WORD)(((BYTE)(a)) | (((WORD)((BYTE)(b))) << 8)))
  36. #define LOWORD(l)            ((WORD)(l))
  37. #define HIWORD(l)            ((WORD)(((DWORD)(l) >> 16) & 0xFFFF))
  38. #define LOBYTE(w)            ((BYTE)(w))
  39. #define HIBYTE(w)            ((BYTE)(((WORD)(w) >> 8) & 0xFF))
  40. #define MAKELONG(a, b)       ((LONG)(((WORD)(a)) | (((DWORD)((WORD)(b))) << 16)))
  41.  
  42. #define POINTTOPOINTS(pt)    (MAKELONG((short)((pt).x), (short)((pt).y)))
  43. #define MAKEWPARAM(l, h)     (WPARAM)MAKELONG(l, h)
  44. #define MAKELPARAM(l, h)     (LPARAM)MAKELONG(l, h)
  45. #define MAKELRESULT(l, h)    (LRESULT)MAKELONG(l, h)
  46.  
  47. #define POINTSTOPOINT(pt, pts) \
  48.                              { (pt).x=(LONG)(SHORT)LOWORD(*(PLONG)&pts);   \
  49.                                (pt).y=(LONG)(SHORT)HIWORD(*(PLONG)&pts); }
  50.  
  51. #define GetRValue(rgb)       ((BYTE)(rgb))
  52. #define GetGValue(rgb)       ((BYTE)(((WORD)(rgb)) >> 8))
  53. #define GetBValue(rgb)       ((BYTE)((rgb)>>16))
  54. #define RGB(r,g,b)           ( (COLORREF) (((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16)))
  55. #define PALETTERGB(r,g,b)    (0x02000000 | RGB(r,g,b))
  56. #define PALETTEINDEX(i)      ((COLORREF)(0x01000000 | (DWORD)(WORD)(i)))
  57.  
  58. #define MINCHAR              0x80
  59. #define MAXCHAR              0x7f
  60. #define MINSHORT             0x8000
  61. #define MAXSHORT             0x7fff
  62. #define MINLONG              0x80000000
  63. #define MAXLONG              0x7fffffff
  64. #define MAXBYTE              0xff
  65. #define MAXWORD              0xffff
  66. #define MAXDWORD             0xffffffff
  67. #define THREAD_PRIORITY_ERROR_RETURN     MAXLONG
  68.  
  69. #define MAKELANGID(p, s)       ((((WORD  )(s)) << 10) | (WORD  )(p))
  70. #define PRIMARYLANGID(lgid)    ((WORD  )(lgid) & 0x3ff)
  71. #define SUBLANGID(lgid)        ((WORD  )(lgid) >> 10)
  72. #define NLS_VALID_LOCALE_MASK  0x000fffff
  73. #define MAKELCID(lgid, srtid)  ((DWORD)((((DWORD)((WORD  )(srtid))) << 16) |  \
  74.                                          ((DWORD)((WORD)(lgid)))))
  75. #define LANGIDFROMLCID(lcid)   ((WORD  )(lcid))
  76. #define SORTIDFROMLCID(lcid)   ((WORD  )((((DWORD)(lcid)) & NLS_VALID_LOCALE_MASK) >> 16))
  77.  
  78. /* Types
  79.  */
  80. typedef USHORT               ATOM;
  81. typedef ULONG                COLORREF;
  82.  
  83. typedef HANDLE               HACCEL;
  84. typedef HANDLE               HBITMAP;
  85. typedef HANDLE               HBRUSH;
  86. typedef HANDLE               HCONV;
  87. typedef DWORD                HCONVLIST;
  88. typedef HANDLE               HCURSOR;
  89. typedef HANDLE               HDC;
  90. typedef HANDLE               HDDEDATA;
  91. typedef HANDLE               HDROP;
  92. typedef HANDLE               HDWP;
  93. typedef HANDLE               HENHMETAFILE;
  94. typedef HANDLE               HFILE;
  95. typedef HANDLE               HFONT;
  96. typedef HANDLE               HGDIOBJ, *PHGDIOBJ;
  97. typedef HANDLE               HGLOBAL;
  98. typedef HANDLE               HHOOK;
  99. typedef HANDLE               HICON;
  100. typedef HANDLE               HINSTANCE;
  101. typedef DWORD                HKEY, *PHKEY;
  102. typedef HANDLE               HKL;
  103. typedef HANDLE               HLOCAL;
  104. typedef HANDLE               HMENU;
  105. typedef HANDLE               HMETAFILE;
  106. typedef HANDLE               HMODULE;
  107. typedef HANDLE               HPALETTE;
  108. typedef HANDLE               HPEN;
  109. typedef HANDLE               HRGN;
  110. typedef HANDLE               HRSRC;
  111. typedef HANDLE               HSTR;
  112. typedef HANDLE               HSZ;
  113. typedef HANDLE               HWND;
  114. typedef HANDLE               GLOBALHANDLE;
  115. typedef HANDLE               LOCALHANDLE;
  116.  
  117. typedef DWORD                CALID;
  118. typedef DWORD                CALTYPE;
  119. typedef WORD                 LANGID;
  120. typedef DWORD                LCID;
  121. typedef DWORD                LCTYPE;
  122.  
  123. #define INVALID_HANDLE_VALUE ((HANDLE)-1)
  124. #define HFILE_ERROR          ((HANDLE)-1)
  125. #define HWND_DESKTOP         ((HWND)0)
  126. #define HWND_BROADCAST       ((HWND)0xFFFF)
  127.  
  128. #define STD_INPUT_HANDLE         ((DWORD)-10)
  129. #define STD_OUTPUT_HANDLE        ((DWORD)-11)
  130. #define STD_ERROR_HANDLE         ((DWORD)-12)
  131.  
  132. /* WM_SIZE Types
  133.  */
  134. #define SIZE_RESTORED        0
  135. #define SIZE_MINIMIZED       1
  136. #define SIZE_MAXIMIZED       2
  137. #define SIZE_MAXSHOW         3
  138. #define SIZE_MAXHIDE         4
  139.  
  140. #define SIZEFULLSCREEN       SIZE_MAXIMIZED
  141. #define SIZEICONIC           SIZE_MINIMIZED
  142. #define SIZENORMAL           SIZE_RESTORED
  143. #define SIZEZOOMHIDE         SIZE_MAXHIDE
  144. #define SIZEZOOMSHOW         SIZE_MAXSHOW
  145.  
  146.  
  147. /* Window Styles
  148.  */
  149. #define WS_OVERLAPPED        0x00000000L
  150. #define WS_POPUP             0x80000000L
  151. #define WS_CHILD             0x40000000L
  152. #define WS_MINIMIZE          0x20000000L
  153. #define WS_VISIBLE           0x10000000L
  154. #define WS_DISABLED          0x08000000L
  155. #define WS_CLIPSIBLINGS      0x04000000L
  156. #define WS_CLIPCHILDREN      0x02000000L
  157. #define WS_MAXIMIZE          0x01000000L
  158. #define WS_BORDER            0x00800000L
  159. #define WS_DLGFRAME          0x00400000L
  160. #define WS_VSCROLL           0x00200000L
  161. #define WS_HSCROLL           0x00100000L
  162. #define WS_SYSMENU           0x00080000L
  163. #define WS_THICKFRAME        0x00040000L
  164. #define WS_GROUP             0x00020000L
  165. #define WS_TABSTOP           0x00010000L
  166.  
  167. #define WS_MINIMIZEBOX       0x00020000L
  168. #define WS_MAXIMIZEBOX       0x00010000L
  169.  
  170. #define WS_CHILDWINDOW       WS_CHILD
  171. #define WS_ICONIC            WS_MINIMIZE
  172. #define WS_SIZEBOX           WS_THICKFRAME
  173. #define WS_TILED             WS_OVERLAPPED
  174. #define WS_TILEDWINDOW       WS_OVERLAPPEDWINDOW
  175.  
  176. #define WS_CAPTION           ( WS_BORDER       | WS_DLGFRAME )
  177. #define WS_OVERLAPPEDWINDOW  ( WS_OVERLAPPED   | WS_CAPTION    | \
  178.                                  WS_SYSMENU      | WS_THICKFRAME | \
  179.                                  WS_MINIMIZEBOX  | WS_MAXIMIZEBOX )
  180. #define WS_POPUPWINDOW       ( WS_POPUP        | WS_BORDER     | \
  181.                                  WS_SYSMENU )
  182.  
  183. #define WS_EX_TOPMOST        0x00000008L
  184. #define WS_EX_ACCEPTFILES    0x00000010L
  185.  
  186. #define CW_USEDEFAULT        ((int)0x80000000)
  187.  
  188.  
  189. /* Class Styles
  190.  */
  191. #define CS_VREDRAW           0x0001
  192. #define CS_HREDRAW           0x0002
  193. #define CS_KEYCVTWINDOW      0x0004
  194. #define CS_DBLCLKS           0x0008
  195. #define CS_OWNDC             0x0020
  196. #define CS_CLASSDC           0x0040
  197. #define CS_PARENTDC          0x0080
  198. #define CS_NOKEYCVT          0x0100
  199. #define CS_NOCLOSE           0x0200
  200. #define CS_SAVEBITS          0x0800
  201. #define CS_BYTEALIGNCLIENT   0x1000
  202. #define CS_BYTEALIGNWINDOW   0x2000
  203. #define CS_GLOBALCLASS       0x4000
  204.  
  205.  
  206. /* Window bytes needed for private dialogs
  207.  */
  208. #define DLGWINDOWEXTRA         30
  209.  
  210.  
  211. /* MessageBox Flags
  212.  */
  213. #define MB_OK                0x00000000L
  214. #define MB_OKCANCEL          0x00000001L
  215. #define MB_ABORTRETRYIGNORE  0x00000002L
  216. #define MB_YESNOCANCEL       0x00000003L
  217. #define MB_YESNO             0x00000004L
  218. #define MB_RETRYCANCEL       0x00000005L
  219.  
  220. #define MB_ICONHAND          0x00000010L
  221. #define MB_ICONQUESTION      0x00000020L
  222. #define MB_ICONEXCLAMATION   0x00000030L
  223. #define MB_ICONASTERISK      0x00000040L
  224.  
  225. #define MB_ICONINFORMATION   MB_ICONASTERISK
  226. #define MB_ICONSTOP          MB_ICONHAND
  227.  
  228. #define MB_DEFBUTTON1        0x00000000L
  229. #define MB_DEFBUTTON2        0x00000100L
  230. #define MB_DEFBUTTON3        0x00000200L
  231.  
  232. #define MB_APPLMODAL         0x00000000L
  233. #define MB_SYSTEMMODAL       0x00001000L
  234.  
  235. #define MB_NOFOCUS                  0x00008000L
  236. #define MB_SETFOREGROUND            0x00010000L
  237. #define MB_SERVICE_NOTIFICATION     0x00040000L
  238.  
  239. #define MB_TYPEMASK          0x0000000FL
  240. #define MB_ICONMASK          0x000000F0L
  241. #define MB_DEFMASK           0x00000F00L
  242. #define MB_MODEMASK          0x00003000L
  243. #define MB_MISCMASK          0x0000C000L
  244.  
  245.  
  246. /* Predefined Resource Types
  247.  */
  248. #define RT_CURSOR            MAKEINTRESOURCE(1)
  249. #define RT_BITMAP            MAKEINTRESOURCE(2)
  250. #define RT_ICON              MAKEINTRESOURCE(3)
  251. #define RT_MENU              MAKEINTRESOURCE(4)
  252. #define RT_DIALOG            MAKEINTRESOURCE(5)
  253. #define RT_STRING            MAKEINTRESOURCE(6)
  254. #define RT_FONTDIR           MAKEINTRESOURCE(7)
  255. #define RT_FONT              MAKEINTRESOURCE(8)
  256. #define RT_ACCELERATOR       MAKEINTRESOURCE(9)
  257. #define RT_RCDATA            MAKEINTRESOURCE(10)
  258. #define RT_MESSAGETABLE      MAKEINTRESOURCE(11)
  259. #define RT_DLGINCLUDE        MAKEINTRESOURCE(17)
  260.  
  261.  
  262. /* System Icons
  263.  */
  264. #define IDI_APPLICATION      MAKEINTRESOURCE(32512)
  265. #define IDI_HAND             MAKEINTRESOURCE(32513)
  266. #define IDI_QUESTION         MAKEINTRESOURCE(32514)
  267. #define IDI_EXCLAMATION      MAKEINTRESOURCE(32515)
  268. #define IDI_ASTERISK         MAKEINTRESOURCE(32516)
  269.  
  270. /* System cursors
  271.  */
  272. #define IDC_ARROW            MAKEINTRESOURCE(32512)
  273. #define IDC_IBEAM            MAKEINTRESOURCE(32513)
  274. #define IDC_WAIT             MAKEINTRESOURCE(32514)
  275. #define IDC_CROSS            MAKEINTRESOURCE(32515)
  276. #define IDC_UPARROW          MAKEINTRESOURCE(32516)
  277. #define IDC_SIZE             MAKEINTRESOURCE(32640)
  278. #define IDC_ICON             MAKEINTRESOURCE(32641)
  279. #define IDC_SIZENWSE         MAKEINTRESOURCE(32642)
  280. #define IDC_SIZENESW         MAKEINTRESOURCE(32643)
  281. #define IDC_SIZEWE           MAKEINTRESOURCE(32644)
  282. #define IDC_SIZENS           MAKEINTRESOURCE(32645)
  283. #define IDC_SIZEALL          MAKEINTRESOURCE(32646)
  284. #define IDC_NO               MAKEINTRESOURCE(32648)
  285. #define IDC_APPSTARTING      MAKEINTRESOURCE(32650)
  286.  
  287. /* System Bitmaps
  288.  */
  289. #define OBM_CLOSE           32754
  290. #define OBM_UPARROW         32753
  291. #define OBM_DNARROW         32752
  292. #define OBM_RGARROW         32751
  293. #define OBM_LFARROW         32750
  294. #define OBM_REDUCE          32749
  295. #define OBM_ZOOM            32748
  296. #define OBM_RESTORE         32747
  297. #define OBM_REDUCED         32746
  298. #define OBM_ZOOMD           32745
  299. #define OBM_RESTORED        32744
  300. #define OBM_UPARROWD        32743
  301. #define OBM_DNARROWD        32742
  302. #define OBM_RGARROWD        32741
  303. #define OBM_LFARROWD        32740
  304. #define OBM_MNARROW         32739
  305. #define OBM_COMBO           32738
  306. #define OBM_UPARROWI        32737
  307. #define OBM_DNARROWI        32736
  308. #define OBM_RGARROWI        32735
  309. #define OBM_LFARROWI        32734
  310. #define OBM_OLD_CLOSE       32767
  311. #define OBM_SIZE            32766
  312. #define OBM_OLD_UPARROW     32765
  313. #define OBM_OLD_DNARROW     32764
  314. #define OBM_OLD_RGARROW     32763
  315. #define OBM_OLD_LFARROW     32762
  316. #define OBM_BTSIZE          32761
  317. #define OBM_CHECK           32760
  318. #define OBM_CHECKBOXES      32759
  319. #define OBM_BTNCORNERS      32758
  320. #define OBM_OLD_REDUCE      32757
  321. #define OBM_OLD_ZOOM        32756
  322. #define OBM_OLD_RESTORE     32755
  323.  
  324. /* Device Capabilities Indices
  325.  */
  326. #define DRIVERVERSION        0
  327. #define TECHNOLOGY           2
  328. #define HORZSIZE             4
  329. #define VERTSIZE             6
  330. #define HORZRES              8
  331. #define VERTRES              10
  332. #define BITSPIXEL            12
  333. #define PLANES               14
  334. #define NUMFONTS             22
  335. #define NUMCOLORS            24
  336. #define PDEVICESIZE          26
  337. #define CURVECAPS            28
  338. #define LINECAPS             30
  339. #define POLYGONALCAPS        32
  340. #define TEXTCAPS             34
  341. #define CLIPCAPS             36
  342. #define RASTERCAPS           38
  343. #define ASPECTX              40
  344. #define ASPECTY              42
  345. #define ASPECTXY             44
  346. #define LOGPIXELSX           88
  347. #define LOGPIXELSY           90
  348. #define SIZEPALETTE          104
  349. #define NUMRESERVED          106
  350. #define COLORRES             108
  351. #define PHYSICALWIDTH        110
  352. #define PHYSICALHEIGHT       111
  353. #define PHYSICALOFFSETX      112
  354. #define PHYSICALOFFSETY      113
  355. #define SCALINGFACTORX       114
  356. #define SCALINGFACTORY       115
  357.  
  358. /* Device Technologies
  359.  */
  360. #define DT_PLOTTER           0
  361. #define DT_RASDISPLAY        1
  362. #define DT_RASPRINTER        2
  363. #define DT_RASCAMERA         3
  364. #define DT_METAFILE          5
  365.  
  366. /* Raster Capabilities
  367.  */
  368. #define RC_BITBLT            0x0001
  369. #define RC_BANDING           0x0002
  370. #define RC_SCALING           0x0004
  371. #define RC_BITMAP64          0x0008
  372. #define RC_DI_BITMAP         0x0080
  373. #define RC_PALETTE           0x0100
  374. #define RC_DIBTODEV          0x0200
  375. #define RC_STRETCHBLT        0x0800
  376. #define RC_FLOODFILL         0x1000
  377. #define RC_STRETCHDIB        0x2000
  378.  
  379. #define CC_NONE              0
  380. #define CC_CIRCLES           1
  381. #define CC_PIE               2
  382. #define CC_CHORD             4
  383. #define CC_ELLIPSES          8
  384. #define CC_WIDE              16
  385. #define CC_STYLED            32
  386. #define CC_WIDESTYLED        64
  387. #define CC_INTERIORS         128
  388. #define CC_ROUNDRECT         256
  389.  
  390. #define LC_NONE              0
  391. #define LC_POLYLINE          2
  392. #define LC_MARKER            4
  393. #define LC_POLYMARKER        8
  394. #define LC_WIDE              16
  395. #define LC_STYLED            32
  396. #define LC_WIDESTYLED        64
  397. #define LC_INTERIORS         128
  398.  
  399. #define PC_NONE              0
  400. #define PC_POLYGON           1
  401. #define PC_RECTANGLE         2
  402. #define PC_WINDPOLYGON       4
  403. #define PC_TRAPEZOID         4
  404. #define PC_SCANLINE          8
  405. #define PC_WIDE              16
  406. #define PC_STYLED            32
  407. #define PC_WIDESTYLED        64
  408. #define PC_INTERIORS         128
  409.  
  410. #define TC_CR_90             0x00000008
  411. #define TC_CR_ANY            0x00000010
  412. #define TC_SF_X_YINDEP       0x00000020
  413. #define TC_SA_INTEGER        0x00000080
  414. #define TC_SA_CONTIN         0x00000100
  415. #define TC_IA_ABLE           0x00000400
  416. #define TC_UA_ABLE           0x00000800
  417. #define TC_SO_ABLE           0x00001000
  418. #define TC_RA_ABLE           0x00002000
  419. #define TC_VA_ABLE           0x00004000
  420. #define TC_RESERVED          0x00008000
  421. #define TC_SCROLLBLT         0x00010000
  422.  
  423.  
  424. /* GetWindow Constants
  425.  */
  426. #define GW_HWNDFIRST         0
  427. #define GW_HWNDLAST          1
  428. #define GW_HWNDNEXT          2
  429. #define GW_HWNDPREV          3
  430. #define GW_OWNER             4
  431. #define GW_CHILD             5
  432. #define GW_MAX               5
  433.  
  434. /* ShowWindow() Constants
  435.  */
  436. #define SW_HIDE              0
  437. #define SW_NORMAL            1
  438. #define SW_SHOWNORMAL        1
  439. #define SW_SHOWMINIMIZED     2
  440. #define SW_MAXIMIZE          3
  441. #define SW_SHOWMAXIMIZED     3
  442. #define SW_SHOWNOACTIVATE    4
  443. #define SW_SHOW              5
  444. #define SW_MINIMIZE          6
  445. #define SW_SHOWMINNOACTIVE   7
  446. #define SW_SHOWNA            8
  447. #define SW_RESTORE           9
  448. #define SW_MAX               10
  449. #define SW_SHOWDEFAULT       10
  450.  
  451. #define HIDE_WINDOW          0
  452. #define SHOW_OPENWINDOW      1
  453. #define SHOW_ICONWINDOW      2
  454. #define SHOW_FULLSCREEN      3
  455. #define SHOW_OPENNOACTIVATE  4
  456.  
  457. #define WA_INACTIVE          0
  458. #define WA_ACTIVE            1
  459. #define WA_CLICKACTIVE       2
  460.  
  461. /* SetWindowPos() Constants
  462.  */
  463. #define SWP_NOSIZE           0x0001
  464. #define SWP_NOMOVE           0x0002
  465. #define SWP_NOZORDER         0x0004
  466. #define SWP_NOREDRAW         0x0008
  467. #define SWP_NOACTIVATE       0x0010
  468. #define SWP_FRAMECHANGED     0x0020
  469. #define SWP_SHOWWINDOW       0x0040
  470. #define SWP_HIDEWINDOW       0x0080
  471. #define SWP_NOCOPYBITS       0x0100
  472. #define SWP_NOOWNERZORDER    0x0200
  473.  
  474. #define SWP_DRAWFRAME        SWP_FRAMECHANGED
  475. #define SWP_NOREPOSITION     SWP_NOOWNERZORDER
  476.  
  477. /* WINDOWPOS Structure sent with WM_WINDOWPOSCHANGING */
  478. typedef struct   _tagWINDOWPOS {
  479.    HWND hwnd;
  480.    HWND hwndInsertAfter;
  481.    int      x;
  482.    int      y;
  483.    int      cx;
  484.    int      cy;
  485.    UINT  flags;
  486.    } WINDOWPOS, *PWINDOWPOS, *LPWINDOWPOS;
  487.  
  488. #define HWND_TOP             ((HWND)0)
  489. #define HWND_BOTTOM          ((HWND)1)
  490. #define HWND_TOPMOST         ((HWND)-1)
  491. #define HWND_NOTOPMOST       ((HWND)-2)
  492.  
  493.  
  494. /* Menu flags for Add/Check/EnableMenuItem
  495.  */
  496. #define MF_BYCOMMAND         0x00000000L
  497. #define MF_ENABLED           0x00000000L
  498. #define MF_INSERT            0x00000000L
  499. #define MF_STRING            0x00000000L
  500. #define MF_UNCHECKED         0x00000000L
  501. #define MF_UNHILITE          0x00000000L
  502. #define MF_GRAYED            0x00000001L
  503. #define MF_DISABLED          0x00000002L
  504. #define MF_BITMAP            0x00000004L
  505. #define MF_CHECKED           0x00000008L
  506. #define MF_POPUP             0x00000010L
  507. #define MF_MENUBARBREAK      0x00000020L
  508. #define MF_MENUBREAK         0x00000040L
  509. #define MF_CHANGE            0x00000080L
  510. #define MF_END               0x00000080L
  511. #define MF_HILITE            0x00000080L
  512. #define MF_APPEND            0x00000100L
  513. #define MF_OWNERDRAW         0x00000100L
  514. #define MF_DELETE            0x00000200L
  515. #define MF_USECHECKBITMAPS   0x00000200L
  516. #define MF_BYPOSITION        0x00000400L
  517. #define MF_SEPARATOR         0x00000800L
  518. #define MF_REMOVE            0x00001000L
  519. #define MF_SYSMENU           0x00002000L
  520. #define MF_HELP              0x00004000L
  521. #define MF_MOUSESELECT       0x00008000L
  522.  
  523.  
  524. /* Get/SetWindowLong Offsets
  525.  */
  526. #define GWL_WNDPROC          (-4)
  527. #define GWL_HINSTANCE        (-6)
  528. #define GWL_HWNDPARENT       (-8)
  529. #define GWL_ID               (-12)
  530. #define GWL_STYLE            (-16)
  531. #define GWL_EXSTYLE          (-20)
  532. #define GWL_USERDATA         (-21)
  533.  
  534. /* Get/SetWindowWord Offsets
  535.  */
  536. #define GWW_HINSTANCE        (-6)
  537. #define GWW_HWNDPARENT       (-8)
  538. #define GWW_ID               (-12)
  539.  
  540. /* Get/SetClassLong Offsets
  541.  */
  542. #define GCL_MENUNAME         (-8)
  543. #define GCL_HBRBACKGROUND    (-10)
  544. #define GCL_HCURSOR          (-12)
  545. #define GCL_HICON            (-14)
  546. #define GCL_HMODULE          (-16)
  547. #define GCL_CBWNDEXTRA       (-18)
  548. #define GCL_CBCLSEXTRA       (-20)
  549. #define GCL_WNDPROC          (-24)
  550. #define GCL_STYLE            (-26)
  551. #define GCW_ATOM             (-32)
  552.  
  553. /* Get/SetClassWord Offsets
  554.  */
  555. #define GCW_HBRBACKGROUND    (-10)
  556. #define GCW_HCURSOR          (-12)
  557. #define GCW_HICON            (-13)
  558. #define GCW_HMODULE          (-14)
  559. #define GCW_CBWNDEXTRA       (-18)
  560. #define GCW_CBCLSEXTRA       (-20)
  561. #define GCW_STYLE            (-26)
  562. #define GCW_ATOM             (-32)
  563.  
  564. /* Get/SetWindowLong Offsets for Dialog Windows
  565.  */
  566. #define DWL_MSGRESULT        0
  567. #define DWL_DLGPROC          4
  568. #define DWL_USER             8
  569.  
  570.  
  571. /* Messages
  572.  */
  573. #define WM_NULL                  0x0000
  574. #define WM_CREATE                0x0001
  575. #define WM_DESTROY               0x0002
  576. #define WM_MOVE                  0x0003
  577. #define WM_SIZE                  0x0005
  578. #define WM_ACTIVATE              0x0006
  579. #define WM_SETFOCUS              0x0007
  580. #define WM_KILLFOCUS             0x0008
  581. #define WM_ENABLE                0x000A
  582. #define WM_SETREDRAW             0x000B
  583. #define WM_SETTEXT               0x000C
  584. #define WM_GETTEXT               0x000D
  585. #define WM_GETTEXTLENGTH         0x000E
  586. #define WM_PAINT                 0x000F
  587. #define WM_CLOSE                 0x0010
  588. #define WM_QUERYENDSESSION       0x0011
  589. #define WM_QUIT                  0x0012
  590. #define WM_QUERYOPEN             0x0013
  591. #define WM_ERASEBKGND            0x0014
  592. #define WM_SYSCOLORCHANGE        0x0015
  593. #define WM_ENDSESSION            0x0016
  594. #define WM_SHOWWINDOW            0x0018
  595. #define WM_WININICHANGE          0x001A
  596. #define WM_DEVMODECHANGE         0x001B
  597. #define WM_ACTIVATEAPP           0x001C
  598. #define WM_FONTCHANGE            0x001D
  599. #define WM_TIMECHANGE            0x001E
  600. #define WM_CANCELMODE            0x001F
  601. #define WM_SETCURSOR             0x0020
  602. #define WM_MOUSEACTIVATE         0x0021
  603. #define WM_CHILDACTIVATE         0x0022
  604. #define WM_QUEUESYNC             0x0023
  605. #define WM_GETMINMAXINFO         0x0024
  606. #define WM_PAINTICON             0x0026
  607. #define WM_ICONERASEBKGND        0x0027
  608. #define WM_NEXTDLGCTL            0x0028
  609. #define WM_SPOOLERSTATUS         0x002A
  610. #define WM_DRAWITEM              0x002B
  611. #define WM_MEASUREITEM           0x002C
  612. #define WM_DELETEITEM            0x002D
  613. #define WM_VKEYTOITEM            0x002E
  614. #define WM_CHARTOITEM            0x002F
  615. #define WM_SETFONT               0x0030
  616. #define WM_GETFONT               0x0031
  617. #define WM_SETHOTKEY             0x0032
  618. #define WM_GETHOTKEY             0x0033
  619. #define WM_QUERYDRAGICON         0x0037
  620. #define WM_COMPAREITEM           0x0039
  621. #define WM_COMPACTING            0x0041
  622. #define WM_WINDOWPOSCHANGING     0x0046
  623. #define WM_WINDOWPOSCHANGED      0x0047
  624. #define WM_POWER                 0x0048
  625. #define WM_COPYDATA              0x004A
  626. #define WM_CANCELJOURNAL         0x004B
  627. #define WM_HELP                  0x0053
  628. #define WM_NCCREATE              0x0081
  629. #define WM_NCDESTROY             0x0082
  630. #define WM_NCCALCSIZE            0x0083
  631. #define WM_NCHITTEST             0x0084
  632. #define WM_NCPAINT               0x0085
  633. #define WM_NCACTIVATE            0x0086
  634. #define WM_GETDLGCODE            0x0087
  635. #define WM_NCMOUSEMOVE           0x00A0
  636. #define WM_NCLBUTTONDOWN         0x00A1
  637. #define WM_NCLBUTTONUP           0x00A2
  638. #define WM_NCLBUTTONDBLCLK       0x00A3
  639. #define WM_NCRBUTTONDOWN         0x00A4
  640. #define WM_NCRBUTTONUP           0x00A5
  641. #define WM_NCRBUTTONDBLCLK       0x00A6
  642. #define WM_NCMBUTTONDOWN         0x00A7
  643. #define WM_NCMBUTTONUP           0x00A8
  644. #define WM_NCMBUTTONDBLCLK       0x00A9
  645. #define EM_GETSEL                0x00B0
  646. #define EM_SETSEL                0x00B1
  647. #define EM_GETRECT               0x00B2
  648. #define EM_SETRECT               0x00B3
  649. #define EM_SETRECTNP             0x00B4
  650. #define EM_SCROLL                0x00B5
  651. #define EM_LINESCROLL            0x00B6
  652. #define EM_SCROLLCARET           0x00B7
  653. #define EM_GETMODIFY             0x00B8
  654. #define EM_SETMODIFY             0x00B9
  655. #define EM_GETLINECOUNT          0x00BA
  656. #define EM_LINEINDEX             0x00BB
  657. #define EM_SETHANDLE             0x00BC
  658. #define EM_GETHANDLE             0x00BD
  659. #define EM_GETTHUMB              0x00BE
  660. #define EM_LINELENGTH            0x00C1
  661. #define EM_REPLACESEL            0x00C2
  662. #define EM_GETLINE               0x00C4
  663. #define EM_LIMITTEXT             0x00C5
  664. #define EM_CANUNDO               0x00C6
  665. #define EM_UNDO                  0x00C7
  666. #define EM_FMTLINES              0x00C8
  667. #define EM_LINEFROMCHAR          0x00C9
  668. #define EM_SETTABSTOPS           0x00CB
  669. #define EM_SETPASSWORDCHAR       0x00CC
  670. #define EM_EMPTYUNDOBUFFER       0x00CD
  671. #define EM_GETFIRSTVISIBLELINE   0x00CE
  672. #define EM_SETREADONLY           0x00CF
  673. #define EM_SETWORDBREAKPROC      0x00D0
  674. #define EM_GETWORDBREAKPROC      0x00D1
  675. #define EM_GETPASSWORDCHAR       0x00D2
  676. #define SBM_SETPOS               0x00E0
  677. #define SBM_GETPOS               0x00E1
  678. #define SBM_SETRANGE             0x00E2
  679. #define SBM_GETRANGE             0x00E3
  680. #define SBM_ENABLE_ARROWS        0x00E4
  681. #define SBM_SETRANGEREDRAW       0x00E6
  682. #define WM_KEYFIRST              0x0100
  683. #define WM_KEYDOWN               0x0100
  684. #define WM_KEYUP                 0x0101
  685. #define WM_CHAR                  0x0102
  686. #define WM_DEADCHAR              0x0103
  687. #define WM_SYSKEYDOWN            0x0104
  688. #define WM_SYSKEYUP              0x0105
  689. #define WM_SYSCHAR               0x0106
  690. #define WM_SYSDEADCHAR           0x0107
  691. #define WM_KEYLAST               0x0108
  692. #define WM_INITDIALOG            0x0110
  693. #define WM_COMMAND               0x0111
  694. #define WM_SYSCOMMAND            0x0112
  695. #define WM_TIMER                 0x0113
  696. #define WM_HSCROLL               0x0114
  697. #define WM_VSCROLL               0x0115
  698. #define WM_INITMENU              0x0116
  699. #define WM_INITMENUPOPUP         0x0117
  700. #define WM_MENUSELECT            0x011F
  701. #define WM_MENUCHAR              0x0120
  702. #define WM_ENTERIDLE             0x0121
  703. #define WM_CTLCOLORMSGBOX        0x0132
  704. #define WM_CTLCOLOREDIT          0x0133
  705. #define WM_CTLCOLORLISTBOX       0x0134
  706. #define WM_CTLCOLORBTN           0x0135
  707. #define WM_CTLCOLORDLG           0x0136
  708. #define WM_CTLCOLORSCROLLBAR     0x0137
  709. #define WM_CTLCOLORSTATIC        0x0138
  710. #define CB_GETEDITSEL            0x0140
  711. #define CB_LIMITTEXT             0x0141
  712. #define CB_SETEDITSEL            0x0142
  713. #define CB_ADDSTRING             0x0143
  714. #define CB_DELETESTRING          0x0144
  715. #define CB_DIR                   0x0145
  716. #define CB_GETCOUNT              0x0146
  717. #define CB_GETCURSEL             0x0147
  718. #define CB_GETLBTEXT             0x0148
  719. #define CB_GETLBTEXTLEN          0x0149
  720. #define CB_INSERTSTRING          0x014A
  721. #define CB_RESETCONTENT          0x014B
  722. #define CB_FINDSTRING            0x014C
  723. #define CB_SELECTSTRING          0x014D
  724. #define CB_SETCURSEL             0x014E
  725. #define CB_SHOWDROPDOWN          0x014F
  726. #define CB_GETITEMDATA           0x0150
  727. #define CB_SETITEMDATA           0x0151
  728. #define CB_GETDROPPEDCONTROLRECT 0x0152
  729. #define CB_SETITEMHEIGHT         0x0153
  730. #define CB_GETITEMHEIGHT         0x0154
  731. #define CB_SETEXTENDEDUI         0x0155
  732. #define CB_GETEXTENDEDUI         0x0156
  733. #define CB_GETDROPPEDSTATE       0x0157
  734. #define CB_FINDSTRINGEXACT       0x0158
  735. #define CB_SETLOCALE             0x0159
  736. #define CB_GETLOCALE             0x015A
  737. #define CB_MSGMAX                0x015B
  738. #define STM_SETICON              0x0170
  739. #define STM_GETICON              0x0171
  740. #define STM_MSGMAX               0x0172
  741. #define LB_ADDSTRING             0x0180
  742. #define LB_INSERTSTRING          0x0181
  743. #define LB_DELETESTRING          0x0182
  744. #define LB_SELITEMRANGEEX        0x0183
  745. #define LB_RESETCONTENT          0x0184
  746. #define LB_SETSEL                0x0185
  747. #define LB_SETCURSEL             0x0186
  748. #define LB_GETSEL                0x0187
  749. #define LB_GETCURSEL             0x0188
  750. #define LB_GETTEXT               0x0189
  751. #define LB_GETTEXTLEN            0x018A
  752. #define LB_GETCOUNT              0x018B
  753. #define LB_SELECTSTRING          0x018C
  754. #define LB_DIR                   0x018D
  755. #define LB_GETTOPINDEX           0x018E
  756. #define LB_FINDSTRING            0x018F
  757. #define LB_GETSELCOUNT           0x0190
  758. #define LB_GETSELITEMS           0x0191
  759. #define LB_SETTABSTOPS           0x0192
  760. #define LB_GETHORIZONTALEXTENT   0x0193
  761. #define LB_SETHORIZONTALEXTENT   0x0194
  762. #define LB_SETCOLUMNWIDTH        0x0195
  763. #define LB_ADDFILE               0x0196
  764. #define LB_SETTOPINDEX           0x0197
  765. #define LB_GETITEMRECT           0x0198
  766. #define LB_GETITEMDATA           0x0199
  767. #define LB_SETITEMDATA           0x019A
  768. #define LB_SELITEMRANGE          0x019B
  769. #define LB_SETANCHORINDEX        0x019C
  770. #define LB_GETANCHORINDEX        0x019D
  771. #define LB_SETCARETINDEX         0x019E
  772. #define LB_GETCARETINDEX         0x019F
  773. #define LB_SETITEMHEIGHT         0x01A0
  774. #define LB_GETITEMHEIGHT         0x01A1
  775. #define LB_FINDSTRINGEXACT       0x01A2
  776. #define LB_SETLOCALE             0x01A5
  777. #define LB_GETLOCALE             0x01A6
  778. #define LB_SETCOUNT              0x01A7
  779. #define LB_MSGMAX                0x01A8
  780. #define WM_MOUSEFIRST            0x0200
  781. #define WM_MOUSEMOVE             0x0200
  782. #define WM_LBUTTONDOWN           0x0201
  783. #define WM_LBUTTONUP             0x0202
  784. #define WM_LBUTTONDBLCLK         0x0203
  785. #define WM_RBUTTONDOWN           0x0204
  786. #define WM_RBUTTONUP             0x0205
  787. #define WM_RBUTTONDBLCLK         0x0206
  788. #define WM_MBUTTONDOWN           0x0207
  789. #define WM_MBUTTONUP             0x0208
  790. #define WM_MBUTTONDBLCLK         0x0209
  791. #define WM_MOUSELAST             0x0209
  792. #define WM_PARENTNOTIFY          0x0210
  793. #define WM_ENTERMENULOOP         0x0211
  794. #define WM_EXITMENULOOP          0x0212
  795. #define WM_MDICREATE             0x0220
  796. #define WM_MDIDESTROY            0x0221
  797. #define WM_MDIACTIVATE           0x0222
  798. #define WM_MDIRESTORE            0x0223
  799. #define WM_MDINEXT               0x0224
  800. #define WM_MDIMAXIMIZE           0x0225
  801. #define WM_MDITILE               0x0226
  802. #define WM_MDICASCADE            0x0227
  803. #define WM_MDIICONARRANGE        0x0228
  804. #define WM_MDIGETACTIVE          0x0229
  805. #define WM_MDISETMENU            0x0230
  806. #define WM_DROPFILES             0x0233
  807. #define WM_MDIREFRESHMENU        0x0234
  808. #define WM_CUT                   0x0300
  809. #define WM_COPY                  0x0301
  810. #define WM_PASTE                 0x0302
  811. #define WM_CLEAR                 0x0303
  812. #define WM_UNDO                  0x0304
  813. #define WM_RENDERFORMAT          0x0305
  814. #define WM_RENDERALLFORMATS      0x0306
  815. #define WM_DESTROYCLIPBOARD      0x0307
  816. #define WM_DRAWCLIPBOARD         0x0308
  817. #define WM_PAINTCLIPBOARD        0x0309
  818. #define WM_VSCROLLCLIPBOARD      0x030A
  819. #define WM_SIZECLIPBOARD         0x030B
  820. #define WM_ASKCBFORMATNAME       0x030C
  821. #define WM_CHANGECBCHAIN         0x030D
  822. #define WM_HSCROLLCLIPBOARD      0x030E
  823. #define WM_QUERYNEWPALETTE       0x030F
  824. #define WM_PALETTEISCHANGING     0x0310
  825. #define WM_PALETTECHANGED        0x0311
  826. #define WM_HOTKEY                0x0312
  827. #define WM_DDE_FIRST             0x03E0
  828. #define WM_DDE_INITIATE          (WM_DDE_FIRST)
  829. #define WM_DDE_TERMINATE         (WM_DDE_FIRST + 1)
  830. #define WM_DDE_ADVISE            (WM_DDE_FIRST + 2)
  831. #define WM_DDE_UNADVISE          (WM_DDE_FIRST + 3)
  832. #define WM_DDE_ACK               (WM_DDE_FIRST + 4)
  833. #define WM_DDE_DATA              (WM_DDE_FIRST + 5)
  834. #define WM_DDE_REQUEST           (WM_DDE_FIRST + 6)
  835. #define WM_DDE_POKE              (WM_DDE_FIRST + 7)
  836. #define WM_DDE_EXECUTE           (WM_DDE_FIRST + 8)
  837. #define WM_DDE_LAST              (WM_DDE_FIRST + 8)
  838. #define WM_USER                  0x0400
  839.  
  840. #define WM_CHOOSEFONT_GETLOGFONT (WM_USER + 1)
  841.  
  842.  
  843. /* MDI client style bits
  844.  */
  845. #define MDIS_ALLCHILDSTYLES  0x0001
  846.  
  847. /* wParam Flags for WM_MDITILE and WM_MDICASCADE messages.
  848.  */
  849. #define MDITILE_VERTICAL     0x0000
  850. #define MDITILE_HORIZONTAL   0x0001
  851. #define MDITILE_SKIPDISABLED 0x0002
  852.  
  853.  
  854. /* WM_MOUSEACTIVATE Return Codes
  855.  */
  856. #define MA_ACTIVATE          1
  857. #define MA_ACTIVATEANDEAT    2
  858. #define MA_NOACTIVATE        3
  859. #define MA_NOACTIVATEANDEAT  4
  860.  
  861.  
  862. /* Dialog and Message Box IDs
  863.  */
  864. #define IDOK                 1
  865. #define IDCANCEL             2
  866. #define IDABORT              3
  867. #define IDRETRY              4
  868. #define IDIGNORE             5
  869. #define IDYES                6
  870. #define IDNO                 7
  871. #define IDCLOSE              8
  872. #define IDHELP               9
  873.  
  874.  
  875. /* Font Families
  876.  */
  877. #define FF_DONTCARE          0x0000
  878. #define FF_ROMAN             0x0010
  879. #define FF_SWISS             0x0020
  880. #define FF_MODERN            0x0030
  881. #define FF_SCRIPT            0x0040
  882. #define FF_DECORATIVE        0x0050
  883.  
  884. /* Font Bold Weight Values
  885.  */
  886. #define FW_DONTCARE          0
  887. #define FW_THIN              100
  888. #define FW_EXTRALIGHT        200
  889. #define FW_LIGHT             300
  890. #define FW_NORMAL            400
  891. #define FW_MEDIUM            500
  892. #define FW_SEMIBOLD          600
  893. #define FW_BOLD              700
  894. #define FW_EXTRABOLD         800
  895. #define FW_HEAVY             900
  896.  
  897. #define FW_BLACK             FW_HEAVY
  898. #define FW_DEMIBOLD          FW_SEMIBOLD
  899. #define FW_REGULAR           FW_NORMAL
  900. #define FW_ULTRABOLD         FW_EXTRABOLD
  901. #define FW_ULTRALIGHT        FW_EXTRALIGHT
  902.  
  903.  
  904. /* ChooseColor flag definitions
  905.  */
  906. #define CC_RGBINIT               0x00000001L
  907. #define CC_FULLOPEN              0x00000002L
  908. #define CC_PREVENTFULLOPEN       0x00000004L
  909. #define CC_SHOWHELP              0x00000008L
  910. #define CC_ENABLEHOOK            0x00000010L
  911. #define CC_ENABLETEMPLATE        0x00000020L
  912. #define CC_ENABLETEMPLATEHANDLE  0x00000040L
  913.  
  914. /* FindText and ReplaceText flag definitions
  915.  */
  916. #define FR_DOWN                  0x00000001L
  917. #define FR_WHOLEWORD             0x00000002L
  918. #define FR_MATCHCASE             0x00000004L
  919. #define FR_FINDNEXT              0x00000008L
  920. #define FR_REPLACE               0x00000010L
  921. #define FR_REPLACEALL            0x00000020L
  922. #define FR_DIALOGTERM            0x00000040L
  923. #define FR_SHOWHELP              0x00000080L
  924. #define FR_ENABLEHOOK            0x00000100L
  925. #define FR_ENABLETEMPLATE        0x00000200L
  926. #define FR_NOUPDOWN              0x00000400L
  927. #define FR_NOMATCHCASE           0x00000800L
  928. #define FR_NOWHOLEWORD           0x00001000L
  929. #define FR_ENABLETEMPLATEHANDLE  0x00002000L
  930. #define FR_HIDEUPDOWN            0x00004000L
  931. #define FR_HIDEMATCHCASE         0x00008000L
  932. #define FR_HIDEWHOLEWORD         0x00010000L
  933.  
  934. /* Common Dialog Error Codes
  935.  */
  936. #define CDERR_GENERALCODES       0x0000
  937. #define CDERR_STRUCTSIZE         0x0001
  938. #define CDERR_INITIALIZATION     0x0002
  939. #define CDERR_NOTEMPLATE         0x0003
  940. #define CDERR_NOHINSTANCE        0x0004
  941. #define CDERR_LOADSTRFAILURE     0x0005
  942. #define CDERR_FINDRESFAILURE     0x0006
  943. #define CDERR_LOADRESFAILURE     0x0007
  944. #define CDERR_LOCKRESFAILURE     0x0008
  945. #define CDERR_MEMALLOCFAILURE    0x0009
  946. #define CDERR_MEMLOCKFAILURE     0x000A
  947. #define CDERR_NOHOOK             0x000B
  948. #define CDERR_REGISTERMSGFAIL    0x000C
  949. #define PDERR_PRINTERCODES       0x1000
  950. #define PDERR_SETUPFAILURE       0x1001
  951. #define PDERR_PARSEFAILURE       0x1002
  952. #define PDERR_RETDEFFAILURE      0x1003
  953. #define PDERR_LOADDRVFAILURE     0x1004
  954. #define PDERR_GETDEVMODEFAIL     0x1005
  955. #define PDERR_INITFAILURE        0x1006
  956. #define PDERR_NODEVICES          0x1007
  957. #define PDERR_NODEFAULTPRN       0x1008
  958. #define PDERR_DNDMMISMATCH       0x1009
  959. #define PDERR_CREATEICFAILURE    0x100A
  960. #define PDERR_PRINTERNOTFOUND    0x100B
  961. #define PDERR_DEFAULTDIFFERENT   0x100C
  962. #define CFERR_CHOOSEFONTCODES    0x2000
  963. #define CFERR_NOFONTS            0x2001
  964. #define CFERR_MAXLESSTHANMIN     0x2002
  965. #define FNERR_FILENAMECODES      0x3000
  966. #define FNERR_SUBCLASSFAILURE    0x3001
  967. #define FNERR_INVALIDFILENAME    0x3002
  968. #define FNERR_BUFFERTOOSMALL     0x3003
  969. #define FRERR_FINDREPLACECODES   0x4000
  970. #define FRERR_BUFFERLENGTHZERO   0x4001
  971. #define CCERR_CHOOSECOLORCODES   0x5000
  972. #define CDERR_DIALOGFAILURE      0xFFFF
  973.  
  974. /* ChooseFont flags.
  975.  */
  976. #define CF_SCREENFONTS           0x00000001
  977. #define CF_PRINTERFONTS          0x00000002
  978. #define CF_SHOWHELP              0x00000004
  979. #define CF_ENABLEHOOK            0x00000008
  980. #define CF_ENABLETEMPLATE        0x00000010
  981. #define CF_ENABLETEMPLATEHANDLE  0x00000020
  982. #define CF_INITTOLOGFONTSTRUCT   0x00000040
  983. #define CF_USESTYLE              0x00000080
  984. #define CF_EFFECTS               0x00000100
  985. #define CF_APPLY                 0x00000200
  986. #define CF_ANSIONLY              0x00000400
  987. #define CF_NOVECTORFONTS         0x00000800
  988. #define CF_NOSIMULATIONS         0x00001000
  989. #define CF_LIMITSIZE             0x00002000
  990. #define CF_FIXEDPITCHONLY        0x00004000
  991. #define CF_WYSIWYG               0x00008000
  992. #define CF_FORCEFONTEXIST        0x00010000
  993. #define CF_SCALABLEONLY          0x00020000
  994. #define CF_TTONLY                0x00040000
  995. #define CF_NOFACESEL             0x00080000
  996. #define CF_NOSTYLESEL            0x00100000
  997. #define CF_NOSIZESEL             0x00200000
  998. #define CF_BOTH                  (CF_SCREENFONTS | CF_PRINTERFONTS)
  999. #define CF_NOOEMFONTS            CF_NOVECTORFONTS
  1000.  
  1001. /* Common Dialog User Registered Messages
  1002.  */
  1003. #define COLOROKSTRING            "commdlg_ColorOK"
  1004. #define FILEOKSTRING             "commdlg_FileNameOK"
  1005. #define FINDMSGSTRING            "commdlg_FindReplace"
  1006. #define HELPMSGSTRING            "commdlg_help"
  1007. #define LBSELCHSTRING            "commdlg_LBSelChangedNotify"
  1008. #define SETRGBSTRING             "commdlg_SetRGBColor"
  1009. #define SHAREVISTRING            "commdlg_ShareViolation"
  1010.  
  1011. /* Font types
  1012.  */
  1013. #define SIMULATED_FONTTYPE       0x8000
  1014. #define PRINTER_FONTTYPE         0x4000
  1015. #define SCREEN_FONTTYPE          0x2000
  1016. #define BOLD_FONTTYPE            0x0100
  1017. #define ITALIC_FONTTYPE          0x0200
  1018. #define REGULAR_FONTTYPE         0x0400
  1019.  
  1020. /* Character sets
  1021.  */
  1022. #define ANSI_CHARSET             0
  1023. #define SYMBOL_CHARSET           2
  1024. #define OEM_CHARSET              255
  1025.  
  1026. /* Output precision
  1027.  */
  1028. #define OUT_DEFAULT_PRECIS       0
  1029. #define OUT_STRING_PRECIS        1
  1030. #define OUT_CHARACTER_PRECIS     2
  1031. #define OUT_STROKE_PRECIS        3
  1032.  
  1033. /* Clip precision
  1034.  */
  1035. #define CLIP_DEFAULT_PRECIS      0
  1036. #define CLIP_CHARACTER_PRECIS    1
  1037. #define CLIP_STROKE_PRECIS       2
  1038.  
  1039. /* Font quality
  1040.  */
  1041. #define DEFAULT_QUALITY          0
  1042. #define DRAFT_QUALITY            1
  1043. #define PROOF_QUALITY            2
  1044.  
  1045. /* PitchAndFamily values for CreateFont
  1046.  */
  1047. #define DEFAULT_PITCH            0
  1048. #define FIXED_PITCH              1
  1049. #define VARIABLE_PITCH           2
  1050.  
  1051. /* GDI Escapes
  1052.  */
  1053. #define NEWFRAME                     1
  1054. #define ABORTDOC                     2
  1055. #define NEXTBAND                     3
  1056. #define SETCOLORTABLE                4
  1057. #define GETCOLORTABLE                5
  1058. #define FLUSHOUTPUT                  6
  1059. #define DRAFTMODE                    7
  1060. #define QUERYESCSUPPORT              8
  1061. #define SETABORTPROC                 9
  1062. #define STARTDOC                     10
  1063. #define ENDDOC                       11
  1064. #define GETPHYSPAGESIZE              12
  1065. #define GETPRINTINGOFFSET            13
  1066. #define GETSCALINGFACTOR             14
  1067. #define MFCOMMENT                    15
  1068. #define GETPENWIDTH                  16
  1069. #define SETCOPYCOUNT                 17
  1070. #define SELECTPAPERSOURCE            18
  1071. #define DEVICEDATA                   19
  1072. #define PASSTHROUGH                  19
  1073. #define GETTECHNOLGY                 20
  1074. #define GETTECHNOLOGY                20
  1075. #define SETLINECAP                   21
  1076. #define SETLINEJOIN                  22
  1077. #define SETMITERLIMIT                23
  1078. #define BANDINFO                     24
  1079. #define DRAWPATTERNRECT              25
  1080. #define GETVECTORPENSIZE             26
  1081. #define GETVECTORBRUSHSIZE           27
  1082. #define ENABLEDUPLEX                 28
  1083. #define GETSETPAPERBINS              29
  1084. #define GETSETPRINTORIENT            30
  1085. #define ENUMPAPERBINS                31
  1086. #define SETDIBSCALING                32
  1087. #define EPSPRINTING                  33
  1088. #define ENUMPAPERMETRICS             34
  1089. #define GETSETPAPERMETRICS           35
  1090. #define POSTSCRIPT_DATA              37
  1091. #define POSTSCRIPT_IGNORE            38
  1092. #define MOUSETRAILS                  39
  1093. #define GETDEVICEUNITS               42
  1094.  
  1095. #define GETEXTENDEDTEXTMETRICS       256
  1096. #define GETEXTENTTABLE               257
  1097. #define GETPAIRKERNTABLE             258
  1098. #define GETTRACKKERNTABLE            259
  1099. #define EXTTEXTOUT                   512
  1100. #define GETFACENAME                  513
  1101. #define DOWNLOADFACE                 514
  1102. #define ENABLERELATIVEWIDTHS         768
  1103. #define ENABLEPAIRKERNING            769
  1104. #define SETKERNTRACK                 770
  1105. #define SETALLJUSTVALUES             771
  1106. #define SETCHARSET                   772
  1107.  
  1108. #define STRETCHBLT                   2048
  1109. #define GETSETSCREENPARAMS           3072
  1110. #define QUERYDIBSUPPORT              3073
  1111. #define BEGIN_PATH                   4096
  1112. #define CLIP_TO_PATH                 4097
  1113. #define END_PATH                     4098
  1114. #define EXT_DEVICE_CAPS              4099
  1115. #define RESTORE_CTM                  4100
  1116. #define SAVE_CTM                     4101
  1117. #define SET_ARC_DIRECTION            4102
  1118. #define SET_BACKGROUND_COLOR         4103
  1119. #define SET_POLY_MODE                4104
  1120. #define SET_SCREEN_ANGLE             4105
  1121. #define SET_SPREAD                   4106
  1122. #define TRANSFORM_CTM                4107
  1123. #define SET_CLIP_BOX                 4108
  1124. #define SET_BOUNDS                   4109
  1125. #define SET_MIRROR_MODE              4110
  1126. #define OPENCHANNEL                  4110
  1127. #define DOWNLOADHEADER               4111
  1128. #define CLOSECHANNEL                 4112
  1129. #define POSTSCRIPT_PASSTHROUGH       4115
  1130. #define ENCAPSULATED_POSTSCRIPT      4116
  1131.  
  1132. #define DS_ABSALIGN              0x001L
  1133. #define DS_SYSMODAL              0x002L
  1134. #define DS_LOCALEDIT             0x020L
  1135. #define DS_SETFONT               0x040L
  1136. #define DS_MODALFRAME            0x080L
  1137. #define DS_NOIDLEMSG             0x100L
  1138. #define DS_SETFOREGROUND         0x200L
  1139.  
  1140. #define DM_GETDEFID                (WM_USER + 0)
  1141. #define DM_SETDEFID                (WM_USER + 1)
  1142.  
  1143. #define DC_HASDEFID              0x534B
  1144.  
  1145. #define DLGC_WANTARROWS          0x0001
  1146. #define DLGC_WANTTAB             0x0002
  1147. #define DLGC_WANTALLKEYS         0x0004
  1148. #define DLGC_WANTMESSAGE         0x0004
  1149. #define DLGC_HASSETSEL           0x0008
  1150. #define DLGC_DEFPUSHBUTTON       0x0010
  1151. #define DLGC_UNDEFPUSHBUTTON     0x0020
  1152. #define DLGC_RADIOBUTTON         0x0040
  1153. #define DLGC_WANTCHARS           0x0080
  1154. #define DLGC_STATIC              0x0100
  1155. #define DLGC_BUTTON              0x2000
  1156.  
  1157.  
  1158.  
  1159. /* OpenFile mode flags
  1160.  */
  1161. #define OF_READ                      0x00000000
  1162. #define OF_WRITE                     0x00000001
  1163. #define OF_READWRITE                 0x00000002
  1164. #define OF_SHARE_COMPAT              0x00000000
  1165. #define OF_SHARE_EXCLUSIVE           0x00000010
  1166. #define OF_SHARE_DENY_WRITE          0x00000020
  1167. #define OF_SHARE_DENY_READ           0x00000030
  1168. #define OF_SHARE_DENY_NONE           0x00000040
  1169. #define OF_PARSE                     0x00000100
  1170. #define OF_DELETE                    0x00000200
  1171. #define OF_VERIFY                    0x00000400
  1172. #define OF_CANCEL                    0x00000800
  1173. #define OF_CREATE                    0x00001000
  1174. #define OF_PROMPT                    0x00002000
  1175. #define OF_EXIST                     0x00004000
  1176. #define OF_REOPEN                    0x00008000
  1177.  
  1178. /* Generic access flags for CreateFile
  1179.  */
  1180. #define GENERIC_READ                 0x80000000
  1181. #define GENERIC_WRITE                0x40000000
  1182. #define GENERIC_EXECUTE              0x20000000
  1183. #define GENERIC_ALL                  0x10000000
  1184.  
  1185. /* Share & Attribute flags for CreateFile
  1186.  */
  1187. #define FILE_SHARE_READ              0x00000001
  1188. #define FILE_SHARE_WRITE             0x00000002
  1189. #define FILE_ATTRIBUTE_READONLY      0x00000001
  1190. #define FILE_ATTRIBUTE_HIDDEN        0x00000002
  1191. #define FILE_ATTRIBUTE_SYSTEM        0x00000004
  1192. #define FILE_ATTRIBUTE_DIRECTORY     0x00000010
  1193. #define FILE_ATTRIBUTE_ARCHIVE       0x00000020
  1194. #define FILE_ATTRIBUTE_NORMAL        0x00000080
  1195. #define FILE_ATTRIBUTE_TEMPORARY     0x00000100
  1196. #define FILE_ATTRIBUTE_ATOMIC_WRITE  0x00000200
  1197. #define FILE_ATTRIBUTE_XACTION_WRITE 0x00000400
  1198. #define FILE_ATTRIBUTE_COMPRESSED    0x00000800
  1199. #define FILE_ATTRIBUTE_HAS_EMBEDDING 0x00001000
  1200.  
  1201. /* Create option for CreateFile
  1202.  */
  1203. #define CREATE_NEW                   1
  1204. #define CREATE_ALWAYS                2
  1205. #define OPEN_EXISTING                3
  1206. #define OPEN_ALWAYS                  4
  1207. #define TRUNCATE_EXISTING            5
  1208.  
  1209. /* Access file flags
  1210.  */
  1211. #define FILE_FLAG_WRITE_THROUGH      0x80000000
  1212. #define FILE_FLAG_OVERLAPPED         0x40000000
  1213. #define FILE_FLAG_NO_BUFFERING       0x20000000
  1214. #define FILE_FLAG_RANDOM_ACCESS      0x10000000
  1215. #define FILE_FLAG_SEQUENTIAL_SCAN    0x08000000
  1216. #define FILE_FLAG_DELETE_ON_CLOSE    0x04000000
  1217. #define FILE_FLAG_BACKUP_SEMANTICS   0x02000000
  1218. #define FILE_FLAG_POSIX_SEMANTICS    0x01000000
  1219.  
  1220. /* SetFilePointer Flags
  1221.  */
  1222. #define FILE_BEGIN                   0
  1223. #define FILE_CURRENT                 1
  1224. #define FILE_END                     2
  1225.  
  1226. /* GetFileType Flags
  1227.  */
  1228. #define FILE_TYPE_UNKNOWN            0x00000000
  1229. #define FILE_TYPE_DISK               0x00000001
  1230. #define FILE_TYPE_CHAR               0x00000002
  1231. #define FILE_TYPE_PIPE               0x00000003
  1232. #define FILE_TYPE_REMOTE             0x00008000
  1233.  
  1234. /* GetVolumeInformation Flags
  1235.  */
  1236. #define FS_CASE_IS_PRESERVED         FILE_CASE_PRESERVED_NAMES
  1237. #define FS_CASE_SENSITIVE            FILE_CASE_SENSITIVE_SEARCH
  1238. #define FS_UNICODE_STORED_ON_DISK    FILE_UNICODE_ON_DISK
  1239.  
  1240.  
  1241. /* DllEntryPoint flags
  1242.  */
  1243. #define DLL_PROCESS_DETACH           0
  1244. #define DLL_PROCESS_ATTACH           1
  1245.  
  1246.  
  1247. /* GetQueueStatus Flags
  1248.  */
  1249. #define QS_KEY           0x01
  1250. #define QS_MOUSEMOVE     0x02
  1251. #define QS_MOUSEBUTTON   0x04
  1252. #define QS_POSTMESSAGE   0x08
  1253. #define QS_TIMER         0x10
  1254. #define QS_PAINT         0x20
  1255. #define QS_SENDMESSAGE   0x40
  1256. #define QS_HOTKEY        0x80
  1257. #define QS_MOUSE        (QS_MOUSEMOVE | QS_MOUSEBUTTON)
  1258. #define QS_INPUT        (QS_MOUSE     | QS_KEY)
  1259. #define QS_ALLEVENTS    (QS_INPUT     | QS_POSTMESSAGE   | QS_TIMER         | \
  1260.                            QS_PAINT     | QS_HOTKEY)
  1261. #define QS_ALLINPUT     (QS_SENDMESSAGE  | QS_PAINT      | QS_TIMER         | \
  1262.                            QS_POSTMESSAGE  | QS_MOUSEBUTTON | QS_MOUSEMOVE     | \
  1263.                            QS_HOTKEY       | QS_KEY)
  1264.  
  1265.  
  1266. /* Maximum path length
  1267.  */
  1268. #define  MAX_PATH                    260
  1269.  
  1270. /* OPENFILENAME struct flags
  1271.  */
  1272. #define OFN_READONLY                 0x00000001
  1273. #define OFN_OVERWRITEPROMPT          0x00000002
  1274. #define OFN_HIDEREADONLY             0x00000004
  1275. #define OFN_NOCHANGEDIR              0x00000008
  1276. #define OFN_SHOWHELP                 0x00000010
  1277. #define OFN_ENABLEHOOK               0x00000020
  1278. #define OFN_ENABLETEMPLATE           0x00000040
  1279. #define OFN_ENABLETEMPLATEHANDLE     0x00000080
  1280. #define OFN_NOVALIDATE               0x00000100
  1281. #define OFN_ALLOWMULTISELECT         0x00000200
  1282. #define OFN_EXTENSIONDIFFERENT       0x00000400
  1283. #define OFN_PATHMUSTEXIST            0x00000800
  1284. #define OFN_FILEMUSTEXIST            0x00001000
  1285. #define OFN_CREATEPROMPT             0x00002000
  1286. #define OFN_SHAREAWARE               0x00004000
  1287. #define OFN_NOREADONLYRETURN         0x00008000
  1288. #define OFN_NOTESTFILECREATE         0x00010000
  1289. #define OFN_NONETWORKBUTTON          0x00020000
  1290. #define OFN_NOLONGNAMES              0x00040000
  1291.  
  1292. /* SHAREVISTRING Return Values
  1293.  */
  1294. #define OFN_SHAREWARN                0
  1295. #define OFN_SHARENOWARN              1
  1296. #define OFN_SHAREFALLTHROUGH         2
  1297.  
  1298. /* Values for high word of lparam of LBSELCHSTRING messages
  1299.  */
  1300. #define CD_LBSELNOITEMS             -1
  1301. #define CD_LBSELCHANGE               0
  1302. #define CD_LBSELSUB                  1
  1303. #define CD_LBSELADD                  2
  1304.  
  1305. /* PeekMessage Options
  1306.  */
  1307. #define PM_NOREMOVE          0x0000
  1308. #define PM_REMOVE            0x0001
  1309. #define PM_NOYIELD           0x0002
  1310.  
  1311. /* Edit Control Styles
  1312.  */
  1313. #define ES_LEFT              0x0000L
  1314. #define ES_CENTER            0x0001L
  1315. #define ES_RIGHT             0x0002L
  1316. #define ES_MULTILINE         0x0004L
  1317. #define ES_UPPERCASE         0x0008L
  1318. #define ES_LOWERCASE         0x0010L
  1319. #define ES_PASSWORD          0x0020L
  1320. #define ES_AUTOVSCROLL       0x0040L
  1321. #define ES_AUTOHSCROLL       0x0080L
  1322. #define ES_NOHIDESEL         0x0100L
  1323. #define ES_OEMCONVERT        0x0400L
  1324. #define ES_READONLY          0x0800L
  1325. #define ES_WANTRETURN        0x1000L
  1326.  
  1327. /* Edit Control Notification Codes
  1328.  */
  1329. #define EN_SETFOCUS          0x0100
  1330. #define EN_KILLFOCUS         0x0200
  1331. #define EN_CHANGE            0x0300
  1332. #define EN_UPDATE            0x0400
  1333. #define EN_ERRSPACE          0x0500
  1334. #define EN_MAXTEXT           0x0501
  1335. #define EN_HSCROLL           0x0601
  1336. #define EN_VSCROLL           0x0602
  1337.  
  1338.  
  1339. /* Listbox Styles
  1340.  */
  1341. #define LBS_NOTIFY               0x0001L
  1342. #define LBS_SORT                 0x0002L
  1343. #define LBS_NOREDRAW             0x0004L
  1344. #define LBS_MULTIPLESEL          0x0008L
  1345. #define LBS_OWNERDRAWFIXED       0x0010L
  1346. #define LBS_OWNERDRAWVARIABLE    0x0020L
  1347. #define LBS_HASSTRINGS           0x0040L
  1348. #define LBS_USETABSTOPS          0x0080L
  1349. #define LBS_NOINTEGRALHEIGHT     0x0100L
  1350. #define LBS_MULTICOLUMN          0x0200L
  1351. #define LBS_WANTKEYBOARDINPUT    0x0400L
  1352. #define LBS_EXTENDEDSEL          0x0800L
  1353. #define LBS_DISABLENOSCROLL      0x1000L
  1354. #define LBS_NODATA               0x2000L
  1355. #define LBS_STANDARD             ( LBS_NOTIFY | LBS_SORT | \
  1356.                                      WS_VSCROLL | WS_BORDER )
  1357.  
  1358. /* Listbox Return Values
  1359.  */
  1360. #define LB_ERRSPACE          (-2)
  1361. #define LB_ERR               (-1)
  1362. #define LB_OKAY              0
  1363.  
  1364. /* Listbox Notification Codes
  1365.  */
  1366. #define LBN_ERRSPACE         (-2)
  1367. #define LBN_SELCHANGE        1
  1368. #define LBN_DBLCLK           2
  1369. #define LBN_SELCANCEL        3
  1370. #define LBN_SETFOCUS         4
  1371. #define LBN_KILLFOCUS        5
  1372.  
  1373. /* DlgDirList, DlgDirListComboBox flags values
  1374.  */
  1375. #define DDL_READWRITE        0x0000
  1376. #define DDL_READONLY         0x0001
  1377. #define DDL_HIDDEN           0x0002
  1378. #define DDL_SYSTEM           0x0004
  1379. #define DDL_DIRECTORY        0x0010
  1380. #define DDL_ARCHIVE          0x0020
  1381.  
  1382. #define DDL_POSTMSGS         0x2000
  1383. #define DDL_DRIVES           0x4000
  1384. #define DDL_EXCLUSIVE        0x8000
  1385.  
  1386. /* Combo Box return Values
  1387.  */
  1388. #define CB_ERRSPACE          (-2)
  1389. #define CB_ERR               (-1)
  1390. #define CB_OKAY              0
  1391.  
  1392. /* Combo Box Notification Codes
  1393.  */
  1394. #define CBN_ERRSPACE         (-1)
  1395. #define CBN_SELCHANGE        1
  1396. #define CBN_DBLCLK           2
  1397. #define CBN_SETFOCUS         3
  1398. #define CBN_KILLFOCUS        4
  1399. #define CBN_EDITCHANGE       5
  1400. #define CBN_EDITUPDATE       6
  1401. #define CBN_DROPDOWN         7
  1402. #define CBN_CLOSEUP          8
  1403. #define CBN_SELENDOK         9
  1404. #define CBN_SELENDCANCEL     10
  1405.  
  1406. /* Combo Box styles
  1407.  */
  1408. #define CBS_SIMPLE            0x0001L
  1409. #define CBS_DROPDOWN          0x0002L
  1410. #define CBS_DROPDOWNLIST      0x0003L
  1411. #define CBS_OWNERDRAWFIXED    0x0010L
  1412. #define CBS_OWNERDRAWVARIABLE 0x0020L
  1413. #define CBS_AUTOHSCROLL       0x0040L
  1414. #define CBS_OEMCONVERT        0x0080L
  1415. #define CBS_SORT              0x0100L
  1416. #define CBS_HASSTRINGS        0x0200L
  1417. #define CBS_NOINTEGRALHEIGHT  0x0400L
  1418. #define CBS_DISABLENOSCROLL   0x0800L
  1419.  
  1420. /* Scroll Bar Constants
  1421.  */
  1422. #define SB_HORZ              0
  1423. #define SB_VERT              1
  1424. #define SB_CTL               2
  1425. #define SB_BOTH              3
  1426.  
  1427. #define ESB_ENABLE_BOTH      0
  1428. #define ESB_DISABLE_LTUP     1
  1429. #define ESB_DISABLE_RTDN     2
  1430. #define ESB_DISABLE_BOTH     3
  1431.  
  1432. /* Scroll Bar Commands
  1433.  */
  1434. #define SB_LINEUP            0
  1435. #define SB_LINELEFT          0
  1436. #define SB_LINEDOWN          1
  1437. #define SB_LINERIGHT         1
  1438. #define SB_PAGEUP            2
  1439. #define SB_PAGELEFT          2
  1440. #define SB_PAGEDOWN          3
  1441. #define SB_PAGERIGHT         3
  1442. #define SB_THUMBPOSITION     4
  1443. #define SB_THUMBTRACK        5
  1444. #define SB_TOP               6
  1445. #define SB_LEFT              6
  1446. #define SB_BOTTOM            7
  1447. #define SB_RIGHT             7
  1448. #define SB_ENDSCROLL         8
  1449.  
  1450. /* Scroll Bar Styles
  1451.  */
  1452. #define SBS_HORZ                    0x0000L
  1453. #define SBS_VERT                    0x0001L
  1454. #define SBS_TOPALIGN                0x0002L
  1455. #define SBS_LEFTALIGN               0x0002L
  1456. #define SBS_BOTTOMALIGN             0x0004L
  1457. #define SBS_RIGHTALIGN              0x0004L
  1458. #define SBS_SIZEBOXTOPLEFTALIGN     0x0002L
  1459. #define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004L
  1460. #define SBS_SIZEBOX                 0x0008L
  1461.  
  1462.  
  1463. /* Static Control Constants
  1464.  */
  1465. #define SS_LEFT              0x00L
  1466. #define SS_CENTER            0x01L
  1467. #define SS_RIGHT             0x02L
  1468. #define SS_ICON              0x03L
  1469. #define SS_BLACKRECT         0x04L
  1470. #define SS_GRAYRECT          0x05L
  1471. #define SS_WHITERECT         0x06L
  1472. #define SS_BLACKFRAME        0x07L
  1473. #define SS_GRAYFRAME         0x08L
  1474. #define SS_WHITEFRAME        0x09L
  1475. #define SS_USERITEM          0x0AL
  1476. #define SS_SIMPLE            0x0BL
  1477. #define SS_LEFTNOWORDWRAP    0x0CL
  1478. #define SS_NOPREFIX          0x80L
  1479.  
  1480.  
  1481. /* Button Control Styles
  1482.  */
  1483. #define BS_PUSHBUTTON        0x00L
  1484. #define BS_DEFPUSHBUTTON     0x01L
  1485. #define BS_CHECKBOX          0x02L
  1486. #define BS_AUTOCHECKBOX      0x03L
  1487. #define BS_RADIOBUTTON       0x04L
  1488. #define BS_3STATE            0x05L
  1489. #define BS_AUTO3STATE        0x06L
  1490. #define BS_GROUPBOX          0x07L
  1491. #define BS_USERBUTTON        0x08L
  1492. #define BS_AUTORADIOBUTTON   0x09L
  1493. #define BS_OWNERDRAW         0x0BL
  1494. #define BS_LEFTTEXT          0x20L
  1495.  
  1496.  
  1497. /* User Button Notification Codes
  1498.  */
  1499. #define BN_CLICKED           0
  1500. #define BN_PAINT             1
  1501. #define BN_HILITE            2
  1502. #define BN_UNHILITE          3
  1503. #define BN_DISABLE           4
  1504. #define BN_DOUBLECLICKED     5
  1505.  
  1506. /* Button Control Messages
  1507.  */
  1508. #define BM_GETCHECK          0x00F0
  1509. #define BM_SETCHECK          0x00F1
  1510. #define BM_GETSTATE          0x00F2
  1511. #define BM_SETSTATE          0x00F3
  1512. #define BM_SETSTYLE          0x00F4
  1513.  
  1514. /* Owner draw control types
  1515.  */
  1516. #define ODT_MENU        1
  1517. #define ODT_LISTBOX     2
  1518. #define ODT_COMBOBOX    3
  1519. #define ODT_BUTTON      4
  1520. #define ODT_STATIC      5
  1521.  
  1522. /* Owner draw actions
  1523.  */
  1524. #define ODA_DRAWENTIRE  0x0001
  1525. #define ODA_SELECT      0x0002
  1526. #define ODA_FOCUS       0x0004
  1527.  
  1528. /* Owner draw state
  1529.  */
  1530. #define ODS_SELECTED    0x0001
  1531. #define ODS_GRAYED      0x0002
  1532. #define ODS_DISABLED    0x0004
  1533. #define ODS_CHECKED     0x0008
  1534. #define ODS_FOCUS       0x0010
  1535. #define ODS_DEFAULT     0x0020
  1536. #define ODS_COMBOBOXEDIT 0x1000
  1537.  
  1538.  
  1539. /* Stock Logical Objects
  1540.  */
  1541. #define WHITE_BRUSH          0
  1542. #define LTGRAY_BRUSH         1
  1543. #define GRAY_BRUSH           2
  1544. #define DKGRAY_BRUSH         3
  1545. #define BLACK_BRUSH          4
  1546. #define NULL_BRUSH           5
  1547. #define WHITE_PEN            6
  1548. #define BLACK_PEN            7
  1549. #define NULL_PEN             8
  1550. #define OEM_FIXED_FONT       10
  1551. #define ANSI_FIXED_FONT      11
  1552. #define ANSI_VAR_FONT        12
  1553. #define SYSTEM_FONT          13
  1554. #define DEVICE_DEFAULT_FONT  14
  1555. #define DEFAULT_PALETTE      15
  1556. #define SYSTEM_FIXED_FONT    16
  1557. #define STOCK_LAST           16
  1558. #define HOLLOW_BRUSH         NULL_BRUSH
  1559.  
  1560. /* Brush Styles
  1561.  */
  1562. #define BS_SOLID             0
  1563. #define BS_NULL              1
  1564. #define BS_HATCHED           2
  1565. #define BS_PATTERN           3
  1566. #define BS_INDEXED           4
  1567. #define BS_DIBPATTERN        5
  1568. #define BS_DIBPATTERNPT      6
  1569. #define BS_PATTERN8X8        7
  1570. #define BS_DIBPATTERN8X8     8
  1571. #define BS_HOLLOW            BS_NULL
  1572.  
  1573. /* Hatch Styles
  1574.  */
  1575. #define HS_HORIZONTAL        0
  1576. #define HS_VERTICAL          1
  1577. #define HS_FDIAGONAL         2
  1578. #define HS_BDIAGONAL         3
  1579. #define HS_CROSS             4
  1580. #define HS_DIAGCROSS         5
  1581. #define HS_SOLIDCLR          6
  1582. #define HS_DITHEREDCLR       7
  1583. #define HS_SOLIDTEXTCLR      8
  1584. #define HS_DITHEREDTEXTCLR   9
  1585. #define HS_SOLIDBKCLR        10
  1586. #define HS_DITHEREDBKCLR     11
  1587. #define HS_API_MAX           12
  1588.  
  1589. /* Pen Styles
  1590.  */
  1591. #define PS_SOLID             0
  1592. #define PS_DASH              1
  1593. #define PS_DOT               2
  1594. #define PS_DASHDOT           3
  1595. #define PS_DASHDOTDOT        4
  1596. #define PS_NULL              5
  1597. #define PS_INSIDEFRAME       6
  1598. #define PS_USERSTYLE         7
  1599. #define PS_ALTERNATE         8
  1600. #define PS_STYLE_MASK        0x0000000F
  1601.  
  1602. #define PS_COSMETIC          0x00000000
  1603. #define PS_ENDCAP_ROUND      0x00000000
  1604. #define PS_JOIN_ROUND        0x00000000
  1605. #define PS_ENDCAP_SQUARE     0x00000100
  1606. #define PS_ENDCAP_FLAT       0x00000200
  1607. #define PS_ENDCAP_MASK       0x00000F00
  1608. #define PS_JOIN_BEVEL        0x00001000
  1609. #define PS_JOIN_MITER        0x00002000
  1610. #define PS_JOIN_MASK         0x0000F000
  1611. #define PS_GEOMETRIC         0x00010000
  1612. #define PS_TYPE_MASK         0x000F0000
  1613.  
  1614. /* Region Flags
  1615.  */
  1616. #define ERROR                0
  1617. #define NULLREGION           1
  1618. #define SIMPLEREGION         2
  1619. #define COMPLEXREGION        3
  1620. #define RGN_ERROR            ERROR
  1621.  
  1622. #define GDI_ERROR            0xFFFFFFFF
  1623. #define CLR_INVALID          0xFFFFFFFF
  1624.  
  1625.  
  1626. /* CombineRgn Styles
  1627.  */
  1628. #define RGN_AND              1
  1629. #define RGN_OR               2
  1630. #define RGN_XOR              3
  1631. #define RGN_DIFF             4
  1632. #define RGN_COPY             5
  1633. #define RGN_MIN              RGN_AND
  1634. #define RGN_MAX              RGN_COPY
  1635.  
  1636. /* PolyFill Modes
  1637.  */
  1638. #define ALTERNATE            1
  1639. #define WINDING              2
  1640.  
  1641. /* Binary Raster Operations
  1642.  */
  1643. #define R2_BLACK            1
  1644. #define R2_NOTMERGEPEN      2
  1645. #define R2_MASKNOTPEN       3
  1646. #define R2_NOTCOPYPEN       4
  1647. #define R2_MASKPENNOT       5
  1648. #define R2_NOT              6
  1649. #define R2_XORPEN           7
  1650. #define R2_NOTMASKPEN       8
  1651. #define R2_MASKPEN          9
  1652. #define R2_NOTXORPEN        10
  1653. #define R2_NOP              11
  1654. #define R2_MERGENOTPEN      12
  1655. #define R2_COPYPEN          13
  1656. #define R2_MERGEPENNOT      14
  1657. #define R2_MERGEPEN         15
  1658. #define R2_WHITE            16
  1659. #define R2_LAST             16
  1660.  
  1661. /* Ternary raster operations
  1662.  */
  1663. #define SRCCOPY              0x00CC0020
  1664. #define SRCPAINT             0x00EE0086
  1665. #define SRCAND               0x008800C6
  1666. #define SRCINVERT            0x00660046
  1667. #define SRCERASE             0x00440328
  1668. #define NOTSRCCOPY           0x00330008
  1669. #define NOTSRCERASE          0x001100A6
  1670. #define MERGECOPY            0x00C000CA
  1671. #define MERGEPAINT           0x00BB0226
  1672. #define PATCOPY              0x00F00021
  1673. #define PATPAINT             0x00FB0A09
  1674. #define PATINVERT            0x005A0049
  1675. #define DSTINVERT            0x00550009
  1676. #define BLACKNESS            0x00000042
  1677. #define WHITENESS            0x00FF0062
  1678.  
  1679. /* Helper macro for MaskBlt()
  1680.  */
  1681.  
  1682. #define MAKEROP4(a,b) (DWORD)((((b) << 8) & 0xFF000000) | (a))
  1683.  
  1684.  
  1685. /* Spooler Error Codes
  1686.  */
  1687. #define SP_OUTOFMEMORY       (-5)
  1688. #define SP_OUTOFDISK         (-4)
  1689. #define SP_USERABORT         (-3)
  1690. #define SP_APPABORT          (-2)
  1691. #define SP_ERROR             (-1)
  1692. #define SP_NOTREPORTED       0x4000
  1693.  
  1694. /* Predefined Clipboard Formats
  1695.  */
  1696. #define CF_TEXT              1
  1697. #define CF_BITMAP            2
  1698. #define CF_METAFILEPICT      3
  1699. #define CF_SYLK              4
  1700. #define CF_DIF               5
  1701. #define CF_TIFF              6
  1702. #define CF_OEMTEXT           7
  1703. #define CF_DIB               8
  1704. #define CF_PALETTE           9
  1705. #define CF_PENDATA           10
  1706. #define CF_RIFF              11
  1707. #define CF_WAVE              12
  1708. #define CF_UNICODETEXT       13
  1709. #define CF_ENHMETAFILE       14
  1710.  
  1711. #define CF_OWNERDISPLAY      0x0080
  1712. #define CF_DSPTEXT           0x0081
  1713. #define CF_DSPBITMAP         0x0082
  1714. #define CF_DSPMETAFILEPICT   0x0083
  1715. #define CF_DSPENHMETAFILE    0x008E
  1716. #define CF_PRIVATEFIRST      0x0200
  1717. #define CF_PRIVATELAST       0x02FF
  1718. #define CF_GDIOBJFIRST       0x0300
  1719. #define CF_GDIOBJLAST        0x03FF
  1720.  
  1721. /* GetSystemMetrics() codes
  1722.  */
  1723. #define SM_CXSCREEN          0
  1724. #define SM_CYSCREEN          1
  1725. #define SM_CXVSCROLL         2
  1726. #define SM_CYHSCROLL         3
  1727. #define SM_CYCAPTION         4
  1728. #define SM_CXBORDER          5
  1729. #define SM_CYBORDER          6
  1730. #define SM_CXDLGFRAME        7
  1731. #define SM_CYDLGFRAME        8
  1732. #define SM_CYVTHUMB          9
  1733. #define SM_CXHTHUMB          10
  1734. #define SM_CXICON            11
  1735. #define SM_CYICON            12
  1736. #define SM_CXCURSOR          13
  1737. #define SM_CYCURSOR          14
  1738. #define SM_CYMENU            15
  1739. #define SM_CXFULLSCREEN      16
  1740. #define SM_CYFULLSCREEN      17
  1741. #define SM_CYKANJIWINDOW     18
  1742. #define SM_MOUSEPRESENT      19
  1743. #define SM_CYVSCROLL         20
  1744. #define SM_CXHSCROLL         21
  1745. #define SM_DEBUG             22
  1746. #define SM_SWAPBUTTON        23
  1747. #define SM_RESERVED1         24
  1748. #define SM_RESERVED2         25
  1749. #define SM_RESERVED3         26
  1750. #define SM_RESERVED4         27
  1751. #define SM_CXMIN             28
  1752. #define SM_CYMIN             29
  1753. #define SM_CXSIZE            30
  1754. #define SM_CYSIZE            31
  1755. #define SM_CXFRAME           32
  1756. #define SM_CYFRAME           33
  1757. #define SM_CXMINTRACK        34
  1758. #define SM_CYMINTRACK        35
  1759. #define SM_CXDOUBLECLK       36
  1760. #define SM_CYDOUBLECLK       37
  1761. #define SM_MENUDROPALIGNMENT 40
  1762. #define SM_CMOUSEBUTTONS     43
  1763. #define SM_CMETRICS          44
  1764.  
  1765.  
  1766. /* Flags for TrackPopupMenu
  1767.  */
  1768. #define TPM_LEFTALIGN        0x0000
  1769. #define TPM_LEFTBUTTON       0x0000
  1770. #define TPM_RIGHTBUTTON      0x0002
  1771. #define TPM_CENTERALIGN      0x0004
  1772. #define TPM_RIGHTALIGN       0x0008
  1773.  
  1774. /* SetWindowsHook codes
  1775.  */
  1776. #define WH_MIN               (-1)
  1777. #define WH_MSGFILTER         (-1)
  1778. #define WH_JOURNALRECORD     0
  1779. #define WH_JOURNALPLAYBACK   1
  1780. #define WH_KEYBOARD          2
  1781. #define WH_GETMESSAGE        3
  1782. #define WH_CALLWNDPROC       4
  1783. #define WH_CBT               5
  1784. #define WH_SYSMSGFILTER      6
  1785. #define WH_MOUSE             7
  1786. #define WH_HARDWARE          8
  1787. #define WH_DEBUG             9
  1788. #define WH_SHELL             10
  1789. #define WH_FOREGROUNDIDLE    11
  1790. #define WH_MAX               11
  1791.  
  1792. /* Hook Codes
  1793.  */
  1794. #define HC_ACTION            0
  1795. #define HC_GETNEXT           1
  1796. #define HC_SKIP              2
  1797. #define HC_NOREMOVE          3
  1798. #define HC_SYSMODALON        4
  1799. #define HC_SYSMODALOFF       5
  1800. #define HC_NOREM             HC_NOREMOVE
  1801.  
  1802. #define DRIVE_UNKNOWN        0
  1803. #define DRIVE_NO_ROOT_DIR    1
  1804. #define DRIVE_REMOVABLE      2
  1805. #define DRIVE_FIXED          3
  1806. #define DRIVE_REMOTE         4
  1807. #define DRIVE_CDROM          5
  1808. #define DRIVE_RAMDISK        6
  1809.  
  1810.  
  1811. /* Color Types
  1812.  */
  1813. #define CTLCOLOR_MSGBOX      0
  1814. #define CTLCOLOR_EDIT        1
  1815. #define CTLCOLOR_LISTBOX     2
  1816. #define CTLCOLOR_BTN         3
  1817. #define CTLCOLOR_DLG         4
  1818. #define CTLCOLOR_SCROLLBAR   5
  1819. #define CTLCOLOR_STATIC      6
  1820. #define CTLCOLOR_MAX         8
  1821.  
  1822. #define COLOR_SCROLLBAR              0
  1823. #define COLOR_BACKGROUND             1
  1824. #define COLOR_ACTIVECAPTION          2
  1825. #define COLOR_INACTIVECAPTION        3
  1826. #define COLOR_MENU                   4
  1827. #define COLOR_WINDOW                 5
  1828. #define COLOR_WINDOWFRAME            6
  1829. #define COLOR_MENUTEXT               7
  1830. #define COLOR_WINDOWTEXT             8
  1831. #define COLOR_CAPTIONTEXT            9
  1832. #define COLOR_ACTIVEBORDER           10
  1833. #define COLOR_INACTIVEBORDER         11
  1834. #define COLOR_APPWORKSPACE           12
  1835. #define COLOR_HIGHLIGHT              13
  1836. #define COLOR_HIGHLIGHTTEXT          14
  1837. #define COLOR_BTNFACE                15
  1838. #define COLOR_BTNSHADOW              16
  1839. #define COLOR_GRAYTEXT               17
  1840. #define COLOR_BTNTEXT                18
  1841. #define COLOR_INACTIVECAPTIONTEXT    19
  1842. #define COLOR_BTNHIGHLIGHT           20
  1843.  
  1844. /* Enhanced PM SysColors
  1845.  */
  1846. #define SYSCLR_SHADOWHILITEBGND       (-50L)
  1847. #define SYSCLR_SHADOWHILITEFGND       (-49L)
  1848. #define SYSCLR_SHADOWTEXT             (-48L)
  1849. #define SYSCLR_ENTRYFIELD             (-47L)
  1850. #define SYSCLR_MENUDISABLEDTEXT       (-46L)
  1851. #define SYSCLR_MENUHILITE             (-45L)
  1852. #define SYSCLR_MENUHILITEBGND         (-44L)
  1853. #define SYSCLR_PAGEBACKGROUND         (-43L)
  1854. #define SYSCLR_FIELDBACKGROUND        (-42L)
  1855. #define SYSCLR_BUTTONLIGHT            (-41L)
  1856. #define SYSCLR_BUTTONMIDDLE           (-40L)
  1857. #define SYSCLR_BUTTONDARK             (-39L)
  1858. #define SYSCLR_BUTTONDEFAULT          (-38L)
  1859. #define SYSCLR_TITLEBOTTOM            (-37L)
  1860. #define SYSCLR_SHADOW                 (-36L)
  1861. #define SYSCLR_ICONTEXT               (-35L)
  1862. #define SYSCLR_DIALOGBACKGROUND       (-34L)
  1863. #define SYSCLR_HILITEFOREGROUND       (-33L)
  1864. #define SYSCLR_HILITEBACKGROUND       (-32L)
  1865. #define SYSCLR_INACTIVETITLETEXTBGND  (-31L)
  1866. #define SYSCLR_ACTIVETITLETEXTBGND    (-30L)
  1867. #define SYSCLR_INACTIVETITLETEXT      (-29L)
  1868. #define SYSCLR_ACTIVETITLETEXT        (-28L)
  1869. #define SYSCLR_OUTPUTTEXT             (-27L)
  1870. #define SYSCLR_WINDOWSTATICTEXT       (-26L)
  1871. #define SYSCLR_SCROLLBAR              (-25L)
  1872. #define SYSCLR_BACKGROUND             (-24L)
  1873. #define SYSCLR_ACTIVETITLE            (-23L)
  1874. #define SYSCLR_INACTIVETITLE          (-22L)
  1875. #define SYSCLR_MENU                   (-21L)
  1876. #define SYSCLR_WINDOW                 (-20L)
  1877. #define SYSCLR_WINDOWFRAME            (-19L)
  1878. #define SYSCLR_MENUTEXT               (-18L)
  1879. #define SYSCLR_WINDOWTEXT             (-17L)
  1880. #define SYSCLR_TITLETEXT              (-16L)
  1881. #define SYSCLR_ACTIVEBORDER           (-15L)
  1882. #define SYSCLR_INACTIVEBORDER         (-14L)
  1883. #define SYSCLR_APPWORKSPACE           (-13L)
  1884. #define SYSCLR_HELPBACKGROUND         (-12L)
  1885. #define SYSCLR_HELPTEXT               (-11L)
  1886. #define SYSCLR_HELPHILITE             (-10L)
  1887.  
  1888.  
  1889. /* Draw Text flags
  1890.  */
  1891. #define DT_TOP               0x00000000
  1892. #define DT_LEFT              0x00000000
  1893. #define DT_CENTER            0x00000001
  1894. #define DT_RIGHT             0x00000002
  1895. #define DT_VCENTER           0x00000004
  1896. #define DT_BOTTOM            0x00000008
  1897. #define DT_WORDBREAK         0x00000010
  1898. #define DT_SINGLELINE        0x00000020
  1899. #define DT_EXPANDTABS        0x00000040
  1900. #define DT_TABSTOP           0x00000080
  1901. #define DT_NOCLIP            0x00000100
  1902. #define DT_EXTERNALLEADING   0x00000200
  1903. #define DT_CALCRECT          0x00000400
  1904. #define DT_NOPREFIX          0x00000800
  1905. #define DT_VALIDFLAGS        0x00000FFF
  1906.  
  1907. /* Text Alignment Options
  1908.  */
  1909. #define TA_LEFT              0
  1910. #define TA_NOUPDATECP        0
  1911. #define TA_TOP               0
  1912. #define TA_UPDATECP          1
  1913. #define TA_RIGHT             2
  1914. #define TA_CENTER            6
  1915. #define TA_BOTTOM            8
  1916. #define TA_BASELINE          24
  1917. #define TA_MASK              ( TA_BASELINE + TA_CENTER + TA_UPDATECP )
  1918.  
  1919. #define VTA_BASELINE         TA_BASELINE
  1920. #define VTA_LEFT             TA_BOTTOM
  1921. #define VTA_RIGHT            TA_TOP
  1922. #define VTA_CENTER           TA_CENTER
  1923. #define VTA_BOTTOM           TA_RIGHT
  1924. #define VTA_TOP              TA_LEFT
  1925.  
  1926.  
  1927. /* Memory APIs
  1928.  */
  1929. #define PAGE_NOACCESS            0x00000001
  1930. #define PAGE_READONLY            0x00000002
  1931. #define PAGE_READWRITE           0x00000004
  1932. #define PAGE_WRITECOPY           0x00000008
  1933. #define PAGE_EXECUTE             0x00000010
  1934. #define PAGE_EXECUTE_READ        0x00000020
  1935. #define PAGE_EXECUTE_READWRITE   0x00000040
  1936. #define PAGE_EXECUTE_WRITECOPY   0x00000080
  1937. #define PAGE_GUARD               0x00000100
  1938. #define PAGE_NOCACHE             0x00000200
  1939. #define MEM_COMMIT               0x00001000
  1940. #define MEM_RESERVE              0x00002000
  1941. #define MEM_DECOMMIT             0x00004000
  1942. #define MEM_RELEASE              0x00008000
  1943. #define MEM_FREE                 0x00010000
  1944. #define MEM_PRIVATE              0x00020000
  1945. #define MEM_MAPPED               0x00040000
  1946. #define MEM_TOP_DOWN             0x00100000
  1947. #define SEC_FILE                 0x00800000
  1948. #define SEC_IMAGE                0x01000000
  1949. #define SEC_RESERVE              0x04000000
  1950. #define SEC_COMMIT               0x08000000
  1951. #define SEC_NOCACHE              0x10000000
  1952. #define MEM_IMAGE                SEC_IMAGE
  1953.  
  1954. /* Global Memory Flags
  1955.  */
  1956. #define GMEM_FIXED           0x0000
  1957. #define GMEM_MOVEABLE        0x0002
  1958. #define GMEM_NOCOMPACT       0x0010
  1959. #define GMEM_NODISCARD       0x0020
  1960. #define GMEM_ZEROINIT        0x0040
  1961. #define GMEM_MODIFY          0x0080
  1962. #define GMEM_LOCKCOUNT       0x00FF
  1963. #define GMEM_DISCARDABLE     0x0100
  1964. #define GMEM_NOT_BANKED      0x1000
  1965. #define GMEM_SHARE           0x2000
  1966. #define GMEM_DDESHARE        0x2000
  1967. #define GMEM_NOTIFY          0x4000
  1968. #define GMEM_DISCARDED       0x4000
  1969. #define GMEM_INVALID_HANDLE  0x8000
  1970. #define GMEM_LOWER           GMEM_NOT_BANKED
  1971. #define GHND                 ( GMEM_MOVEABLE | GMEM_ZEROINIT )
  1972. #define GPTR                 ( GMEM_FIXED    | GMEM_ZEROINIT )
  1973.  
  1974. /* Local Memory Flags
  1975.  */
  1976. #define LMEM_FIXED           0x0000
  1977. #define LMEM_MOVEABLE        0x0002
  1978. #define LMEM_NOCOMPACT       0x0010
  1979. #define LMEM_NODISCARD       0x0020
  1980. #define LMEM_ZEROINIT        0x0040
  1981. #define LMEM_MODIFY          0x0080
  1982. #define LMEM_LOCKCOUNT       0x00FF
  1983. #define LMEM_DISCARDABLE     0x0F00
  1984. #define LMEM_VALID_FLAGS     0x0F72
  1985. #define LMEM_DISCARDED       0x4000
  1986. #define LMEM_INVALID_HANDLE  0x8000
  1987. #define LHND                 ( LMEM_MOVEABLE | LMEM_ZEROINIT )
  1988. #define LPTR                 ( LMEM_FIXED    | LMEM_ZEROINIT )
  1989. #define NONZEROLHND          ( LMEM_MOVEABLE )
  1990. #define NONZEROLPTR          ( LMEM_FIXED )
  1991.  
  1992.  
  1993. /* constants for HeapAlloc() flags
  1994.  */
  1995. #define HEAP_NO_SERIALIZE                0x00000001
  1996. #define HEAP_GROWABLE                    0x00000002
  1997. #define HEAP_GENERATE_EXCEPTIONS         0x00000004
  1998. #define HEAP_ZERO_MEMORY                 0x00000008
  1999. #define HEAP_REALLOC_IN_PLACE_ONLY       0x00000010
  2000. #define HEAP_TAIL_CHECKING_ENABLED       0x00000020
  2001. #define HEAP_FREE_CHECKING_ENABLED       0x00000040
  2002. #define HEAP_DISABLE_COALESCE_ON_FREE    0x00000080
  2003.  
  2004.  
  2005. /* System API Flags
  2006.  */
  2007. #define INFINITE                     ((DWORD)-1)
  2008.  
  2009. #define DELETE                       0x00010000
  2010. #define READ_CONTROL                 0x00020000
  2011. #define WRITE_DAC                    0x00040000
  2012. #define WRITE_OWNER                  0x00080000
  2013. #define SYNCHRONIZE                  0x00100000
  2014.  
  2015. #define SPECIFIC_RIGHTS_ALL          0x0000FFFF
  2016. #define STANDARD_RIGHTS_READ         (READ_CONTROL)
  2017. #define STANDARD_RIGHTS_WRITE        (READ_CONTROL)
  2018. #define STANDARD_RIGHTS_EXECUTE      (READ_CONTROL)
  2019. #define STANDARD_RIGHTS_REQUIRED     0x000F0000
  2020. #define STANDARD_RIGHTS_ALL          0x001F0000
  2021.  
  2022. /* Thread Creation Flags
  2023.  */
  2024. #define DEBUG_PROCESS                0x00000001
  2025. #define DEBUG_ONLY_THIS_PROCESS      0x00000002
  2026. #define CREATE_SUSPENDED             0x00000004
  2027. #define DETACHED_PROCESS             0x00000008
  2028. #define CREATE_NEW_CONSOLE           0x00000010
  2029. #define NORMAL_PRIORITY_CLASS        0x00000020
  2030. #define IDLE_PRIORITY_CLASS          0x00000040
  2031. #define HIGH_PRIORITY_CLASS          0x00000080
  2032. #define REALTIME_PRIORITY_CLASS      0x00000100
  2033. #define CREATE_NEW_PROCESS_GROUP     0x00000200
  2034. #define CREATE_UNICODE_ENVIRONMENT   0x00000400
  2035. #define CREATE_SEPARATE_WOW_VDM      0x00000800
  2036. #define CREATE_SHARE_WOW_VDM         0x00001000
  2037. #define CREATE_DEFAULT_ERROR_MODE    0x04000000
  2038. #define CREATE_NO_WINDOW             0x08000000
  2039.  
  2040. #define PROCESS_TERMINATE            0x00000001
  2041. #define PROCESS_CREATE_THREAD        0x00000002
  2042. #define PROCESS_VM_OPERATION         0x00000008
  2043. #define PROCESS_VM_READ              0x00000010
  2044. #define PROCESS_VM_WRITE             0x00000020
  2045. #define PROCESS_DUP_HANDLE           0x00000040
  2046. #define PROCESS_CREATE_PROCESS       0x00000080
  2047. #define PROCESS_SET_QUOTA            0x00000100
  2048. #define PROCESS_SET_INFORMATION      0x00000200
  2049. #define PROCESS_QUERY_INFORMATION    0x00000400
  2050. #define PROCESS_ALL_ACCESS           (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0xFFF)
  2051.  
  2052. #define THREAD_TERMINATE             0x00000001
  2053. #define THREAD_SUSPEND_RESUME        0x00000002
  2054. #define THREAD_GET_CONTEXT           0x00000008
  2055. #define THREAD_SET_CONTEXT           0x00000010
  2056. #define THREAD_SET_INFORMATION       0x00000020
  2057. #define THREAD_QUERY_INFORMATION     0x00000040
  2058. #define THREAD_SET_THREAD_TOKEN      0x00000080
  2059. #define THREAD_IMPERSONATE           0x00000100
  2060. #define THREAD_DIRECT_IMPERSONATION  0x00000200
  2061. #define THREAD_ALL_ACCESS            (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3FF)
  2062.  
  2063. #define TLS_MINIMUM_AVAILABLE        64
  2064.  
  2065. #define STILL_ACTIVE                 0x00000103
  2066.  
  2067. #define THREAD_BASE_PRIORITY_IDLE   -15
  2068. #define THREAD_BASE_PRIORITY_MIN    -2
  2069. #define THREAD_BASE_PRIORITY_MAX     2
  2070. #define THREAD_BASE_PRIORITY_LOWRT   15
  2071.  
  2072. #define THREAD_PRIORITY_IDLE         -15
  2073. #define THREAD_PRIORITY_LOWEST        -2
  2074. #define THREAD_PRIORITY_BELOW_NORMAL  -1
  2075. #define THREAD_PRIORITY_NORMAL         0
  2076. #define THREAD_PRIORITY_ABOVE_NORMAL   1
  2077. #define THREAD_PRIORITY_HIGHEST        2
  2078. #define THREAD_PRIORITY_TIME_CRITICAL 15
  2079.  
  2080. /* Synchronization APIs
  2081.  */
  2082. #define MAXIMUM_WAIT_OBJECTS         128
  2083. #define STATUS_ABANDONED_WAIT_0      0x00000080
  2084. #define STATUS_TIMEOUT               0x00000102
  2085. #define STATUS_WAIT_0                0x00000000
  2086. #define WAIT_ABANDONED               STATUS_ABANDONED_WAIT_0
  2087. #define WAIT_ABANDONED_0             STATUS_ABANDONED_WAIT_0
  2088. #define WAIT_FAILED                  ((DWORD)0xFFFFFFFF)
  2089. #define WAIT_OBJECT_0                STATUS_WAIT_0
  2090. #define WAIT_TIMEOUT                 STATUS_TIMEOUT
  2091.  
  2092. #define EVENT_MODIFY_STATE           0x00000002
  2093. #define EVENT_ALL_ACCESS             (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|EVENT_MODIFY_STATE)
  2094.  
  2095. #define MUTEX_ALL_ACCESS             (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE)
  2096.  
  2097. #define SEMAPHORE_MODIFY_STATE       0x00000002
  2098. #define SEMAPHORE_ALL_ACCESS         (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|SEMAPHORE_MODIFY_STATE)
  2099.  
  2100. /* File IO APIs
  2101.  */
  2102. #define FILE_READ_DATA               0x00000001
  2103. #define FILE_LIST_DIRECTORY          0x00000001
  2104. #define FILE_WRITE_DATA              0x00000002
  2105. #define FILE_ADD_FILE                0x00000002
  2106. #define FILE_APPEND_DATA             0x00000004
  2107. #define FILE_ADD_SUBDIRECTORY        0x00000004
  2108. #define FILE_CREATE_PIPE_INSTANCE    0x00000004
  2109. #define FILE_READ_EA                 0x00000008
  2110. #define FILE_READ_PROPERTIES         0x00000008
  2111. #define FILE_WRITE_EA                0x00000010
  2112. #define FILE_WRITE_PROPERTIES        0x00000010
  2113. #define FILE_EXECUTE                 0x00000020
  2114. #define FILE_TRAVERSE                0x00000020
  2115. #define FILE_DELETE_CHILD            0x00000040
  2116. #define FILE_READ_ATTRIBUTES         0x00000080
  2117. #define FILE_WRITE_ATTRIBUTES        0x00000100
  2118. #define FILE_ALL_ACCESS              (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF)
  2119. #define FILE_GENERIC_READ            (STANDARD_RIGHTS_READ     |\
  2120.                                         FILE_READ_DATA           |\
  2121.                                         FILE_READ_ATTRIBUTES     |\
  2122.                                         FILE_READ_EA             |\
  2123.                                         SYNCHRONIZE)
  2124. #define FILE_GENERIC_WRITE           (STANDARD_RIGHTS_WRITE    |\
  2125.                                         FILE_WRITE_DATA          |\
  2126.                                         FILE_WRITE_ATTRIBUTES    |\
  2127.                                         FILE_WRITE_EA            |\
  2128.                                         FILE_APPEND_DATA         |\
  2129.                                         SYNCHRONIZE)
  2130. #define FILE_GENERIC_EXECUTE         (STANDARD_RIGHTS_EXECUTE  |\
  2131.                                         FILE_READ_ATTRIBUTES     |\
  2132.                                         FILE_EXECUTE             |\
  2133.                                         SYNCHRONIZE)
  2134.  
  2135. #define FILE_SHARE_READ                  0x00000001
  2136. #define FILE_SHARE_WRITE                 0x00000002
  2137. #define FILE_ATTRIBUTE_READONLY          0x00000001
  2138. #define FILE_ATTRIBUTE_HIDDEN            0x00000002
  2139. #define FILE_ATTRIBUTE_SYSTEM            0x00000004
  2140. #define FILE_ATTRIBUTE_DIRECTORY         0x00000010
  2141. #define FILE_ATTRIBUTE_ARCHIVE           0x00000020
  2142. #define FILE_ATTRIBUTE_NORMAL            0x00000080
  2143. #define FILE_ATTRIBUTE_TEMPORARY         0x00000100
  2144. #define FILE_ATTRIBUTE_ATOMIC_WRITE      0x00000200
  2145. #define FILE_ATTRIBUTE_XACTION_WRITE     0x00000400
  2146. #define FILE_ATTRIBUTE_COMPRESSED        0x00000800
  2147. #define FILE_NOTIFY_CHANGE_FILE_NAME     0x00000001
  2148. #define FILE_NOTIFY_CHANGE_DIR_NAME      0x00000002
  2149. #define FILE_NOTIFY_CHANGE_ATTRIBUTES    0x00000004
  2150. #define FILE_NOTIFY_CHANGE_SIZE          0x00000008
  2151. #define FILE_NOTIFY_CHANGE_LAST_WRITE    0x00000010
  2152. #define FILE_NOTIFY_CHANGE_SECURITY      0x00000100
  2153. #define FILE_CASE_SENSITIVE_SEARCH       0x00000001
  2154. #define FILE_CASE_PRESERVED_NAMES        0x00000002
  2155. #define FILE_UNICODE_ON_DISK             0x00000004
  2156. #define FILE_PERSISTENT_ACLS             0x00000008
  2157. #define FILE_FILE_COMPRESSION            0x00000010
  2158. #define FILE_VOLUME_IS_COMPRESSED        0x00008000
  2159. #define IO_COMPLETION_MODIFY_STATE       0x00000002
  2160. #define IO_COMPLETION_ALL_ACCESS         (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
  2161. #define DUPLICATE_CLOSE_SOURCE           0x00000001
  2162. #define DUPLICATE_SAME_ACCESS            0x00000002
  2163.  
  2164.  
  2165. /* Exceptions
  2166. */
  2167. #define STATUS_NO_MEMORY             (0xC0000017)
  2168. #define STATUS_ACCESS_VIOLATION      (0xC0000005)
  2169.  
  2170.  
  2171. /* Virtual Keys, Standard Set
  2172.  */
  2173. #define VK_LBUTTON           0x01
  2174. #define VK_RBUTTON           0x02
  2175. #define VK_CANCEL            0x03
  2176. #define VK_MBUTTON           0x04
  2177. #define VK_BACK              0x08
  2178. #define VK_TAB               0x09
  2179. #define VK_CLEAR             0x0C
  2180. #define VK_RETURN            0x0D
  2181. #define VK_SHIFT             0x10
  2182. #define VK_CONTROL           0x11
  2183. #define VK_MENU              0x12
  2184. #define VK_PAUSE             0x13
  2185. #define VK_CAPITAL           0x14
  2186. #define VK_ESCAPE            0x1B
  2187. #define VK_SPACE             0x20
  2188. #define VK_PRIOR             0x21
  2189. #define VK_NEXT              0x22
  2190. #define VK_END               0x23
  2191. #define VK_HOME              0x24
  2192. #define VK_LEFT              0x25
  2193. #define VK_UP                0x26
  2194. #define VK_RIGHT             0x27
  2195. #define VK_DOWN              0x28
  2196. #define VK_SELECT            0x29
  2197. #define VK_PRINT             0x2A
  2198. #define VK_EXECUTE           0x2B
  2199. #define VK_SNAPSHOT          0x2C
  2200. #define VK_INSERT            0x2D
  2201. #define VK_DELETE            0x2E
  2202. #define VK_HELP              0x2F
  2203. #define VK_LWIN              0x5B
  2204. #define VK_RWIN              0x5C
  2205. #define VK_APPS              0x5D
  2206. #define VK_NUMPAD0           0x60
  2207. #define VK_NUMPAD1           0x61
  2208. #define VK_NUMPAD2           0x62
  2209. #define VK_NUMPAD3           0x63
  2210. #define VK_NUMPAD4           0x64
  2211. #define VK_NUMPAD5           0x65
  2212. #define VK_NUMPAD6           0x66
  2213. #define VK_NUMPAD7           0x67
  2214. #define VK_NUMPAD8           0x68
  2215. #define VK_NUMPAD9           0x69
  2216. #define VK_MULTIPLY          0x6A
  2217. #define VK_ADD               0x6B
  2218. #define VK_SEPARATOR         0x6C
  2219. #define VK_SUBTRACT          0x6D
  2220. #define VK_DECIMAL           0x6E
  2221. #define VK_DIVIDE            0x6F
  2222. #define VK_F1                0x70
  2223. #define VK_F2                0x71
  2224. #define VK_F3                0x72
  2225. #define VK_F4                0x73
  2226. #define VK_F5                0x74
  2227. #define VK_F6                0x75
  2228. #define VK_F7                0x76
  2229. #define VK_F8                0x77
  2230. #define VK_F9                0x78
  2231. #define VK_F10               0x79
  2232. #define VK_F11               0x7A
  2233. #define VK_F12               0x7B
  2234. #define VK_F13               0x7C
  2235. #define VK_F14               0x7D
  2236. #define VK_F15               0x7E
  2237. #define VK_F16               0x7F
  2238. #define VK_F17               0x80
  2239. #define VK_F18               0x81
  2240. #define VK_F19               0x82
  2241. #define VK_F20               0x83
  2242. #define VK_F21               0x84
  2243. #define VK_F22               0x85
  2244. #define VK_F23               0x86
  2245. #define VK_F24               0x87
  2246. #define VK_NUMLOCK           0x90
  2247. #define VK_SCROLL            0x91
  2248. #define VK_LSHIFT            0xA0
  2249. #define VK_RSHIFT            0xA1
  2250. #define VK_LCONTROL          0xA2
  2251. #define VK_RCONTROL          0xA3
  2252. #define VK_LMENU             0xA4
  2253. #define VK_RMENU             0xA5
  2254. #define VK_ATTN              0xF6
  2255. #define VK_CRSEL             0xF7
  2256. #define VK_EXSEL             0xF8
  2257. #define VK_EREOF             0xF9
  2258. #define VK_PLAY              0xFA
  2259. #define VK_ZOOM              0xFB
  2260. #define VK_NONAME            0xFC
  2261. #define VK_PA1               0xFD
  2262. #define VK_OEM_CLEAR         0xFE
  2263.  
  2264.  
  2265. /* constants for Get/SetSystemPaletteUse()
  2266.  */
  2267. #define SYSPAL_ERROR         0
  2268. #define SYSPAL_STATIC        1
  2269. #define SYSPAL_NOSTATIC      2
  2270.  
  2271.  
  2272. /* RedrawWindow() flags
  2273.  */
  2274. #define RDW_INVALIDATE       0x0001
  2275. #define RDW_INTERNALPAINT    0x0002
  2276. #define RDW_ERASE            0x0004
  2277. #define RDW_VALIDATE         0x0008
  2278. #define RDW_NOINTERNALPAINT  0x0010
  2279. #define RDW_NOERASE          0x0020
  2280. #define RDW_NOCHILDREN       0x0040
  2281. #define RDW_ALLCHILDREN      0x0080
  2282. #define RDW_UPDATENOW        0x0100
  2283. #define RDW_ERASENOW         0x0200
  2284. #define RDW_FRAME            0x0400
  2285. #define RDW_NOFRAME          0x0800
  2286.  
  2287. /* Bounds Accumulation APIs
  2288.  */
  2289. #define DCB_RESET             0x0001
  2290. #define DCB_ACCUMULATE        0x0002
  2291. #define DCB_ENABLE            0x0004
  2292. #define DCB_DISABLE           0x0008
  2293. #define DCB_DIRTY             DCB_ACCUMULATE
  2294. #define DCB_SET               (DCB_RESET | DCB_ACCUMULATE)
  2295.  
  2296. /* SetErrorMode() flags
  2297.  */
  2298. #define SEM_FAILCRITICALERRORS      0x0001
  2299. #define SEM_NOGPFAULTERRORBOX       0x0002
  2300. #define SEM_NOALIGNMENTFAULTEXCEPT  0x0004
  2301. #define SEM_NOOPENFILEERRORBOX      0x8000
  2302.  
  2303. /* Parameter for SystemParametersInfo()
  2304.  */
  2305. #define SPI_GETBEEP                              1
  2306. #define SPI_SETBEEP                              2
  2307. #define SPI_GETMOUSE                             3
  2308. #define SPI_SETMOUSE                             4
  2309. #define SPI_GETBORDER                            5
  2310. #define SPI_SETBORDER                            6
  2311. #define SPI_GETKEYBOARDSPEED                    10
  2312. #define SPI_SETKEYBOARDSPEED                    11
  2313. #define SPI_LANGDRIVER                          12
  2314. #define SPI_ICONHORIZONTALSPACING               13
  2315. #define SPI_GETSCREENSAVETIMEOUT                14
  2316. #define SPI_SETSCREENSAVETIMEOUT                15
  2317. #define SPI_GETSCREENSAVEACTIVE                 16
  2318. #define SPI_SETSCREENSAVEACTIVE                 17
  2319. #define SPI_GETGRIDGRANULARITY                  18
  2320. #define SPI_SETGRIDGRANULARITY                  19
  2321. #define SPI_SETDESKWALLPAPER                    20
  2322. #define SPI_SETDESKPATTERN                      21
  2323. #define SPI_GETKEYBOARDDELAY                    22
  2324. #define SPI_SETKEYBOARDDELAY                    23
  2325. #define SPI_ICONVERTICALSPACING                 24
  2326. #define SPI_GETICONTITLEWRAP                    25
  2327. #define SPI_SETICONTITLEWRAP                    26
  2328. #define SPI_GETMENUDROPALIGNMENT                27
  2329. #define SPI_SETMENUDROPALIGNMENT                28
  2330. #define SPI_SETDOUBLECLKWIDTH                   29
  2331. #define SPI_SETDOUBLECLKHEIGHT                  30
  2332. #define SPI_GETICONTITLELOGFONT                 31
  2333. #define SPI_SETDOUBLECLICKTIME                  32
  2334. #define SPI_SETMOUSEBUTTONSWAP                  33
  2335. #define SPI_SETICONTITLELOGFONT                 34
  2336. #define SPI_GETFASTTASKSWITCH                   35
  2337. #define SPI_SETFASTTASKSWITCH                   36
  2338. #define SPI_SETDRAGFULLWINDOWS                  37
  2339. #define SPI_GETDRAGFULLWINDOWS                  38
  2340. #define SPI_GETKEYBOARDLAYOUT                   39
  2341. #define SPI_SETKEYBOARDLAYOUT                   40
  2342. #define SPI_GETNONCLIENTMETRICS                 41
  2343. #define SPI_SETNONCLIENTMETRICS                 42
  2344. #define SPI_GETMINIMIZEDMETRICS                 43
  2345. #define SPI_SETMINIMIZEDMETRICS                 44
  2346. #define SPI_GETICONMETRICS                      45
  2347. #define SPI_SETICONMETRICS                      46
  2348. #define SPI_GETWORKAREA                         48
  2349. #define SPI_SETPENWINDOWS                       49
  2350. #define SPI_GETHIGHCONTRAST                     66
  2351. #define SPI_SETHIGHCONTRAST                     67
  2352. #define SPI_GETKEYBOARDPREF                     68
  2353. #define SPI_SETKEYBOARDPREF                     69
  2354. #define SPI_GETSCREENREADER                     70
  2355. #define SPI_SETSCREENREADER                     71
  2356. #define SPI_GETANIMATION                        72
  2357. #define SPI_SETANIMATION                        73
  2358. #define SPI_GETFONTSMOOTHING                    74
  2359. #define SPI_SETFONTSMOOTHING                    75
  2360. #define SPI_SETDRAGWIDTH                        76
  2361. #define SPI_SETDRAGHEIGHT                       77
  2362. #define SPI_SETHANDHELD                         78
  2363. #define SPI_GETLOWPOWERTIMEOUT                  79
  2364. #define SPI_GETPOWEROFFTIMEOUT                  80
  2365. #define SPI_SETLOWPOWERTIMEOUT                  81
  2366. #define SPI_SETPOWEROFFTIMEOUT                  82
  2367. #define SPI_GETLOWPOWERACTIVE                   83
  2368. #define SPI_GETPOWEROFFACTIVE                   84
  2369. #define SPI_SETLOWPOWERACTIVE                   85
  2370. #define SPI_SETPOWEROFFACTIVE                   86
  2371. #define SPI_SETCURSORS                          87
  2372. #define SPI_SETICONS                            88
  2373. #define SPI_GETDEFAULTINPUTLANG                 89
  2374. #define SPI_SETDEFAULTINPUTLANG                 90
  2375. #define SPI_SETLANGTOGGLE                       91
  2376. #define SPI_GETWINDOWSEXTENSION                 92
  2377. #define SPI_SETMOUSETRAILS                      93
  2378. #define SPI_GETMOUSETRAILS                      94
  2379. #define SPI_GETFILTERKEYS                       50
  2380. #define SPI_SETFILTERKEYS                       51
  2381. #define SPI_GETTOGGLEKEYS                       52
  2382. #define SPI_SETTOGGLEKEYS                       53
  2383. #define SPI_GETMOUSEKEYS                        54
  2384. #define SPI_SETMOUSEKEYS                        55
  2385. #define SPI_GETSHOWSOUNDS                       56
  2386. #define SPI_SETSHOWSOUNDS                       57
  2387. #define SPI_GETSTICKYKEYS                       58
  2388. #define SPI_SETSTICKYKEYS                       59
  2389. #define SPI_GETACCESSTIMEOUT                    60
  2390. #define SPI_SETACCESSTIMEOUT                    61
  2391. #define SPI_GETSERIALKEYS                       62
  2392. #define SPI_SETSERIALKEYS                       63
  2393. #define SPI_GETSOUNDSENTRY                      64
  2394. #define SPI_SETSOUNDSENTRY                      65
  2395.  
  2396. /* Flags
  2397.  */
  2398. #define SPIF_UPDATEINIFILE         0x0001
  2399. #define SPIF_SENDWININICHANGE      0x0002
  2400. #define SPIF_SENDCHANGE            SPIF_SENDWININICHANGE
  2401.  
  2402.  
  2403. #define DM_UPDATE           1
  2404. #define DM_COPY             2
  2405. #define DM_PROMPT           4
  2406. #define DM_MODIFY           8
  2407.  
  2408. #define DM_IN_BUFFER        DM_MODIFY
  2409. #define DM_IN_PROMPT        DM_PROMPT
  2410. #define DM_OUT_BUFFER       DM_COPY
  2411. #define DM_OUT_DEFAULT      DM_UPDATE
  2412.  
  2413. /* device capabilities indices
  2414.  */
  2415. #define DC_FIELDS               1
  2416. #define DC_PAPERS               2
  2417. #define DC_PAPERSIZE            3
  2418. #define DC_MINEXTENT            4
  2419. #define DC_MAXEXTENT            5
  2420. #define DC_BINS                 6
  2421. #define DC_DUPLEX               7
  2422. #define DC_SIZE                 8
  2423. #define DC_EXTRA                9
  2424. #define DC_VERSION              10
  2425. #define DC_DRIVER               11
  2426. #define DC_BINNAMES             12
  2427. #define DC_ENUMRESOLUTIONS      13
  2428. #define DC_FILEDEPENDENCIES     14
  2429. #define DC_TRUETYPE             15
  2430. #define DC_PAPERNAMES           16
  2431. #define DC_ORIENTATION          17
  2432. #define DC_COPIES               18
  2433. #define DC_BINADJUST            19
  2434. #define DC_EMF_COMPLIANT        20
  2435. #define DC_DATATYPE_PRODUCED    21
  2436.  
  2437. /* ExtFloodFill style flags
  2438.  */
  2439. #define  FLOODFILLBORDER   0
  2440. #define  FLOODFILLSURFACE  1
  2441.  
  2442. /* StretchBlt Modes
  2443.  */
  2444. #define STRETCH_ANDSCANS    1
  2445. #define STRETCH_ORSCANS     2
  2446. #define STRETCH_DELETESCANS 3
  2447. #define STRETCH_HALFTONE    4
  2448. #define MAXSTRETCHBLTMODE   4
  2449.  
  2450. #define BLACKONWHITE        STRETCH_ANDSCANS
  2451. #define WHITEONBLACK        STRETCH_ORSCANS
  2452. #define COLORONCOLOR        STRETCH_DELETESCANS
  2453. #define HALFTONE            STRETCH_HALFTONE
  2454.  
  2455. /* PolyDraw and GetPath point types
  2456.  */
  2457. #define PT_CLOSEFIGURE      0x01
  2458. #define PT_LINETO           0x02
  2459. #define PT_BEZIERTO         0x04
  2460. #define PT_MOVETO           0x06
  2461.  
  2462. /* color usage
  2463.  */
  2464. #define DIB_RGB_COLORS      0
  2465. #define DIB_PAL_COLORS      1
  2466.  
  2467.  
  2468. /* GDI object types
  2469.  */
  2470. #define OBJ_PEN             1
  2471. #define OBJ_BRUSH           2
  2472. #define OBJ_DC              3
  2473. #define OBJ_METADC          4
  2474. #define OBJ_PAL             5
  2475. #define OBJ_FONT            6
  2476. #define OBJ_BITMAP          7
  2477. #define OBJ_REGION          8
  2478. #define OBJ_METAFILE        9
  2479. #define OBJ_MEMDC           10
  2480. #define OBJ_EXTPEN          11
  2481. #define OBJ_ENHMETADC       12
  2482. #define OBJ_ENHMETAFILE     13
  2483.  
  2484. /* ScrollWindowEx() scroll flags
  2485.  */
  2486. #define SW_SCROLLCHILDREN   0x0001
  2487. #define SW_INVALIDATE       0x0002
  2488. #define SW_ERASE            0x0004
  2489.  
  2490.  
  2491. /* Enhanced Metafile structures
  2492.  */
  2493. #define ENHMETA_SIGNATURE       0x464D4520
  2494. #define ENHMETA_STOCK_OBJECT    0x80000000
  2495.  
  2496. #define EMR_HEADER                      1
  2497. #define EMR_POLYBEZIER                  2
  2498. #define EMR_POLYGON                     3
  2499. #define EMR_POLYLINE                    4
  2500. #define EMR_POLYBEZIERTO                5
  2501. #define EMR_POLYLINETO                  6
  2502. #define EMR_POLYPOLYLINE                7
  2503. #define EMR_POLYPOLYGON                 8
  2504. #define EMR_SETWINDOWEXTEX              9
  2505. #define EMR_SETWINDOWORGEX              10
  2506. #define EMR_SETVIEWPORTEXTEX            11
  2507. #define EMR_SETVIEWPORTORGEX            12
  2508. #define EMR_SETBRUSHORGEX               13
  2509. #define EMR_EOF                         14
  2510. #define EMR_SETPIXELV                   15
  2511. #define EMR_SETMAPPERFLAGS              16
  2512. #define EMR_SETMAPMODE                  17
  2513. #define EMR_SETBKMODE                   18
  2514. #define EMR_SETPOLYFILLMODE             19
  2515. #define EMR_SETROP2                     20
  2516. #define EMR_SETSTRETCHBLTMODE           21
  2517. #define EMR_SETTEXTALIGN                22
  2518. #define EMR_SETCOLORADJUSTMENT          23
  2519. #define EMR_SETTEXTCOLOR                24
  2520. #define EMR_SETBKCOLOR                  25
  2521. #define EMR_OFFSETCLIPRGN               26
  2522. #define EMR_MOVETOEX                    27
  2523. #define EMR_SETMETARGN                  28
  2524. #define EMR_EXCLUDECLIPRECT             29
  2525. #define EMR_INTERSECTCLIPRECT           30
  2526. #define EMR_SCALEVIEWPORTEXTEX          31
  2527. #define EMR_SCALEWINDOWEXTEX            32
  2528. #define EMR_SAVEDC                      33
  2529. #define EMR_RESTOREDC                   34
  2530. #define EMR_SETWORLDTRANSFORM           35
  2531. #define EMR_MODIFYWORLDTRANSFORM        36
  2532. #define EMR_SELECTOBJECT                37
  2533. #define EMR_CREATEPEN                   38
  2534. #define EMR_CREATEBRUSHINDIRECT         39
  2535. #define EMR_DELETEOBJECT                40
  2536. #define EMR_ANGLEARC                    41
  2537. #define EMR_ELLIPSE                     42
  2538. #define EMR_RECTANGLE                   43
  2539. #define EMR_ROUNDRECT                   44
  2540. #define EMR_ARC                         45
  2541. #define EMR_CHORD                       46
  2542. #define EMR_PIE                         47
  2543. #define EMR_SELECTPALETTE               48
  2544. #define EMR_CREATEPALETTE               49
  2545. #define EMR_SETPALETTEENTRIES           50
  2546. #define EMR_RESIZEPALETTE               51
  2547. #define EMR_REALIZEPALETTE              52
  2548. #define EMR_EXTFLOODFILL                53
  2549. #define EMR_LINETO                      54
  2550. #define EMR_ARCTO                       55
  2551. #define EMR_POLYDRAW                    56
  2552. #define EMR_SETARCDIRECTION             57
  2553. #define EMR_SETMITERLIMIT               58
  2554. #define EMR_BEGINPATH                   59
  2555. #define EMR_ENDPATH                     60
  2556. #define EMR_CLOSEFIGURE                 61
  2557. #define EMR_FILLPATH                    62
  2558. #define EMR_STROKEANDFILLPATH           63
  2559. #define EMR_STROKEPATH                  64
  2560. #define EMR_FLATTENPATH                 65
  2561. #define EMR_WIDENPATH                   66
  2562. #define EMR_SELECTCLIPPATH              67
  2563. #define EMR_ABORTPATH                   68
  2564. #define EMR_GDICOMMENT                  70
  2565. #define EMR_FILLRGN                     71
  2566. #define EMR_FRAMERGN                    72
  2567. #define EMR_INVERTRGN                   73
  2568. #define EMR_PAINTRGN                    74
  2569. #define EMR_EXTSELECTCLIPRGN            75
  2570. #define EMR_BITBLT                      76
  2571. #define EMR_STRETCHBLT                  77
  2572. #define EMR_MASKBLT                     78
  2573. #define EMR_PLGBLT                      79
  2574. #define EMR_SETDIBITSTODEVICE           80
  2575. #define EMR_STRETCHDIBITS               81
  2576. #define EMR_EXTCREATEFONTINDIRECTW      82
  2577. #define EMR_EXTTEXTOUTA                 83
  2578. #define EMR_EXTTEXTOUTW                 84
  2579. #define EMR_POLYBEZIER16                85
  2580. #define EMR_POLYGON16                   86
  2581. #define EMR_POLYLINE16                  87
  2582. #define EMR_POLYBEZIERTO16              88
  2583. #define EMR_POLYLINETO16                89
  2584. #define EMR_POLYPOLYLINE16              90
  2585. #define EMR_POLYPOLYGON16               91
  2586. #define EMR_POLYDRAW16                  92
  2587. #define EMR_CREATEMONOBRUSH             93
  2588. #define EMR_CREATEDIBPATTERNBRUSHPT     94
  2589. #define EMR_EXTCREATEPEN                95
  2590. #define EMR_POLYTEXTOUTA                96
  2591. #define EMR_POLYTEXTOUTW                97
  2592. #define EMR_SETICMMODE                  98
  2593. #define EMR_CREATECOLORSPACE            99
  2594. #define EMR_SETCOLORSPACE              100
  2595. #define EMR_DELETECOLORSPACE           101
  2596.  
  2597. #define EMR_MIN                         1
  2598. #define EMR_MAX                        101
  2599.  
  2600.  
  2601. /* Flags for MultiByteToWideChar() and WideCharToMultiByte()
  2602.  */
  2603. #define MB_PRECOMPOSED       0x00000001
  2604. #define MB_COMPOSITE         0x00000002
  2605. #define MB_USEGLYPHCHARS     0x00000004
  2606. #define MB_ERR_INVALID_CHARS 0x00000008
  2607.  
  2608. #define WC_DEFAULTCHECK      0x00000100
  2609. #define WC_COMPOSITECHECK    0x00000200
  2610. #define WC_DISCARDNS         0x00000010
  2611. #define WC_SEPCHARS          0x00000020
  2612. #define WC_DEFAULTCHAR       0x00000040
  2613.  
  2614. /*  Character type flags
  2615.  */
  2616. #define CT_CTYPE1            0x00000001
  2617. #define CT_CTYPE2            0x00000002
  2618. #define CT_CTYPE3            0x00000004
  2619.  
  2620. /*  CTYPE1 flags
  2621.  */
  2622. #define C1_UPPER             0x0001
  2623. #define C1_LOWER             0x0002
  2624. #define C1_DIGIT             0x0004
  2625. #define C1_SPACE             0x0008
  2626. #define C1_PUNCT             0x0010
  2627. #define C1_CNTRL             0x0020
  2628. #define C1_BLANK             0x0040
  2629. #define C1_XDIGIT            0x0080
  2630. #define C1_ALPHA             0x0100
  2631.  
  2632. /*  CTYPE2 flags
  2633.  */
  2634. #define C2_LEFTTORIGHT       0x0001
  2635. #define C2_RIGHTTOLEFT       0x0002
  2636. #define C2_EUROPENUMBER      0x0003
  2637. #define C2_EUROPESEPARATOR   0x0004
  2638. #define C2_EUROPETERMINATOR  0x0005
  2639. #define C2_ARABICNUMBER      0x0006
  2640. #define C2_COMMONSEPARATOR   0x0007
  2641. #define C2_BLOCKSEPARATOR    0x0008
  2642. #define C2_SEGMENTSEPARATOR  0x0009
  2643. #define C2_WHITESPACE        0x000A
  2644. #define C2_OTHERNEUTRAL      0x000B
  2645. #define C2_NOTAPPLICABLE     0x0000
  2646.  
  2647. /*  CTYPE3 flags
  2648.  */
  2649. #define C3_NONSPACING        0x0001
  2650. #define C3_DIACRITIC         0x0002
  2651. #define C3_VOWELMARK         0x0004
  2652. #define C3_SYMBOL            0x0008
  2653. #define C3_KATAKANA          0x0010
  2654. #define C3_HIRAGANA          0x0020
  2655. #define C3_HALFWIDTH         0x0040
  2656. #define C3_FULLWIDTH         0x0080
  2657. #define C3_IDEOGRAPH         0x0100
  2658. #define C3_KASHIDA           0x0200
  2659. #define C3_LEXICAL           0x0400
  2660. #define C3_ALPHA             0x8000
  2661. #define C3_NOTAPPLICABLE     0x0000
  2662.  
  2663. /*  String Compare / Map flags
  2664.  */
  2665. #define NORM_IGNORECASE         0x00000001
  2666. #define NORM_IGNORENONSPACE     0x00000002
  2667. #define NORM_IGNORESYMBOLS      0x00000004
  2668. #define NORM_IGNOREKANATYPE     0x00010000
  2669. #define NORM_IGNOREWIDTH        0x00020000
  2670.  
  2671. /*  Flags for LCMapString()
  2672.  */
  2673. #define LCMAP_LOWERCASE         0x00000100
  2674. #define LCMAP_UPPERCASE         0x00000200
  2675. #define LCMAP_SORTKEY           0x00000400
  2676. #define LCMAP_BYTEREV           0x00000800
  2677. #define LCMAP_HIRAGANA          0x00100000
  2678. #define LCMAP_KATAKANA          0x00200000
  2679. #define LCMAP_HALFWIDTH         0x00400000
  2680. #define LCMAP_FULLWIDTH         0x00800000
  2681.  
  2682. /*  Flags for EnumSystemLocales() and IsValidLocale()
  2683.  */
  2684. #define LCID_INSTALLED          0x00000001
  2685. #define LCID_SUPPORTED          0x00000002
  2686.  
  2687. /*  Flags for EnumSystemCodePages()
  2688.  */
  2689. #define CP_INSTALLED            0x00000001
  2690. #define CP_SUPPORTED            0x00000002
  2691.  
  2692. /* Sort flags
  2693.  */
  2694. #define SORT_STRINGSORT         0x00001000
  2695.  
  2696. /*  Codepage types
  2697.  */
  2698. #define CP_ACP               0
  2699. #define CP_OEMCP             1
  2700. #define CP_MACCP             2
  2701.  
  2702.  
  2703. /*  Country codes
  2704.  */
  2705. #define CTRY_DEFAULT                     0
  2706. #define CTRY_UNITED_STATES               1
  2707. #define CTRY_CANADA                      2
  2708. #define CTRY_RUSSIA                      7
  2709. #define CTRY_GREECE                      30
  2710. #define CTRY_NETHERLANDS                 31
  2711. #define CTRY_BELGIUM                     32
  2712. #define CTRY_FRANCE                      33
  2713. #define CTRY_SPAIN                       34
  2714. #define CTRY_HUNGARY                     36
  2715. #define CTRY_ITALY                       39
  2716. #define CTRY_ROMANIA                     40
  2717. #define CTRY_SWITZERLAND                 41
  2718. #define CTRY_CZECH                       42
  2719. #define CTRY_SLOVAK                      42
  2720. #define CTRY_AUSTRIA                     43
  2721. #define CTRY_UNITED_KINGDOM              44
  2722. #define CTRY_DENMARK                     45
  2723. #define CTRY_SWEDEN                      46
  2724. #define CTRY_NORWAY                      47
  2725. #define CTRY_POLAND                      48
  2726. #define CTRY_GERMANY                     49
  2727. #define CTRY_MEXICO                      52
  2728. #define CTRY_BRAZIL                      55
  2729. #define CTRY_AUSTRALIA                   61
  2730. #define CTRY_NEW_ZEALAND                 64
  2731. #define CTRY_SINGAPORE                   65
  2732. #define CTRY_JAPAN                       81
  2733. #define CTRY_SOUTH_KOREA                 82
  2734. #define CTRY_PRCHINA                     86
  2735. #define CTRY_TURKEY                      90
  2736. #define CTRY_PORTUGAL                    351
  2737. #define CTRY_IRELAND                     353
  2738. #define CTRY_ICELAND                     354
  2739. #define CTRY_FINLAND                     358
  2740. #define CTRY_BULGARIA                    359
  2741. #define CTRY_CROATIA                     385
  2742. #define CTRY_SLOVENIA                    386
  2743. #define CTRY_HONG_KONG                   852
  2744. #define CTRY_TAIWAN                      886
  2745.  
  2746. /*  Locale types
  2747.  */
  2748. #define LOCALE_NOUSEROVERRIDE       0x80000000
  2749. #define LOCALE_USE_CP_ACP           0x40000000
  2750. #define LOCALE_ILANGUAGE            0x00000001
  2751. #define LOCALE_SLANGUAGE            0x00000002
  2752. #define LOCALE_SENGLANGUAGE         0x00001001
  2753. #define LOCALE_SABBREVLANGNAME      0x00000003
  2754. #define LOCALE_SNATIVELANGNAME      0x00000004
  2755. #define LOCALE_ICOUNTRY             0x00000005
  2756. #define LOCALE_SCOUNTRY             0x00000006
  2757. #define LOCALE_SENGCOUNTRY          0x00001002
  2758. #define LOCALE_SABBREVCTRYNAME      0x00000007
  2759. #define LOCALE_SNATIVECTRYNAME      0x00000008
  2760. #define LOCALE_IDEFAULTLANGUAGE     0x00000009
  2761. #define LOCALE_IDEFAULTCOUNTRY      0x0000000A
  2762. #define LOCALE_IDEFAULTCODEPAGE     0x0000000B
  2763. #define LOCALE_IDEFAULTANSICODEPAGE 0x00001004
  2764. #define LOCALE_SLIST                0x0000000C
  2765. #define LOCALE_IMEASURE             0x0000000D
  2766. #define LOCALE_SDECIMAL             0x0000000E
  2767. #define LOCALE_STHOUSAND            0x0000000F
  2768. #define LOCALE_SGROUPING            0x00000010
  2769. #define LOCALE_IDIGITS              0x00000011
  2770. #define LOCALE_ILZERO               0x00000012
  2771. #define LOCALE_INEGNUMBER           0x00001010
  2772. #define LOCALE_SNATIVEDIGITS        0x00000013
  2773. #define LOCALE_SCURRENCY            0x00000014
  2774. #define LOCALE_SINTLSYMBOL          0x00000015
  2775. #define LOCALE_SMONDECIMALSEP       0x00000016
  2776. #define LOCALE_SMONTHOUSANDSEP      0x00000017
  2777. #define LOCALE_SMONGROUPING         0x00000018
  2778. #define LOCALE_ICURRDIGITS          0x00000019
  2779. #define LOCALE_IINTLCURRDIGITS      0x0000001A
  2780. #define LOCALE_ICURRENCY            0x0000001B
  2781. #define LOCALE_INEGCURR             0x0000001C
  2782. #define LOCALE_SDATE                0x0000001D
  2783. #define LOCALE_STIME                0x0000001E
  2784. #define LOCALE_SSHORTDATE           0x0000001F
  2785. #define LOCALE_SLONGDATE            0x00000020
  2786. #define LOCALE_STIMEFORMAT          0x00001003
  2787. #define LOCALE_IDATE                0x00000021
  2788. #define LOCALE_ILDATE               0x00000022
  2789. #define LOCALE_ITIME                0x00000023
  2790. #define LOCALE_ITIMEMARKPOSN        0x00001005
  2791. #define LOCALE_ICENTURY             0x00000024
  2792. #define LOCALE_ITLZERO              0x00000025
  2793. #define LOCALE_IDAYLZERO            0x00000026
  2794. #define LOCALE_IMONLZERO            0x00000027
  2795. #define LOCALE_S1159                0x00000028
  2796. #define LOCALE_S2359                0x00000029
  2797. #define LOCALE_ICALENDARTYPE        0x00001009
  2798. #define LOCALE_IOPTIONALCALENDAR    0x0000100B
  2799. #define LOCALE_IFIRSTDAYOFWEEK      0x0000100C
  2800. #define LOCALE_IFIRSTWEEKOFYEAR     0x0000100D
  2801. #define LOCALE_SDAYNAME1            0x0000002A
  2802. #define LOCALE_SDAYNAME2            0x0000002B
  2803. #define LOCALE_SDAYNAME3            0x0000002C
  2804. #define LOCALE_SDAYNAME4            0x0000002D
  2805. #define LOCALE_SDAYNAME5            0x0000002E
  2806. #define LOCALE_SDAYNAME6            0x0000002F
  2807. #define LOCALE_SDAYNAME7            0x00000030
  2808. #define LOCALE_SABBREVDAYNAME1      0x00000031
  2809. #define LOCALE_SABBREVDAYNAME2      0x00000032
  2810. #define LOCALE_SABBREVDAYNAME3      0x00000033
  2811. #define LOCALE_SABBREVDAYNAME4      0x00000034
  2812. #define LOCALE_SABBREVDAYNAME5      0x00000035
  2813. #define LOCALE_SABBREVDAYNAME6      0x00000036
  2814. #define LOCALE_SABBREVDAYNAME7      0x00000037
  2815. #define LOCALE_SMONTHNAME1          0x00000038
  2816. #define LOCALE_SMONTHNAME2          0x00000039
  2817. #define LOCALE_SMONTHNAME3          0x0000003A
  2818. #define LOCALE_SMONTHNAME4          0x0000003B
  2819. #define LOCALE_SMONTHNAME5          0x0000003C
  2820. #define LOCALE_SMONTHNAME6          0x0000003D
  2821. #define LOCALE_SMONTHNAME7          0x0000003E
  2822. #define LOCALE_SMONTHNAME8          0x0000003F
  2823. #define LOCALE_SMONTHNAME9          0x00000040
  2824. #define LOCALE_SMONTHNAME10         0x00000041
  2825. #define LOCALE_SMONTHNAME11         0x00000042
  2826. #define LOCALE_SMONTHNAME12         0x00000043
  2827. #define LOCALE_SMONTHNAME13         0x0000100E
  2828. #define LOCALE_SABBREVMONTHNAME1    0x00000044
  2829. #define LOCALE_SABBREVMONTHNAME2    0x00000045
  2830. #define LOCALE_SABBREVMONTHNAME3    0x00000046
  2831. #define LOCALE_SABBREVMONTHNAME4    0x00000047
  2832. #define LOCALE_SABBREVMONTHNAME5    0x00000048
  2833. #define LOCALE_SABBREVMONTHNAME6    0x00000049
  2834. #define LOCALE_SABBREVMONTHNAME7    0x0000004A
  2835. #define LOCALE_SABBREVMONTHNAME8    0x0000004B
  2836. #define LOCALE_SABBREVMONTHNAME9    0x0000004C
  2837. #define LOCALE_SABBREVMONTHNAME10   0x0000004D
  2838. #define LOCALE_SABBREVMONTHNAME11   0x0000004E
  2839. #define LOCALE_SABBREVMONTHNAME12   0x0000004F
  2840. #define LOCALE_SABBREVMONTHNAME13   0x0000100F
  2841. #define LOCALE_SPOSITIVESIGN        0x00000050
  2842. #define LOCALE_SNEGATIVESIGN        0x00000051
  2843. #define LOCALE_IPOSSIGNPOSN         0x00000052
  2844. #define LOCALE_INEGSIGNPOSN         0x00000053
  2845. #define LOCALE_IPOSSYMPRECEDES      0x00000054
  2846. #define LOCALE_IPOSSEPBYSPACE       0x00000055
  2847. #define LOCALE_INEGSYMPRECEDES      0x00000056
  2848. #define LOCALE_INEGSEPBYSPACE       0x00000057
  2849. #define LOCALE_FONTSIGNATURE        0x00000058
  2850.  
  2851. /*  Flags for GetTimeFormat()
  2852.  */
  2853. #define TIME_NOMINUTESORSECONDS    0x00000001
  2854. #define TIME_NOSECONDS             0x00000002
  2855. #define TIME_NOTIMEMARKER          0x00000004
  2856. #define TIME_FORCE24HOURFORMAT     0x00000008
  2857.  
  2858. /*  Flags for GetDateFormat()
  2859.  */
  2860. #define DATE_SHORTDATE             0x00000001
  2861. #define DATE_LONGDATE              0x00000002
  2862. #define DATE_USE_ALT_CALENDAR      0x00000004
  2863.  
  2864. /*  Calendar types
  2865.  */
  2866. #define CAL_ICALINTVALUE           0x00000001
  2867. #define CAL_SCALNAME               0x00000002
  2868. #define CAL_IYEAROFFSETRANGE       0x00000003
  2869. #define CAL_SERASTRING             0x00000004
  2870. #define CAL_SSHORTDATE             0x00000005
  2871. #define CAL_SLONGDATE              0x00000006
  2872. #define CAL_SDAYNAME1              0x00000007
  2873. #define CAL_SDAYNAME2              0x00000008
  2874. #define CAL_SDAYNAME3              0x00000009
  2875. #define CAL_SDAYNAME4              0x0000000a
  2876. #define CAL_SDAYNAME5              0x0000000b
  2877. #define CAL_SDAYNAME6              0x0000000c
  2878. #define CAL_SDAYNAME7              0x0000000d
  2879. #define CAL_SABBREVDAYNAME1        0x0000000e
  2880. #define CAL_SABBREVDAYNAME2        0x0000000f
  2881. #define CAL_SABBREVDAYNAME3        0x00000010
  2882. #define CAL_SABBREVDAYNAME4        0x00000011
  2883. #define CAL_SABBREVDAYNAME5        0x00000012
  2884. #define CAL_SABBREVDAYNAME6        0x00000013
  2885. #define CAL_SABBREVDAYNAME7        0x00000014
  2886. #define CAL_SMONTHNAME1            0x00000015
  2887. #define CAL_SMONTHNAME2            0x00000016
  2888. #define CAL_SMONTHNAME3            0x00000017
  2889. #define CAL_SMONTHNAME4            0x00000018
  2890. #define CAL_SMONTHNAME5            0x00000019
  2891. #define CAL_SMONTHNAME6            0x0000001a
  2892. #define CAL_SMONTHNAME7            0x0000001b
  2893. #define CAL_SMONTHNAME8            0x0000001c
  2894. #define CAL_SMONTHNAME9            0x0000001d
  2895. #define CAL_SMONTHNAME10           0x0000001e
  2896. #define CAL_SMONTHNAME11           0x0000001f
  2897. #define CAL_SMONTHNAME12           0x00000020
  2898. #define CAL_SMONTHNAME13           0x00000021
  2899. #define CAL_SABBREVMONTHNAME1      0x00000022
  2900. #define CAL_SABBREVMONTHNAME2      0x00000023
  2901. #define CAL_SABBREVMONTHNAME3      0x00000024
  2902. #define CAL_SABBREVMONTHNAME4      0x00000025
  2903. #define CAL_SABBREVMONTHNAME5      0x00000026
  2904. #define CAL_SABBREVMONTHNAME6      0x00000027
  2905. #define CAL_SABBREVMONTHNAME7      0x00000028
  2906. #define CAL_SABBREVMONTHNAME8      0x00000029
  2907. #define CAL_SABBREVMONTHNAME9      0x0000002a
  2908. #define CAL_SABBREVMONTHNAME10     0x0000002b
  2909. #define CAL_SABBREVMONTHNAME11     0x0000002c
  2910. #define CAL_SABBREVMONTHNAME12     0x0000002d
  2911. #define CAL_SABBREVMONTHNAME13     0x0000002e
  2912.  
  2913. /*  Type for EnumCalendarInfo()
  2914.  */
  2915. #define ENUM_ALL_CALENDARS         0xffffffff
  2916.  
  2917. /*  Calendar types
  2918.  */
  2919. #define CAL_GREGORIAN        1
  2920. #define CAL_GREGORIAN_US     2
  2921. #define CAL_JAPAN            3
  2922. #define CAL_TAIWAN           4
  2923. #define CAL_KOREA            5
  2924.  
  2925. /*  Primary language IDs
  2926.  */
  2927. #define LANG_NEUTRAL                     0x00
  2928. #define LANG_ARABIC                      0x01
  2929. #define LANG_BULGARIAN                   0x02
  2930. #define LANG_CATALAN                     0x03
  2931. #define LANG_CHINESE                     0x04
  2932. #define LANG_CZECH                       0x05
  2933. #define LANG_DANISH                      0x06
  2934. #define LANG_GERMAN                      0x07
  2935. #define LANG_GREEK                       0x08
  2936. #define LANG_ENGLISH                     0x09
  2937. #define LANG_SPANISH                     0x0a
  2938. #define LANG_FINNISH                     0x0b
  2939. #define LANG_FRENCH                      0x0c
  2940. #define LANG_HEBREW                      0x0D
  2941. #define LANG_HUNGARIAN                   0x0e
  2942. #define LANG_ICELANDIC                   0x0f
  2943. #define LANG_ITALIAN                     0x10
  2944. #define LANG_JAPANESE                    0x11
  2945. #define LANG_KOREAN                      0x12
  2946. #define LANG_NORWEGIAN                   0x14
  2947. #define LANG_POLISH                      0x15
  2948. #define LANG_PORTUGUESE                  0x16
  2949. #define LANG_CROATIAN                    0x1a
  2950. #define LANG_DUTCH                       0x13
  2951. #define LANG_ROMANIAN                    0x18
  2952. #define LANG_RUSSIAN                     0x19
  2953. #define LANG_SLOVAK                      0x1b
  2954. #define LANG_ALBANIAN                    0x1c
  2955. #define LANG_SWEDISH                     0x1d
  2956. #define LANG_THAI                        0x1e
  2957. #define LANG_TURKISH                     0x1f
  2958. #define LANG_INDONESIAN                  0x21
  2959. #define LANG_UKRAINIAN                   0x22
  2960. #define LANG_BYELORUSSIAN                0x23
  2961. #define LANG_SLOVENIAN                   0x24
  2962. #define LANG_ESTONIAN                    0x25
  2963. #define LANG_LATVIAN                     0x26
  2964. #define LANG_LITHUANIAN                  0x27
  2965. #define LANG_FARSI                       0x29
  2966. #define LANG_BASQUE                      0x2d
  2967. #define LANG_SORBIAN                     0x2e
  2968. #define LANG_AFRIKAANS                   0x36
  2969. #define LANG_FAEROESE                    0x38
  2970.  
  2971. /*  SubLanguage IDs
  2972.  */
  2973. #define SUBLANG_NEUTRAL                  0x00
  2974. #define SUBLANG_DEFAULT                  0x01
  2975. #define SUBLANG_SYS_DEFAULT              0x02
  2976. #define SUBLANG_ARABIC                   0x01
  2977. #define SUBLANG_ARABIC_IRAQ              0x02
  2978. #define SUBLANG_ARABIC_EGYPT             0x03
  2979. #define SUBLANG_ARABIC_LIBYA             0x04
  2980. #define SUBLANG_ARABIC_ALGERIA           0x05
  2981. #define SUBLANG_ARABIC_MOROCCO           0x06
  2982. #define SUBLANG_ARABIC_TUNISIA           0x07
  2983. #define SUBLANG_ARABIC_OMAN              0x08
  2984. #define SUBLANG_ARABIC_YEMEN             0x09
  2985. #define SUBLANG_ARABIC_SYRIA             0x10
  2986. #define SUBLANG_ARABIC_JORDAN            0x11
  2987. #define SUBLANG_ARABIC_LEBANON           0x12
  2988. #define SUBLANG_ARABIC_KUWAIT            0x13
  2989. #define SUBLANG_ARABIC_UAE               0x14
  2990. #define SUBLANG_ARABIC_BAHRAIN           0x15
  2991. #define SUBLANG_ARABIC_QATAR             0x16
  2992. #define SUBLANG_CHINESE_TRADITIONAL      0x01
  2993. #define SUBLANG_CHINESE_SIMPLIFIED       0x02
  2994. #define SUBLANG_CHINESE_HONGKONG         0x03
  2995. #define SUBLANG_CHINESE_SINGAPORE        0x04
  2996. #define SUBLANG_DUTCH                    0x01
  2997. #define SUBLANG_DUTCH_BELGIAN            0x02
  2998. #define SUBLANG_ENGLISH_US               0x01
  2999. #define SUBLANG_ENGLISH_UK               0x02
  3000. #define SUBLANG_ENGLISH_AUS              0x03
  3001. #define SUBLANG_ENGLISH_CAN              0x04
  3002. #define SUBLANG_ENGLISH_NZ               0x05
  3003. #define SUBLANG_ENGLISH_EIRE             0x06
  3004. #define SUBLANG_ENGLISH_SAFRICA          0x07
  3005. #define SUBLANG_ENGLISH_JAMAICA          0x08
  3006. #define SUBLANG_ENGLISH_CARRIBEAN        0x09
  3007. #define SUBLANG_FRENCH                   0x01
  3008. #define SUBLANG_FRENCH_BELGIAN           0x02
  3009. #define SUBLANG_FRENCH_CANADIAN          0x03
  3010. #define SUBLANG_FRENCH_SWISS             0x04
  3011. #define SUBLANG_FRENCH_LUXEMBOURG        0x05
  3012. #define SUBLANG_GERMAN                   0x01
  3013. #define SUBLANG_GERMAN_SWISS             0x02
  3014. #define SUBLANG_GERMAN_AUSTRIAN          0x03
  3015. #define SUBLANG_GERMAN_LUXEMBOURG        0x04
  3016. #define SUBLANG_GERMAN_LIECHTENSTEIN     0x05
  3017. #define SUBLANG_ITALIAN                  0x01
  3018. #define SUBLANG_ITALIAN_SWISS            0x02
  3019. #define SUBLANG_KOREAN                   0x01
  3020. #define SUBLANG_KOREAN_JOHAB             0x02
  3021. #define SUBLANG_NORWEGIAN_BOKMAL         0x01
  3022. #define SUBLANG_NORWEGIAN_NYNORSK        0x02
  3023. #define SUBLANG_PORTUGUESE               0x02
  3024. #define SUBLANG_PORTUGUESE_BRAZILIAN     0x01
  3025. #define SUBLANG_SPANISH                  0x01
  3026. #define SUBLANG_SPANISH_MEXICAN          0x02
  3027. #define SUBLANG_SPANISH_MODERN           0x03
  3028. #define SUBLANG_SPANISH_GUATEMALA        0x04
  3029. #define SUBLANG_SPANISH_COSTARICA        0x05
  3030. #define SUBLANG_SPANISH_PANAMA           0x06
  3031. #define SUBLANG_SPANISH_DOMINICAN        0x07
  3032. #define SUBLANG_SPANISH_VENEZUELA        0x08
  3033. #define SUBLANG_SPANISH_COLOMBIA         0x09
  3034. #define SUBLANG_SPANISH_PERU             0x10
  3035. #define SUBLANG_SPANISH_ARGENTINA        0x11
  3036. #define SUBLANG_SPANISH_ECUADOR          0x12
  3037. #define SUBLANG_SPANISH_CHILE            0x13
  3038. #define SUBLANG_SPANISH_URUGUAY          0x14
  3039. #define SUBLANG_SPANISH_PARAGUAY         0x15
  3040. #define SUBLANG_SPANISH_BOLIVIA          0x16
  3041.  
  3042. /*  Sort IDs
  3043.  */
  3044. #define SORT_DEFAULT                     0x0
  3045. #define SORT_JAPANESE_XJIS               0x0
  3046. #define SORT_JAPANESE_UNICODE            0x1
  3047. #define SORT_CHINESE_BIG5                0x0
  3048. #define SORT_CHINESE_UNICODE             0x1
  3049. #define SORT_KOREAN_KSC                  0x0
  3050. #define SORT_KOREAN_UNICODE              0x1
  3051.  
  3052. /*  Default Language / Locale
  3053.  */
  3054. #define LANG_SYSTEM_DEFAULT    (MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT))
  3055. #define LANG_USER_DEFAULT      (MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT))
  3056. #define LOCALE_SYSTEM_DEFAULT  (MAKELCID(LANG_SYSTEM_DEFAULT, SORT_DEFAULT))
  3057. #define LOCALE_USER_DEFAULT    (MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT))
  3058.  
  3059. /*
  3060.  * Keyboard Layout API
  3061.  */
  3062. #define HKL_PREV            0
  3063. #define HKL_NEXT            1
  3064.  
  3065. #define KLF_ACTIVATE        0x00000001
  3066. #define KLF_SUBSTITUTE_OK   0x00000002
  3067. #define KLF_UNLOADPREVIOUS  0x00000004
  3068. #define KLF_REORDER         0x00000008
  3069. #define KLF_REPLACELANG     0x00000010
  3070. #define KLF_NOTELLSHELL     0x00000080
  3071.  
  3072.  
  3073. /* Forward Declaration
  3074.  */
  3075. typedef struct _tagLOGFONT      LOGFONT,    *PLOGFONT, *LPLOGFONT;
  3076. typedef struct _tagENUMLOGFONT      ENUMLOGFONT,    *PENUMLOGFONT, *LPENUMLOGFONT;
  3077.  
  3078. typedef struct _tagTEXTMETRIC   TEXTMETRIC, *PTEXTMETRIC, *LPTEXTMETRIC;
  3079. typedef struct _tagNEWTEXTMETRIC   NEWTEXTMETRIC, *PNEWTEXTMETRIC, *LPNEWTEXTMETRIC;
  3080.  
  3081.  
  3082. /* WinMain/WinProcs/TimerProcs
  3083.  */
  3084. typedef int                            (* EXPENTRY FNMAIN )( HINSTANCE, HINSTANCE, LPSTR, int );
  3085. typedef FNMAIN                          PFNMAIN;
  3086. typedef LRESULT                      (* EXPENTRY WNDPROC ) ( HWND, UINT, WPARAM, LPARAM );
  3087. typedef int                            (* EXPENTRY FARPROC ) ( );
  3088. typedef UINT                         (* EXPENTRY LPOFNHOOKPROC ) ( HWND, UINT, WPARAM, LPARAM );
  3089. typedef BOOL                         (* EXPENTRY DLGPROC ) ( HWND, UINT, WPARAM, LPARAM );
  3090. typedef void                           (* EXPENTRY TIMERPROC)( HWND, UINT, UINT, DWORD );
  3091. typedef BOOL                         (* EXPENTRY ABORTPROC)( HDC, int);
  3092. typedef UINT                         (* APIENTRY LPPRINTHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
  3093. typedef UINT                         (* APIENTRY LPSETUPHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
  3094. typedef LRESULT                      (* EXPENTRY HOOKPROC)(int code, WPARAM wParam, LPARAM lParam);
  3095. typedef DWORD                        (* EXPENTRY PTHREAD_START_ROUTINE)(PVOID lpThreadParameter);
  3096. typedef DWORD                        (* EXPENTRY LPTHREAD_START_ROUTINE)(PVOID lpThreadParameter);
  3097.  
  3098. typedef int                            (* EXPENTRY GOBJENUMPROC)(PVOID, LPARAM);
  3099. typedef VOID                         (* EXPENTRY LINEDDAPROC)(int, int, LPARAM);
  3100. typedef int                            (* EXPENTRY OLDFONTENUMPROC)( PLOGFONT, PTEXTMETRIC, DWORD, LPARAM );
  3101. typedef int                            (* EXPENTRY FONTENUMPROC)( PENUMLOGFONT, PNEWTEXTMETRIC, DWORD, LPARAM );
  3102. typedef BOOL                         (* EXPENTRY WNDENUMPROC)( HWND, LPARAM );
  3103. typedef BOOL                         (* EXPENTRY PROPENUMPROC)( HWND, LPCTSTR, HANDLE );
  3104. typedef UINT                         (* EXPENTRY PFRHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
  3105. typedef BOOL                         (* EXPENTRY GRAYSTRINGPROC)(HDC, LPARAM, int);
  3106. typedef UINT                         (* EXPENTRY LPCCHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
  3107. typedef UINT                         (* EXPENTRY LPCFHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
  3108. typedef HDDEDATA                     (  EXPENTRY FNCALLBACK)(UINT, UINT, HCONV, HSZ, HSZ, HDDEDATA, DWORD, DWORD );
  3109. typedef BOOL                         (* EXPENTRY PROPENUMPROCEX)( HWND, LPCTSTR, HANDLE, DWORD );
  3110. typedef BOOL                         (* EXPENTRY LOCALE_ENUMPROC)( LPSTR );
  3111. typedef FNCALLBACK                    *PFNCALLBACK;
  3112.  
  3113. /* Structure
  3114.  */
  3115. typedef struct _tagPOINT  {
  3116.    LONG                              x;
  3117.    LONG                              y;
  3118. } POINT,  *PPOINT,  *LPPOINT, POINTL, *PPOINTL, *LPPOINTL;
  3119.  
  3120. typedef struct _tagMSG   {
  3121.    HWND                              hwnd;
  3122.    UINT                              message;
  3123.    WPARAM                            wParam;
  3124.    LPARAM                            lParam;
  3125.    DWORD                             time;
  3126.    POINT                             pt;
  3127. } MSG, *PMSG, *LPMSG;
  3128.  
  3129. typedef struct _tagRECT  {
  3130.    LONG                              left;
  3131.    LONG                              top;
  3132.    LONG                              right;
  3133.    LONG                              bottom;
  3134. } RECT, RECTL, *PRECT, *PRECTL, *LPRECT, *LPRECTL;
  3135.  
  3136. typedef struct _tagWNDCLASS {
  3137.    UINT                              style;
  3138.    WNDPROC                           lpfnWndProc;
  3139.    int                                 cbClsExtra;
  3140.    int                                 cbWndExtra;
  3141.    HINSTANCE                         hInstance;
  3142.    HICON                             hIcon;
  3143.    HCURSOR                           hCursor;
  3144.    HBRUSH                            hbrBackground;
  3145.    LPCTSTR                           lpszMenuName;
  3146.    LPCTSTR                           lpszClassName;
  3147. } WNDCLASS, *PWNDCLASS, *LPWNDCLASS;
  3148.  
  3149. #pragma pack(1)
  3150. typedef struct _tagOFN {
  3151.    DWORD                             lStructSize;
  3152.    HWND                              hwndOwner;
  3153.    HINSTANCE                         hInstance;
  3154.    LPCTSTR                           lpstrFilter;
  3155.    LPTSTR                            lpstrCustomFilter;
  3156.    DWORD                             nMaxCustFilter;
  3157.    DWORD                             nFilterIndex;
  3158.    LPTSTR                            lpstrFile;
  3159.    DWORD                             nMaxFile;
  3160.    LPTSTR                            lpstrFileTitle;
  3161.    DWORD                             nMaxFileTitle;
  3162.    LPCTSTR                           lpstrInitialDir;
  3163.    LPCTSTR                           lpstrTitle;
  3164.    DWORD                             Flags;
  3165.    WORD                              nFileOffset;
  3166.    WORD                              nFileExtension;
  3167.    LPCTSTR                           lpstrDefExt;
  3168.    DWORD                             lCustData;
  3169.    LPOFNHOOKPROC                     lpfnHook;
  3170.    LPCTSTR                           lpTemplateName;
  3171. } OPENFILENAME, *POPENFILENAME, *LPOPENFILENAME;
  3172. #pragma pack(4)
  3173.  
  3174. #define OFS_MAXPATHNAME    128
  3175. typedef struct _tagOFSTRUCT {
  3176.    BYTE                              cBytes;
  3177.    BYTE                              fFixedDisk;
  3178.    WORD                              nErrCode;
  3179.    WORD                              Reserved1;
  3180.    WORD                              Reserved2;
  3181.    CHAR                              szPathName[OFS_MAXPATHNAME];
  3182. } OFSTRUCT, *POFSTRUCT, *LPOFSTRUCT;
  3183.  
  3184. #define CCHDEVICENAME 32
  3185. typedef struct _tagDeviceMode {
  3186.    BYTE                              dmDeviceName[CCHDEVICENAME];
  3187.    WORD                              dmSpecVersion;
  3188.    WORD                              dmDriverVersion;
  3189.    WORD                              dmSize;
  3190.    WORD                              dmDriverExtra;
  3191.    DWORD                             dmFields;
  3192.    short                               dmOrientation;
  3193.    short                               dmPaperSize;
  3194.    short                               dmPaperLength;
  3195.    short                               dmPaperWidth;
  3196.    short                               dmScale;
  3197.    short                               dmCopies;
  3198.    short                               dmDefaultSource;
  3199.    short                               dmPrintQuality;
  3200.    short                               dmColor;
  3201.    short                               dmDuplex;
  3202.    short                               dmYResolution;
  3203.    short                               dmTTOption;
  3204.    short                               dmCollate;
  3205.    BYTE                              dmFormName[32];
  3206.    DWORD                             dmLogPixels;
  3207.    DWORD                             dmBitsPerPel;
  3208.    DWORD                             dmPelsWidth;
  3209.    DWORD                             dmPelsHeight;
  3210.    DWORD                             dmDisplayFlags;
  3211.    DWORD                             dmDisplayFrequency;
  3212. } DEVMODE, *PDEVMODE, *LPDEVMODE;
  3213.  
  3214. typedef UINT (* EXPENTRY LPFNDEVMODE)(HWND, HMODULE, LPDEVMODE, LPSTR, LPSTR, LPDEVMODE, LPSTR, UINT);
  3215.  
  3216.  
  3217. #define DM_SPECVERSION      0x0320
  3218.  
  3219. #define DM_ORIENTATION      0x00000001L
  3220. #define DM_PAPERSIZE        0x00000002L
  3221. #define DM_PAPERLENGTH      0x00000004L
  3222. #define DM_PAPERWIDTH       0x00000008L
  3223. #define DM_SCALE            0x00000010L
  3224. #define DM_COPIES           0x00000100L
  3225. #define DM_DEFAULTSOURCE    0x00000200L
  3226. #define DM_PRINTQUALITY     0x00000400L
  3227. #define DM_COLOR            0x00000800L
  3228. #define DM_DUPLEX           0x00001000L
  3229. #define DM_YRESOLUTION      0x00002000L
  3230. #define DM_TTOPTION         0x00004000L
  3231. #define DM_COLLATE          0x00008000L
  3232. #define DM_FORMNAME         0x00010000L
  3233.  
  3234. #define DMORIENT_PORTRAIT   1
  3235. #define DMORIENT_LANDSCAPE  2
  3236.  
  3237. #define DMPAPER_FIRST                  DMPAPER_LETTER
  3238. #define DMPAPER_LETTER                 1
  3239. #define DMPAPER_LETTERSMALL            2
  3240. #define DMPAPER_TABLOID                3
  3241. #define DMPAPER_LEDGER                 4
  3242. #define DMPAPER_LEGAL                  5
  3243. #define DMPAPER_STATEMENT              6
  3244. #define DMPAPER_EXECUTIVE              7
  3245. #define DMPAPER_A3                     8
  3246. #define DMPAPER_A4                     9
  3247. #define DMPAPER_A4SMALL               10
  3248. #define DMPAPER_A5                    11
  3249. #define DMPAPER_B4                    12
  3250. #define DMPAPER_B5                    13
  3251. #define DMPAPER_FOLIO                 14
  3252. #define DMPAPER_QUARTO                15
  3253. #define DMPAPER_10X14                 16
  3254. #define DMPAPER_11X17                 17
  3255. #define DMPAPER_NOTE                  18
  3256. #define DMPAPER_ENV_9                 19
  3257. #define DMPAPER_ENV_10                20
  3258. #define DMPAPER_ENV_11                21
  3259. #define DMPAPER_ENV_12                22
  3260. #define DMPAPER_ENV_14                23
  3261. #define DMPAPER_CSHEET                24
  3262. #define DMPAPER_DSHEET                25
  3263. #define DMPAPER_ESHEET                26
  3264. #define DMPAPER_ENV_DL                27
  3265. #define DMPAPER_ENV_C5                28
  3266. #define DMPAPER_ENV_C3                29
  3267. #define DMPAPER_ENV_C4                30
  3268. #define DMPAPER_ENV_C6                31
  3269. #define DMPAPER_ENV_C65               32
  3270. #define DMPAPER_ENV_B4                33
  3271. #define DMPAPER_ENV_B5                34
  3272. #define DMPAPER_ENV_B6                35
  3273. #define DMPAPER_ENV_ITALY             36
  3274. #define DMPAPER_ENV_MONARCH           37
  3275. #define DMPAPER_ENV_PERSONAL          38
  3276. #define DMPAPER_FANFOLD_US            39
  3277. #define DMPAPER_FANFOLD_STD_GERMAN    40
  3278. #define DMPAPER_FANFOLD_LGL_GERMAN    41
  3279. #define DMPAPER_LAST                  DMPAPER_FANFOLD_LGL_GERMAN
  3280. #define DMPAPER_USER                 256
  3281.  
  3282. #define DMBIN_FIRST         DMBIN_UPPER
  3283. #define DMBIN_UPPER         1
  3284. #define DMBIN_ONLYONE       1
  3285. #define DMBIN_LOWER         2
  3286. #define DMBIN_MIDDLE        3
  3287. #define DMBIN_MANUAL        4
  3288. #define DMBIN_ENVELOPE      5
  3289. #define DMBIN_ENVMANUAL     6
  3290. #define DMBIN_AUTO          7
  3291. #define DMBIN_TRACTOR       8
  3292. #define DMBIN_SMALLFMT      9
  3293. #define DMBIN_LARGEFMT      10
  3294. #define DMBIN_LARGECAPACITY 11
  3295. #define DMBIN_CASSETTE      14
  3296. #define DMBIN_FORMSOURCE    15
  3297. #define DMBIN_LAST          DMBIN_FORMSOURCE
  3298.  
  3299. #define DMBIN_USER          256
  3300.  
  3301. #define DMRES_DRAFT         (-1)
  3302. #define DMRES_LOW           (-2)
  3303. #define DMRES_MEDIUM        (-3)
  3304. #define DMRES_HIGH          (-4)
  3305.  
  3306. #define DMCOLOR_MONOCHROME  1
  3307. #define DMCOLOR_COLOR       2
  3308.  
  3309. #define DMDUP_SIMPLEX       1
  3310. #define DMDUP_VERTICAL      2
  3311. #define DMDUP_HORIZONTAL    3
  3312.  
  3313. #define DMTT_BITMAP         1
  3314. #define DMTT_DOWNLOAD       2
  3315. #define DMTT_SUBDEV         3
  3316.  
  3317. #define DMCOLLATE_FALSE     0
  3318. #define DMCOLLATE_TRUE      1
  3319.  
  3320. #define DM_GRAYSCALE  0x00000001
  3321. #define DM_INTERLACED 0x00000002
  3322.  
  3323.  
  3324.  
  3325. typedef struct _tagSIZE   {
  3326.    LONG                              cx;
  3327.    LONG                              cy;
  3328. }  SIZE,  *PSIZE,  *LPSIZE, SIZEL, *PSIZEL, *LPSIZEL;
  3329.  
  3330. typedef struct _tagPOINTS {
  3331.    SHORT   x;
  3332.    SHORT   y;
  3333. } POINTS, *PPOINTS, *LPPOINTS;
  3334.  
  3335. #define MAKEPOINTS(l)       (*((PPOINTS)&(l)))
  3336.  
  3337. typedef struct _tagCREATESTRUCT {
  3338.     LPVOID                           lpCreateParams;
  3339.     HANDLE                           hInstance;
  3340.     HMENU                            hMenu;
  3341.     HWND                             hwndParent;
  3342.     int                                cy;
  3343.     int                                cx;
  3344.     int                                y;
  3345.     int                                x;
  3346.     LONG                             style;
  3347.     LPCTSTR                          lpszName;
  3348.     LPCTSTR                          lpszClass;
  3349.     DWORD                            dwExStyle;
  3350. } CREATESTRUCT, *PCREATESTRUCT, *LPCREATESTRUCT;
  3351.  
  3352. typedef struct _tagCLIENTCREATESTRUCT {
  3353.     HANDLE                           hWindowMenu;
  3354.     UINT                             idFirstChild;
  3355. } CLIENTCREATESTRUCT, *PCLIENTCREATESTRUCT, *LPCLIENTCREATESTRUCT;
  3356.  
  3357. typedef struct _tagMDICREATESTRUCT {
  3358.     LPTSTR                         szClass;
  3359.     LPTSTR                         szTitle;
  3360.     HANDLE                         hOwner;
  3361.     int                              x;
  3362.     int                              y;
  3363.     int                              cx;
  3364.     int                              cy;
  3365.     DWORD                          style;
  3366.     LPARAM                         lParam;
  3367. } MDICREATESTRUCT, *PMDICREATESTRUCT, *LPMDICREATESTRUCT;
  3368.  
  3369. typedef struct _tagSECURITY_ATTRIBUTES {
  3370.     DWORD                            nLength;
  3371.     LPVOID                           lpSecurityDescriptor;
  3372.     BOOL                             bInheritHandle;
  3373. } SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
  3374.  
  3375. typedef PVOID PSECURITY_DESCRIPTOR;
  3376.  
  3377. typedef struct _tagPAINTSTRUCT {
  3378.     HDC                              hdc;
  3379.     BOOL                             fErase;
  3380.     RECT                             rcPaint;
  3381.     BOOL                             fRestore;
  3382.     BOOL                             fIncUpdate;
  3383.     BYTE                             rgbReserved[32];
  3384. } PAINTSTRUCT, *PPAINTSTRUCT, *LPPAINTSTRUCT;
  3385.  
  3386.  
  3387. /* Palette Entry Flags
  3388.  */
  3389. #define PC_RESERVED     0x01
  3390. #define PC_EXPLICIT     0x02
  3391. #define PC_NOCOLLAPSE   0x04
  3392.  
  3393.  
  3394. typedef struct _tagPALETTEENTRY
  3395. {
  3396.   BYTE peRed;
  3397.   BYTE peGreen;
  3398.   BYTE peBlue;
  3399.   BYTE peFlags;
  3400. } PALETTEENTRY, *PPALETTEENTRY, *LPPALETTEENTRY;
  3401.  
  3402. typedef struct _tagLOGPALETTE
  3403. {
  3404.   WORD                                palVersion;
  3405.   WORD                                palNumEntries;
  3406.   PALETTEENTRY                        palPalEntry[1];
  3407. } LOGPALETTE, *PLOGPALETTE, *LPLOGPALETTE, *NPLOGPALETTE;
  3408.  
  3409. typedef struct  _tagXFORM
  3410. {
  3411.     FLOAT eM11;
  3412.     FLOAT eM12;
  3413.     FLOAT eM21;
  3414.     FLOAT eM22;
  3415.     FLOAT eDx;
  3416.     FLOAT eDy;
  3417. } XFORM, *PXFORM, *LPXFORM;
  3418.  
  3419. typedef struct _tagBITMAPCOREHEADER {
  3420.    DWORD   bcSize;
  3421.    WORD    bcWidth;
  3422.    WORD    bcHeight;
  3423.    WORD    bcPlanes;
  3424.    WORD    bcBitCount;
  3425. } BITMAPCOREHEADER, *LPBITMAPCOREHEADER, *PBITMAPCOREHEADER;
  3426.  
  3427.  
  3428. typedef struct _tagBITMAPINFOHEADER {
  3429.         DWORD    biSize;
  3430.         LONG     biWidth;
  3431.         LONG     biHeight;
  3432.         WORD     biPlanes;
  3433.         WORD     biBitCount;
  3434.         DWORD    biCompression;
  3435.         DWORD    biSizeImage;
  3436.         LONG     biXPelsPerMeter;
  3437.         LONG     biYPelsPerMeter;
  3438.         DWORD    biClrUsed;
  3439.         DWORD    biClrImportant;
  3440. } BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER;
  3441.  
  3442. #pragma pack(2)
  3443. typedef struct _tagBITMAPFILEHEADER {
  3444.         WORD       bfType;
  3445.         DWORD      bfSize;
  3446.         WORD       bfReserved1;
  3447.         WORD       bfReserved2;
  3448.         DWORD      bfOffBits;
  3449. } BITMAPFILEHEADER, *LPBITMAPFILEHEADER, *PBITMAPFILEHEADER;
  3450. #pragma pack(4)
  3451.  
  3452. /* biCompression Field Constants
  3453.  */
  3454. #define BI_RGB        0L
  3455. #define BI_RLE8       1L
  3456. #define BI_RLE4       2L
  3457. #define BI_BITFIELDS  3L
  3458.  
  3459. typedef struct _tagRGBTRIPLE {
  3460.         BYTE    rgbtBlue;
  3461.         BYTE    rgbtGreen;
  3462.         BYTE    rgbtRed;
  3463. } RGBTRIPLE;
  3464.  
  3465. typedef struct tagBITMAPCOREINFO {
  3466.     BITMAPCOREHEADER    bmciHeader;
  3467.     RGBTRIPLE           bmciColors[1];
  3468. } BITMAPCOREINFO, *LPBITMAPCOREINFO, *PBITMAPCOREINFO;
  3469.  
  3470. typedef struct _tagRGBQUAD {
  3471.         BYTE  rgbBlue;
  3472.         BYTE  rgbGreen;
  3473.         BYTE  rgbRed;
  3474.         BYTE  rgbReserved;
  3475. } RGBQUAD, *PRGBQUAD, *LPRGBQUAD;
  3476.  
  3477.  
  3478. typedef struct _tagBITMAPINFO {
  3479.     BITMAPINFOHEADER                bmiHeader;
  3480.     RGBQUAD                         bmiColors[1];
  3481. } BITMAPINFO, *PBITMAPINFO, *LPBITMAPINFO;
  3482.  
  3483.  
  3484. /* Xform FLAGS
  3485.  */
  3486. #define MWT_IDENTITY        1
  3487. #define MWT_LEFTMULTIPLY    2
  3488. #define MWT_RIGHTMULTIPLY   3
  3489.  
  3490. /* Mapping Modes */
  3491. #define MM_TEXT             1
  3492. #define MM_LOMETRIC         2
  3493. #define MM_HIMETRIC         3
  3494. #define MM_LOENGLISH        4
  3495. #define MM_HIENGLISH        5
  3496. #define MM_TWIPS            6
  3497. #define MM_ISOTROPIC        7
  3498. #define MM_ANISOTROPIC      8
  3499.  
  3500. typedef struct _tagDOCINFO {
  3501.     int      cbSize;
  3502.     LPCSTR lpszDocName;
  3503.     LPCSTR lpszOutput;
  3504. } DOCINFO, *PDOCINFO, *LPDOCINFO;
  3505.  
  3506. typedef struct _tagDevNames
  3507. {
  3508.     WORD wDriverOffset;
  3509.     WORD wDeviceOffset;
  3510.     WORD wOutputOffset;
  3511.     WORD wDefault;
  3512. } DEVNAMES, *PDEVNAMES, *LPDEVNAMES;
  3513.  
  3514. #pragma pack(1)
  3515. typedef struct _tagPDA {
  3516.    DWORD              lStructSize;
  3517.    HWND               hwndOwner;
  3518.    HGLOBAL            hDevMode;
  3519.    HGLOBAL            hDevNames;
  3520.    HDC                hDC;
  3521.    DWORD              Flags;
  3522.    WORD               nFromPage;
  3523.    WORD               nToPage;
  3524.    WORD               nMinPage;
  3525.    WORD               nMaxPage;
  3526.    WORD               nCopies;
  3527.    HINSTANCE          hInstance;
  3528.    LPARAM             lCustData;
  3529.    LPPRINTHOOKPROC    lpfnPrintHook;
  3530.    LPSETUPHOOKPROC    lpfnSetupHook;
  3531.    LPCTSTR            lpPrintTemplateName;
  3532.    LPCTSTR            lpSetupTemplateName;
  3533.    HGLOBAL            hPrintTemplate;
  3534.    HGLOBAL            hSetupTemplate;
  3535. }  PRINTDLG, *PPRINTDLG, *LPPRINTDLG;
  3536. #pragma pack(4)
  3537.  
  3538. /* PrintDlg options
  3539.  */
  3540. #define PD_ALLPAGES                  0x00000000
  3541. #define PD_SELECTION                 0x00000001
  3542. #define PD_PAGENUMS                  0x00000002
  3543. #define PD_NOSELECTION               0x00000004
  3544. #define PD_NOPAGENUMS                0x00000008
  3545. #define PD_COLLATE                   0x00000010
  3546. #define PD_PRINTTOFILE               0x00000020
  3547. #define PD_PRINTSETUP                0x00000040
  3548. #define PD_NOWARNING                 0x00000080
  3549. #define PD_RETURNDC                  0x00000100
  3550. #define PD_RETURNIC                  0x00000200
  3551. #define PD_RETURNDEFAULT             0x00000400
  3552. #define PD_SHOWHELP                  0x00000800
  3553. #define PD_ENABLEPRINTHOOK           0x00001000
  3554. #define PD_ENABLESETUPHOOK           0x00002000
  3555. #define PD_ENABLEPRINTTEMPLATE       0x00004000
  3556. #define PD_ENABLESETUPTEMPLATE       0x00008000
  3557. #define PD_ENABLEPRINTTEMPLATEHANDLE 0x00010000
  3558. #define PD_ENABLESETUPTEMPLATEHANDLE 0x00020000
  3559. #define PD_USEDEVMODECOPIES          0x00040000
  3560. #define PD_DISABLEPRINTTOFILE        0x00080000
  3561. #define PD_HIDEPRINTTOFILE           0x00100000
  3562. #define PD_NONETWORKBUTTON           0x00200000
  3563. #define PD_PAGESETUP                 0x00400000
  3564.  
  3565. /* Logical Brush (or Pattern)
  3566.  */
  3567. typedef struct _tagLOGBRUSH
  3568. {
  3569.     UINT      lbStyle;
  3570.     COLORREF  lbColor;
  3571.     LONG      lbHatch;
  3572. } LOGBRUSH, *PLOGBRUSH, *LPLOGBRUSH;
  3573.  
  3574. /* Logical Font
  3575.  */
  3576. #define LF_FACESIZE         32
  3577. #define LF_FULLFACESIZE     64
  3578.  
  3579. typedef struct _tagLOGFONT
  3580. {
  3581.     LONG    lfHeight;
  3582.     LONG    lfWidth;
  3583.     LONG    lfEscapement;
  3584.     LONG    lfOrientation;
  3585.     LONG    lfWeight;
  3586.     BYTE    lfItalic;
  3587.     BYTE    lfUnderline;
  3588.     BYTE    lfStrikeOut;
  3589.     BYTE    lfCharSet;
  3590.     BYTE    lfOutPrecision;
  3591.     BYTE    lfClipPrecision;
  3592.     BYTE    lfQuality;
  3593.     BYTE    lfPitchAndFamily;
  3594.     TCHAR   lfFaceName[LF_FACESIZE];
  3595. };
  3596.  
  3597. typedef struct _tagENUMLOGFONT
  3598. {
  3599.     LOGFONT   elfLogFont;
  3600.     BYTE      elfFullName[LF_FULLFACESIZE];
  3601.     BYTE      elfStyle[LF_FACESIZE];
  3602. };
  3603.  
  3604. /* Logical Pen
  3605.  */
  3606. typedef struct _tagLOGPEN {
  3607.    UINT      lopnStyle;
  3608.    POINT     lopnWidth;
  3609.    COLORREF  lopnColor;
  3610. } LOGPEN, *PLOGPEN, *LPLOGPEN;
  3611.  
  3612. typedef struct _tagEXTLOGPEN {
  3613.     UINT      elpPenStyle;
  3614.     UINT      elpWidth;
  3615.     UINT      elpBrushStyle;
  3616.     COLORREF  elpColor;
  3617.     LONG      elpHatch;
  3618.     DWORD     elpNumEntries;
  3619.     DWORD     elpStyleEntry[1];
  3620. } EXTLOGPEN, *PEXTLOGPEN, *LPEXTLOGPEN;
  3621.  
  3622.  
  3623. /* constants for CreateDIBitmap */
  3624. #define CBM_CREATEDIB   0x02L   /* create DIB bitmap */
  3625. #define CBM_INIT        0x04L   /* initialize bitmap */
  3626.  
  3627. /* ExtTexOut options   */
  3628. #define ETO_GRAYED                   1
  3629. #define ETO_OPAQUE                   2
  3630. #define ETO_CLIPPED                  4
  3631.  
  3632. /* Background Modes */
  3633. #define TRANSPARENT         1
  3634. #define OPAQUE              2
  3635. #define BKMODE_LAST         2
  3636.  
  3637.  
  3638. /* Bitmap Header Definition */
  3639. typedef struct _tagBITMAP
  3640. {
  3641.     LONG      bmType;
  3642.     LONG      bmWidth;
  3643.     LONG      bmHeight;
  3644.     LONG      bmWidthBytes;
  3645.     WORD      bmPlanes;
  3646.     WORD      bmBitsPixel;
  3647.     LPVOID    bmBits;
  3648. } BITMAP, *PBITMAP, *LPBITMAP;
  3649.  
  3650.  
  3651. typedef struct _tagTEXTMETRIC
  3652. {
  3653.     LONG      tmHeight;
  3654.     LONG      tmAscent;
  3655.     LONG      tmDescent;
  3656.     LONG      tmInternalLeading;
  3657.     LONG      tmExternalLeading;
  3658.     LONG      tmAveCharWidth;
  3659.     LONG      tmMaxCharWidth;
  3660.     LONG      tmWeight;
  3661.     LONG      tmOverhang;
  3662.     LONG      tmDigitizedAspectX;
  3663.     LONG      tmDigitizedAspectY;
  3664.     BYTE      tmFirstChar;
  3665.     BYTE      tmLastChar;
  3666.     BYTE      tmDefaultChar;
  3667.     BYTE      tmBreakChar;
  3668.     BYTE      tmItalic;
  3669.     BYTE      tmUnderlined;
  3670.     BYTE      tmStruckOut;
  3671.     BYTE      tmPitchAndFamily;
  3672.     BYTE      tmCharSet;
  3673. };
  3674.  
  3675. /* tmPitchAndFamily values returned by GetTextMetrics in bits 0 -3.  Note
  3676.    the name FIXED_PITCH has the exact opposite meaning.  If set, the font
  3677.    is variable pitch.
  3678.  */
  3679. #define TMPF_FIXED_PITCH        0x01
  3680. #define TMPF_VECTOR             0x02
  3681. #define TMPF_TRUETYPE           0x04
  3682. #define TMPF_DEVICE             0x08
  3683.  
  3684. typedef struct _tagNEWTEXTMETRIC
  3685. {
  3686.     LONG      tmHeight;
  3687.     LONG      tmAscent;
  3688.     LONG      tmDescent;
  3689.     LONG      tmInternalLeading;
  3690.     LONG      tmExternalLeading;
  3691.     LONG      tmAveCharWidth;
  3692.     LONG      tmMaxCharWidth;
  3693.     LONG      tmWeight;
  3694.     LONG      tmOverhang;
  3695.     LONG      tmDigitizedAspectX;
  3696.     LONG      tmDigitizedAspectY;
  3697.     BYTE      tmFirstChar;
  3698.     BYTE      tmLastChar;
  3699.     BYTE      tmDefaultChar;
  3700.     BYTE      tmBreakChar;
  3701.     BYTE      tmItalic;
  3702.     BYTE      tmUnderlined;
  3703.     BYTE      tmStruckOut;
  3704.     BYTE      tmPitchAndFamily;
  3705.     BYTE      tmCharSet;
  3706. /* up to this point, this structure is identical to the TEXTMETRIC structure.  The following */
  3707. /* fields differentiate a NEWTEXTMETRIC from a TEXTMETRIC structure. */
  3708.     DWORD     ntmFlags;
  3709.     UINT      ntmSizeEM;
  3710.     UINT      ntmCellHeight;
  3711.     UINT      ntmAvgWidth;
  3712. };
  3713.  
  3714.  
  3715. typedef struct _GLYPHMETRICS {
  3716.     UINT      gmBlackBoxX;
  3717.     UINT      gmBlackBoxY;
  3718.     POINT   gmptGlyphOrigin;
  3719.     short       gmCellIncX;
  3720.     short       gmCellIncY;
  3721. } GLYPHMETRICS, *PGLYPHMETRICS, *LPGLYPHMETRICS;
  3722.  
  3723. /* GetGlyphOutline constants
  3724.  */
  3725. #define GGO_METRICS        0
  3726. #define GGO_BITMAP         1
  3727. #define GGO_NATIVE         2
  3728.  
  3729.  
  3730. typedef struct _FIXED {
  3731.     WORD  fract;
  3732.     short   value;
  3733. } FIXED;
  3734.  
  3735. typedef struct _MAT2 {
  3736.      FIXED  eM11;
  3737.      FIXED  eM12;
  3738.      FIXED  eM21;
  3739.      FIXED  eM22;
  3740. } MAT2, *PMAT2, *LPMAT2;
  3741.  
  3742. /* Clipboard Metafile Picture Structure
  3743.  */
  3744. typedef struct _tagHANDLETABLE
  3745. {
  3746.     HGDIOBJ     objectHandle[1];
  3747. } HANDLETABLE, *PHANDLETABLE, *LPHANDLETABLE;
  3748.  
  3749. typedef struct _tagMETARECORD
  3750. {
  3751.     DWORD     rdSize;
  3752.     WORD      rdFunction;
  3753.     WORD      rdParm[1];
  3754. } METARECORD, *PMETARECORD, *LPMETARECORD;
  3755.  
  3756. typedef int     (* EXPENTRY MFENUMPROC)(HDC, PHANDLETABLE, PMETARECORD, int, LPARAM);
  3757.  
  3758.  
  3759. /* Dialog Template & Item Structures
  3760.  */
  3761. #pragma pack(2)
  3762. typedef struct _tagDLGTEMPLATE {
  3763.     DWORD style;
  3764.     DWORD dwExtendedStyle;
  3765.     WORD  cdit;
  3766.     WORD  x;
  3767.     WORD  y;
  3768.     WORD  cx;
  3769.     WORD  cy;
  3770. } DLGTEMPLATE, *PDLGTEMPLATE, *LPDLGTEMPLATE;
  3771.  
  3772. typedef struct _tagDLGITEMTEMPLATE {
  3773.     DWORD style;
  3774.     DWORD dwExtendedStyle;
  3775.     WORD  x;
  3776.     WORD  y;
  3777.     WORD  cx;
  3778.     WORD  cy;
  3779.     WORD  id;
  3780. } DLGITEMTEMPLATE, *PDLGITEMTEMPLATE, *LPDLGITEMTEMPLATE;
  3781. #pragma pack(4)
  3782.  
  3783.  
  3784. /* Window Placement Structure
  3785.  */
  3786. typedef struct _tagWINDOWPLACEMENT {
  3787.     UINT    length;
  3788.     UINT    flags;
  3789.     UINT    showCmd;
  3790.     POINT   ptMinPosition;
  3791.     POINT   ptMaxPosition;
  3792.     RECT    rcNormalPosition;
  3793. } WINDOWPLACEMENT, *PWINDOWPLACEMENT, *LPWINDOWPLACEMENT;
  3794.  
  3795.  
  3796. /* Filetime Structure
  3797.  */
  3798. typedef struct _tagFILETIME {
  3799.     DWORD dwLowDateTime;
  3800.     DWORD dwHighDateTime;
  3801. } FILETIME, *PFILETIME, *LPFILETIME;
  3802.  
  3803. /* Systemtime Structure
  3804.  */
  3805. typedef struct _tagSYSTEMTIME {
  3806.     WORD wYear;
  3807.     WORD wMonth;
  3808.     WORD wDayOfWeek;
  3809.     WORD wDay;
  3810.     WORD wHour;
  3811.     WORD wMinute;
  3812.     WORD wSecond;
  3813.     WORD wMilliseconds;
  3814. } SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
  3815.  
  3816.  
  3817. /* OSVersion Platform defines
  3818.  */
  3819. #define VER_PLATFORM_WIN32_NT 2
  3820.  
  3821. /* OSVersion Information Structure
  3822.  */
  3823. typedef struct _tagOSVERSIONINFO
  3824. {
  3825.   DWORD dwOSVersionInfoSize;
  3826.   DWORD dwMajorVersion;
  3827.   DWORD dwMinorVersion;
  3828.   DWORD dwBuildNumber;
  3829.   DWORD dwPlatformId;
  3830.   TCHAR szCSDVersion[ OFS_MAXPATHNAME ];
  3831. } OSVERSIONINFO, *POSVERSIONINFO, *LPOSVERSIONINFO;
  3832.  
  3833.  
  3834. /* Access Mask
  3835.  */
  3836. typedef DWORD       ACCESS_MASK;
  3837. typedef ACCESS_MASK REGSAM;
  3838.  
  3839.  
  3840. /* Printer Defaults
  3841.  */
  3842. typedef struct _tagPRINTER_DEFAULTS {
  3843.     LPTSTR         pDatatype;
  3844.     PDEVMODE       pDevMode;
  3845.     ACCESS_MASK    DesiredAccess;
  3846. } PRINTER_DEFAULTS, *PPRINTER_DEFAULTS, *LPPRINTER_DEFAULTS;
  3847.  
  3848. /* METAFILEPICT Structure
  3849.  */
  3850. typedef struct _tagMETAFILEPICT {
  3851.     LONG        mm;
  3852.     LONG        xExt;
  3853.     LONG        yExt;
  3854.     HMETAFILE   hMF;
  3855. } METAFILEPICT, *PMETAFILEPICT, *LPMETAFILEPICT;
  3856.  
  3857. #pragma pack(2)
  3858. typedef struct _tagMETAHEADER
  3859. {
  3860.     WORD        mtType;
  3861.     WORD        mtHeaderSize;
  3862.     WORD        mtVersion;
  3863.     DWORD       mtSize;
  3864.     WORD        mtNoObjects;
  3865.     DWORD       mtMaxRecord;
  3866.     WORD        mtNoParameters;
  3867. } METAHEADER, *PMETAHEADER, *LPMETAHEADER;
  3868. #pragma pack(4)
  3869.  
  3870.  
  3871. typedef struct _tagOVERLAPPED {
  3872.     DWORD    Internal;
  3873.     DWORD    InternalHigh;
  3874.     DWORD    Offset;
  3875.     DWORD    OffsetHigh;
  3876.     HANDLE   hEvent;
  3877. } OVERLAPPED, *POVERLAPPED, *LPOVERLAPPED;
  3878.  
  3879.  
  3880. typedef struct _tagMEMORYSTATUS {
  3881.     DWORD dwLength;
  3882.     DWORD dwMemoryLoad;
  3883.     DWORD dwTotalPhys;
  3884.     DWORD dwAvailPhys;
  3885.     DWORD dwTotalPageFile;
  3886.     DWORD dwAvailPageFile;
  3887.     DWORD dwTotalVirtual;
  3888.     DWORD dwAvailVirtual;
  3889. } MEMORYSTATUS, *PMEMORYSTATUS, *LPMEMORYSTATUS;
  3890.  
  3891. typedef struct _tagMEMORY_BASIC_INFORMATION {
  3892.     PVOID BaseAddress;
  3893.     PVOID AllocationBase;
  3894.     DWORD AllocationProtect;
  3895.     DWORD RegionSize;
  3896.     DWORD State;
  3897.     DWORD Protect;
  3898.     DWORD Type;
  3899. } MEMORY_BASIC_INFORMATION, *PMEMORY_BASIC_INFORMATION;
  3900.  
  3901. #define ANSI_CHARSET            0
  3902. #define DEFAULT_CHARSET         1
  3903. #define SYMBOL_CHARSET          2
  3904. #define SHIFTJIS_CHARSET        128
  3905. #define HANGEUL_CHARSET         129
  3906. #define GB2312_CHARSET          134
  3907. #define CHINESEBIG5_CHARSET     136
  3908. #define OEM_CHARSET             255
  3909. #define JOHAB_CHARSET           130
  3910. #define HEBREW_CHARSET          177
  3911. #define ARABIC_CHARSET          178
  3912. #define GREEK_CHARSET           161
  3913. #define TURKISH_CHARSET         162
  3914. #define THAI_CHARSET            222
  3915. #define EASTEUROPE_CHARSET      238
  3916. #define RUSSIAN_CHARSET         204
  3917.  
  3918. /* EnumFonts Masks
  3919.  */
  3920. #define RASTER_FONTTYPE     0x0001
  3921. #define DEVICE_FONTTYPE     0x002
  3922. #define TRUETYPE_FONTTYPE   0x004
  3923.  
  3924. #define OUT_TT_PRECIS        4
  3925. #define OUT_DEVICE_PRECIS    5
  3926. #define OUT_RASTER_PRECIS    6
  3927. #define OUT_TT_ONLY_PRECIS   7
  3928. #define OUT_OUTLINE_PRECIS   8
  3929.  
  3930. #define CLIP_MASK            0xf
  3931. #define CLIP_LH_ANGLES       0x0010
  3932. #define CLIP_TT_ALWAYS       0x0020
  3933. #define CLIP_EMBEDDED        0x0080
  3934.  
  3935.  
  3936. /* MEASUREITEMSTRUCT for ownerdraw
  3937.  */
  3938. typedef struct _tagMEASUREITEMSTRUCT {
  3939.     UINT     CtlType;
  3940.     UINT     CtlID;
  3941.     UINT     itemID;
  3942.     UINT     itemWidth;
  3943.     UINT     itemHeight;
  3944.     DWORD    itemData;
  3945. } MEASUREITEMSTRUCT, *PMEASUREITEMSTRUCT, *LPMEASUREITEMSTRUCT;
  3946.  
  3947. /* DRAWITEMSTRUCT for ownerdraw
  3948.  */
  3949. typedef struct _tagDRAWITEMSTRUCT {
  3950.     UINT      CtlType;
  3951.     UINT      CtlID;
  3952.     UINT      itemID;
  3953.     UINT      itemAction;
  3954.     UINT      itemState;
  3955.     HWND      hwndItem;
  3956.     HDC       hDC;
  3957.     RECT      rcItem;
  3958.     DWORD     itemData;
  3959. } DRAWITEMSTRUCT, *PDRAWITEMSTRUCT, *LPDRAWITEMSTRUCT;
  3960.  
  3961. /* DELETEITEMSTRUCT for ownerdraw
  3962.  */
  3963. typedef struct _tagDELETEITEMSTRUCT {
  3964.     UINT     CtlType;
  3965.     UINT     CtlID;
  3966.     UINT     itemID;
  3967.     HWND     hwndItem;
  3968.     UINT     itemData;
  3969. } DELETEITEMSTRUCT, *PDELETEITEMSTRUCT, *LPDELETEITEMSTRUCT;
  3970.  
  3971. /* COMPAREITEMSTUCT for ownerdraw sorting
  3972.  */
  3973. typedef struct _tagCOMPAREITEMSTRUCT {
  3974.     UINT      CtlType;
  3975.     UINT      CtlID;
  3976.     HWND      hwndItem;
  3977.     UINT      itemID1;
  3978.     DWORD     itemData1;
  3979.     UINT      itemID2;
  3980.     DWORD     itemData2;
  3981. } COMPAREITEMSTRUCT, *PCOMPAREITEMSTRUCT, *LPCOMPAREITEMSTRUCT;
  3982.  
  3983. /*
  3984.  *  CodePage Info.
  3985.  */
  3986. #define MAX_LEADBYTES        12
  3987. #define MAX_DEFAULTCHAR      2
  3988.  
  3989. typedef struct _tagCPINFO {
  3990.     UINT    MaxCharSize;
  3991.     BYTE    DefaultChar[MAX_DEFAULTCHAR];
  3992.     BYTE    LeadByte[MAX_LEADBYTES];
  3993. } CPINFO, *LPCPINFO;
  3994.  
  3995.  
  3996. /*
  3997.  *  Locale Structures
  3998.  */
  3999. typedef struct _tagCURRENCYFMT {
  4000.     UINT    NumDigits;
  4001.     UINT    LeadingZero;
  4002.     UINT    Grouping;
  4003.     LPSTR   lpDecimalSep;
  4004.     LPSTR   lpThousandSep;
  4005.     UINT    NegativeOrder;
  4006.     UINT    PositiveOrder;
  4007.     LPSTR   lpCurrencySymbol;
  4008. } CURRENCYFMT, *LPCURRENCYFMT;
  4009.  
  4010. typedef struct _tagNUMBERFMT {
  4011.     UINT    NumDigits;
  4012.     UINT    LeadingZero;
  4013.     UINT    Grouping;
  4014.     LPSTR   lpDecimalSep;
  4015.     LPSTR   lpThousandSep;
  4016.     UINT    NegativeOrder;
  4017. } NUMBERFMT, *LPNUMBERFMT;
  4018.  
  4019. /* Registry Definitions
  4020.  */
  4021. #define REGH_SYSINFO              0xFFFFFFFDL
  4022. #define REGH_WINOS2INI            0xFFFFFFFEL
  4023. #define REGH_INIMAPPING           0xFFFFFFFFL
  4024.  
  4025. #define HKEY_LOCAL_MACHINE      0xFFFFFFEFL
  4026. #define HKEY_CURRENT_USER       0xFFFFFFEEL
  4027. #define HKEY_USERS              0xFFFFFFEDL
  4028. #define HKEY_CLASSES_ROOT       0xFFFFFFECL
  4029.  
  4030. #define KEY_QUERY_VALUE         0x0001
  4031. #define KEY_SET_VALUE           0x0002
  4032. #define KEY_CREATE_SUB_KEY      0x0004
  4033. #define KEY_ENUMERATE_SUB_KEYS  0x0008
  4034. #define KEY_NOTIFY              0x0010
  4035. #define KEY_CREATE_LINK         0x0020
  4036. #define REG_OPTION_NON_VOLATILE 0x00000000L
  4037. #define REG_OPTION_VOLATILE     0x00000001L
  4038. #define REG_CREATED_NEW_KEY     0x00000001L
  4039. #define REG_OPENED_EXISTING_KEY 0x00000002L
  4040.  
  4041. #define KEY_READ         READ_CONTROL | KEY_QUERY_VALUE |\
  4042.                            KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY
  4043.  
  4044. #define KEY_WRITE        READ_CONTROL | KEY_SET_VALUE | KEY_CREATE_SUB_KEY
  4045.  
  4046. #define KEY_EXECUTE      KEY_READ
  4047.  
  4048. #define KEY_ALL_ACCESS   STANDARD_RIGHTS_ALL | KEY_QUERY_VALUE |\
  4049.                            KEY_SET_VALUE | KEY_CREATE_SUB_KEY |\
  4050.                            KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY |\
  4051.                            KEY_CREATE_LINK
  4052.  
  4053. #define REG_NONE                  0
  4054. #define REG_SZ                    1
  4055. #define REG_EXPAND_SZ             2
  4056. #define REG_BINARY                3
  4057. #define REG_DWORD                 4
  4058. #define REG_DWORD_LITTLE_ENDIAN   4
  4059. #define REG_DWORD_BIG_ENDIAN      5
  4060. #define REG_LINK                  6
  4061. #define REG_MULTI_SZ              7
  4062. #define REG_RESOURCE_LIST         8
  4063.  
  4064.  
  4065. #define EWX_LOGOFF                0
  4066. #define EWX_SHUTDOWN              1
  4067. #define EWX_REBOOT                2
  4068. #define EWX_FORCE                 4
  4069. #define EWX_POWEROFF              8
  4070.  
  4071.  
  4072. #pragma pack(1)
  4073. typedef struct _tagCHOOSECOLOR {
  4074.    DWORD           lStructSize;
  4075.    HWND            hwndOwner;
  4076.    HWND            hInstance;
  4077.    COLORREF        rgbResult;
  4078.    COLORREF       *lpCustColors;
  4079.    DWORD           Flags;
  4080.    LPARAM          lCustData;
  4081.    LPCCHOOKPROC    lpfnHook;
  4082.    LPCTSTR         lpTemplateName;
  4083. } CHOOSECOLOR, *PCHOOSECOLOR;
  4084.  
  4085. typedef struct _tagCHOOSEFONT {
  4086.    DWORD         lStructSize;
  4087.    HWND          hwndOwner;
  4088.    HDC           hDC;
  4089.    LPLOGFONT     lpLogFont;
  4090.    INT           iPointSize;
  4091.    DWORD         Flags;
  4092.    DWORD         rgbColors;
  4093.    DWORD         lCustData;
  4094.    LPCFHOOKPROC  lpfnHook;
  4095.    LPCTSTR       lpTemplateName;
  4096.    HINSTANCE     hInstance;
  4097.    LPTSTR        lpszStyle;
  4098.    WORD          nFontType;
  4099.    WORD          __MISSING_ALIGNMENT__;
  4100.    INT           nSizeMin;
  4101.    INT           nSizeMax;
  4102. } CHOOSEFONT, *LPCHOOSEFONT;
  4103.  
  4104. typedef struct _tagFINDREPLACE {
  4105.    DWORD          lStructSize;
  4106.    HWND           hwndOwner;
  4107.    HINSTANCE      hInstance;
  4108.    DWORD          Flags;
  4109.    LPTSTR         lpstrFindWhat;
  4110.    LPTSTR         lpstrReplaceWith;
  4111.    WORD           wFindWhatLen;
  4112.    WORD           wReplaceWithLen;
  4113.    LPARAM         lCustData;
  4114.    PFRHOOKPROC    lpfnHook;
  4115.    LPCTSTR        lpTemplateName;
  4116. } FINDREPLACE, *PFINDREPLACE, *LPFINDREPLACE;
  4117. #pragma pack(4)
  4118.  
  4119. typedef struct _ABC {
  4120.     int     abcA;
  4121.     UINT  abcB;
  4122.     int     abcC;
  4123. } ABC, *PABC;
  4124.  
  4125. typedef struct _tagENHMETAHEADER
  4126. {
  4127.     DWORD    iType;
  4128.     DWORD    nSize;
  4129.     RECTL    rclBounds;
  4130.     RECTL    rclFrame;
  4131.     DWORD    dSignature;
  4132.     DWORD    nVersion;
  4133.     DWORD    nBytes;
  4134.     DWORD    nRecords;
  4135.     WORD     nHandles;
  4136.     WORD     sReserved;
  4137.     DWORD    nDescription;
  4138.     DWORD    offDescription;
  4139.     DWORD    nPalEntries;
  4140.     SIZEL    szlDevice;
  4141.     SIZEL    szlMillimeters;
  4142. } ENHMETAHEADER, *PENHMETAHEADER, *LPENHMETAHEADER;
  4143.  
  4144.  
  4145. typedef struct _tagKERNINGPAIR {
  4146.     WORD   wFirst;
  4147.     WORD   wSecond;
  4148.     int      iKernAmount;
  4149. } KERNINGPAIR, *PKERNINGPAIR, *LPKERNINGPAIR;
  4150.  
  4151. typedef struct _tagPANOSE {
  4152.     BYTE   bFamilyType;
  4153.     BYTE   bSerifStyle;
  4154.     BYTE   bWeight;
  4155.     BYTE   bProportion;
  4156.     BYTE   bContrast;
  4157.     BYTE   bStrokeVariation;
  4158.     BYTE   bArmStyle;
  4159.     BYTE   bLetterform;
  4160.     BYTE   bMidline;
  4161.     BYTE   bXHeight;
  4162. } PANOSE, *PPANOSE, *LPPANOSE;
  4163.  
  4164. typedef struct _tagOUTLINETEXTMETRIC {
  4165.     UINT         otmSize;
  4166.     TEXTMETRIC   otmTextMetrics;
  4167.     BYTE         otmFiller;
  4168.     PANOSE       otmPanoseNumber;
  4169.     UINT         otmfsSelection;
  4170.     UINT         otmfsType;
  4171.     int            otmsCharSlopeRise;
  4172.     int            otmsCharSlopeRun;
  4173.     int            otmItalicAngle;
  4174.     UINT         otmEMSquare;
  4175.     int            otmAscent;
  4176.     int            otmDescent;
  4177.     UINT         otmLineGap;
  4178.     UINT         otmsCapEmHeight;
  4179.     UINT         otmsXHeight;
  4180.     RECT         otmrcFontBox;
  4181.     int            otmMacAscent;
  4182.     int            otmMacDescent;
  4183.     UINT         otmMacLineGap;
  4184.     UINT         otmusMinimumPPEM;
  4185.     POINT        otmptSubscriptSize;
  4186.     POINT        otmptSubscriptOffset;
  4187.     POINT        otmptSuperscriptSize;
  4188.     POINT        otmptSuperscriptOffset;
  4189.     UINT         otmsStrikeoutSize;
  4190.     int            otmsStrikeoutPosition;
  4191.     int            otmsUnderscoreSize;
  4192.     int            otmsUnderscorePosition;
  4193.     PSTR         otmpFamilyName;
  4194.     PSTR         otmpFaceName;
  4195.     PSTR         otmpStyleName;
  4196.     PSTR         otmpFullName;
  4197. } OUTLINETEXTMETRIC, *POUTLINETEXTMETRIC;
  4198.  
  4199. typedef struct _RASTERIZER_STATUS {
  4200.     short   nSize;
  4201.     short   wFlags;
  4202.     short   nLanguageID;
  4203. } RASTERIZER_STATUS, *PRASTERIZER_STATUS;
  4204.  
  4205. /* bits defined in wFlags of RASTERIZER_STATUS */
  4206. #define TT_AVAILABLE    0x0001
  4207. #define TT_ENABLED      0x0002
  4208.  
  4209. #define TT_POLYGON_TYPE   24
  4210. #define TT_PRIM_LINE       1
  4211. #define TT_PRIM_QSPLINE    2
  4212.  
  4213. typedef struct _tagPOINTFX
  4214. {
  4215.     FIXED x;
  4216.     FIXED y;
  4217. } POINTFX, *PPOINTFX, *LPPOINTFX;
  4218.  
  4219. typedef struct _tagTTPOLYCURVE
  4220. {
  4221.     WORD     wType;
  4222.     WORD     cpfx;
  4223.     POINTFX  apfx[1];
  4224. } TTPOLYCURVE, *PTTPOLYCURVE, *LPTTPOLYCURVE;
  4225.  
  4226. typedef struct _tagTTPOLYGONHEADER
  4227. {
  4228.     DWORD    cb;
  4229.     DWORD    dwType;
  4230.     POINTFX  pfxStart;
  4231. } TTPOLYGONHEADER, *PTTPOLYGONHEADER, *LPTTPOLYGONHEADER;
  4232.  
  4233.  
  4234. #define WPF_SETMINPOSITION      0x0001
  4235. #define WPF_RESTORETOMAXIMIZED  0x0002
  4236.  
  4237.  
  4238. typedef struct _tagWIN32_FIND_DATA {
  4239.     DWORD    dwFileAttributes;
  4240.     FILETIME ftCreationTime;
  4241.     FILETIME ftLastAccessTime;
  4242.     FILETIME ftLastWriteTime;
  4243.     DWORD    nFileSizeHigh;
  4244.     DWORD    nFileSizeLow;
  4245.     DWORD    dwReserved0;
  4246.     DWORD    dwReserved1;
  4247.     TCHAR    cFileName[ MAX_PATH ];
  4248.     TCHAR    cAlternateFileName[ 14 ];
  4249. } WIN32_FIND_DATA, *PWIN32_FIND_DATA, *LPWIN32_FIND_DATA;
  4250.  
  4251.  
  4252. /* Menu item resource format
  4253.  */
  4254. typedef struct _tagMENUITEMTEMPLATEHEADER {
  4255.     WORD versionNumber;
  4256.     WORD offset;
  4257. } MENUITEMTEMPLATEHEADER, *PMENUITEMTEMPLATEHEADER;
  4258.  
  4259. typedef struct _tagMENUITEMTEMPLATE {
  4260.     WORD  mtOption;
  4261.     WORD  mtID;
  4262.     WCHAR mtString[1];
  4263. } MENUITEMTEMPLATE, *PMENUITEMTEMPLATE;
  4264.  
  4265. #define STARTF_USESHOWWINDOW    0x00000001
  4266. #define STARTF_USEPOSITION      0x00000002
  4267. #define STARTF_USESIZE          0x00000004
  4268.  
  4269. typedef struct _STARTUPINFO {
  4270.     DWORD  cb;
  4271.     LPTSTR lpReserved;
  4272.     LPTSTR lpDesktop;
  4273.     LPTSTR lpTitle;
  4274.     DWORD  dwX;
  4275.     DWORD  dwY;
  4276.     DWORD  dwXSize;
  4277.     DWORD  dwYSize;
  4278.     DWORD  dwXCountChars;
  4279.     DWORD  dwYCountChars;
  4280.     DWORD  dwFillAttribute;
  4281.     DWORD  dwFlags;
  4282.     WORD   wShowWindow;
  4283.     WORD   cbReserved2;
  4284.     LPBYTE lpReserved2;
  4285.     HANDLE hStdInput;
  4286.     HANDLE hStdOutput;
  4287.     HANDLE hStdError;
  4288. } STARTUPINFO, *PSTARTUPINFO;
  4289. typedef struct _STARTUPINFO *LPSTARTUPINFO;
  4290.  
  4291. typedef struct _PROCESS_INFORMATION {
  4292.     HANDLE hProcess;
  4293.     HANDLE hThread;
  4294.     DWORD  dwProcessId;
  4295.     DWORD  dwThreadId;
  4296. } PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION;
  4297.  
  4298.  
  4299. typedef struct _tagCONVCONTEXT {
  4300.    UINT  cb;
  4301.    UINT  wFlags;
  4302.    UINT  wCountryID;
  4303.    int     iCodePage;
  4304.    DWORD dwLangID;
  4305.    DWORD dwSecurity;
  4306.    DWORD dwUnused[4];
  4307. } CONVCONTEXT, *PCONVCONTEXT, *LPCONVCONTEXT;
  4308.  
  4309. typedef struct _tagCONVINFO {
  4310.     DWORD       cb;
  4311.     DWORD       hUser;
  4312.     HCONV       hConvPartner;
  4313.     HSZ         hszSvcPartner;
  4314.     HSZ         hszServiceReq;
  4315.     HSZ         hszTopic;
  4316.     HSZ         hszItem;
  4317.     UINT        wFmt;
  4318.     UINT        wType;
  4319.     UINT        wStatus;
  4320.     UINT        wConvst;
  4321.     UINT        wLastError;
  4322.     HCONVLIST   hConvList;
  4323.     CONVCONTEXT ConvCtxt;
  4324.     HWND        hwnd;
  4325.     HWND        hwndPartner;
  4326. } CONVINFO, *PCONVINFO;
  4327.  
  4328.  
  4329. typedef struct _tagCRITICAL_SECTION {
  4330.     ULONG     ulReserved[8];
  4331. } CRITICAL_SECTION, *PCRITICAL_SECTION, *LPCRITICAL_SECTION;
  4332.  
  4333.  
  4334. typedef struct _BY_HANDLE_FILE_INFORMATION {
  4335.     DWORD    dwFileAttributes;
  4336.     FILETIME ftCreationTime;
  4337.     FILETIME ftLastAccessTime;
  4338.     FILETIME ftLastWriteTime;
  4339.     DWORD    dwVolumeSerialNumber;
  4340.     DWORD    nFileSizeHigh;
  4341.     DWORD    nFileSizeLow;
  4342.     DWORD    nNumberOfLinks;
  4343.     DWORD    nFileIndexHigh;
  4344.     DWORD    nFileIndexLow;
  4345. } BY_HANDLE_FILE_INFORMATION, *PBY_HANDLE_FILE_INFORMATION;
  4346.  
  4347.  
  4348. typedef struct _tagACCEL {
  4349.     BYTE  fVirt;
  4350.     WORD  key;
  4351.     WORD  cmd;
  4352. } ACCEL, *PACCEL;
  4353.  
  4354.  
  4355. typedef struct _tagEMR
  4356. {
  4357.     DWORD   iType;
  4358.     DWORD   nSize;
  4359. } EMR, *PEMR;
  4360.  
  4361. typedef struct _tagEMRTEXT
  4362. {
  4363.     POINTL    ptlReference;
  4364.     DWORD     nChars;
  4365.     DWORD     offString;
  4366.     DWORD     fOptions;
  4367.     RECTL     rcl;
  4368.     DWORD     offDx;
  4369. } EMRTEXT, *PEMRTEXT;
  4370.  
  4371. typedef struct _tagABORTPATH
  4372. {
  4373.     EMR     emr;
  4374. } EMRABORTPATH      , *PEMRABORTPATH     ,
  4375.   EMRBEGINPATH      , *PEMRBEGINPATH     ,
  4376.   EMRENDPATH        , *PEMRENDPATH       ,
  4377.   EMRCLOSEFIGURE    , *PEMRCLOSEFIGURE   ,
  4378.   EMRFLATTENPATH    , *PEMRFLATTENPATH   ,
  4379.   EMRWIDENPATH      , *PEMRWIDENPATH     ,
  4380.   EMRSETMETARGN     , *PEMRSETMETARGN    ,
  4381.   EMRSAVEDC         , *PEMRSAVEDC        ,
  4382.   EMRREALIZEPALETTE , *PEMRREALIZEPALETTE;
  4383.  
  4384. typedef struct _tagEMRSELECTCLIPPATH
  4385. {
  4386.     EMR     emr;
  4387.     DWORD   iMode;
  4388. } EMRSELECTCLIPPATH    ,  *PEMRSELECTCLIPPATH    ,
  4389.   EMRSETBKMODE         ,  *PEMRSETBKMODE         ,
  4390.   EMRSETMAPMODE        ,  *PEMRSETMAPMODE        ,
  4391.   EMRSETPOLYFILLMODE   ,  *PEMRSETPOLYFILLMODE   ,
  4392.   EMRSETROP2           ,  *PEMRSETROP2           ,
  4393.   EMRSETSTRETCHBLTMODE ,  *PEMRSETSTRETCHBLTMODE ,
  4394.   EMRSETICMMODE        ,  *PEMRSETICMMODE        ,
  4395.   EMRSETTEXTALIGN      ,  *PEMRSETTEXTALIGN      ;
  4396.  
  4397. typedef struct _tagEMRSETMITERLIMIT
  4398. {
  4399.     EMR   emr;
  4400.     float   eMiterLimit;
  4401. } EMRSETMITERLIMIT, *PEMRSETMITERLIMIT;
  4402.  
  4403. typedef struct _tagEMRRESTOREDC
  4404. {
  4405.     EMR     emr;
  4406.     LONG    iRelative;
  4407. } EMRRESTOREDC, *PEMRRESTOREDC;
  4408.  
  4409. typedef struct _tagEMRSETARCDIRECTION
  4410. {
  4411.     EMR     emr;
  4412.     DWORD   iArcDirection;
  4413.  
  4414. } EMRSETARCDIRECTION, *PEMRSETARCDIRECTION;
  4415.  
  4416. typedef struct _tagEMRSETMAPPERFLAGS
  4417. {
  4418.     EMR       emr;
  4419.     DWORD     dwFlags;
  4420. } EMRSETMAPPERFLAGS, *PEMRSETMAPPERFLAGS;
  4421.  
  4422. typedef struct _tagEMRSETTEXTCOLOR
  4423. {
  4424.     EMR      emr;
  4425.     COLORREF crColor;
  4426. } EMRSETBKCOLOR,   *PEMRSETBKCOLOR,
  4427.   EMRSETTEXTCOLOR, *PEMRSETTEXTCOLOR;
  4428.  
  4429. typedef struct _tagEMRSELECTOBJECT
  4430. {
  4431.     EMR     emr;
  4432.     DWORD   ihObject;
  4433. } EMRSELECTOBJECT, *PEMRSELECTOBJECT,
  4434.   EMRDELETEOBJECT, *PEMRDELETEOBJECT;
  4435.  
  4436. typedef struct _tagEMRSELECTCOLORSPACE
  4437. {
  4438.     EMR     emr;
  4439.     DWORD   ihCS;
  4440. } EMRSELECTCOLORSPACE, *PEMRSELECTCOLORSPACE,
  4441.   EMRDELETECOLORSPACE, *PEMRDELETECOLORSPACE;
  4442.  
  4443. typedef struct _tagEMRSELECTPALETTE
  4444. {
  4445.     EMR     emr;
  4446.     DWORD   ihPal;
  4447. } EMRSELECTPALETTE, *PEMRSELECTPALETTE;
  4448.  
  4449. typedef struct _tagEMRRESIZEPALETTE
  4450. {
  4451.     EMR     emr;
  4452.     DWORD   ihPal;
  4453.     DWORD   cEntries;
  4454. } EMRRESIZEPALETTE, *PEMRRESIZEPALETTE;
  4455.  
  4456. typedef struct _tagEMRSETPALETTEENTRIES
  4457. {
  4458.     EMR          emr;
  4459.     DWORD        ihPal;
  4460.     DWORD        iStart;
  4461.     DWORD        cEntries;
  4462.     PALETTEENTRY aPalEntries[1];
  4463. } EMRSETPALETTEENTRIES, *PEMRSETPALETTEENTRIES;
  4464.  
  4465. typedef struct _tagCOLORADJUSTMENT
  4466. {
  4467.     WORD  caSize;
  4468.     WORD  caFlags;
  4469.     WORD  caIlluminantIndex;
  4470.     WORD  caRedGamma;
  4471.     WORD  caGreenGamma;
  4472.     WORD  caBlueGamma;
  4473.     WORD  caReferenceBlack;
  4474.     WORD  caReferenceWhite;
  4475.     SHORT caContrast;
  4476.     SHORT caBrightness;
  4477.     SHORT caColorfulness;
  4478.     SHORT caRedGreenTint;
  4479. } COLORADJUSTMENT, *PCOLORADJUSTMENT;
  4480.  
  4481. typedef struct _tagEMRSETCOLORADJUSTMENT
  4482. {
  4483.     EMR             emr;
  4484.     COLORADJUSTMENT ColorAdjustment;
  4485. } EMRSETCOLORADJUSTMENT, *PEMRSETCOLORADJUSTMENT;
  4486.  
  4487. typedef struct _tagEMRGDICOMMENT
  4488. {
  4489.     EMR   emr;
  4490.     DWORD cbData;
  4491.     BYTE  Data[1];
  4492. } EMRGDICOMMENT, *PEMRGDICOMMENT;
  4493.  
  4494. typedef struct _tagEMREOF
  4495. {
  4496.     EMR     emr;
  4497.     DWORD   nPalEntries;
  4498.     DWORD   offPalEntries;
  4499.     DWORD   nSizeLast;
  4500. } EMREOF, *PEMREOF;
  4501.  
  4502. typedef struct _tagEMRLINETO
  4503. {
  4504.     EMR    emr;
  4505.     POINT  ptl;
  4506. } EMRLINETO,   *PEMRLINETO, EMRMOVETOEX, *PEMRMOVETOEX;
  4507.  
  4508. typedef struct _tagEMROFFSETCLIPRGN
  4509. {
  4510.     EMR   emr;
  4511.     POINT  ptlOffset;
  4512. } EMROFFSETCLIPRGN, *PEMROFFSETCLIPRGN;
  4513.  
  4514. typedef struct _tagEMRFILLPATH
  4515. {
  4516.     EMR   emr;
  4517.     RECT   rclBounds;
  4518. } EMRFILLPATH         , *PEMRFILLPATH,
  4519.   EMRSTROKEANDFILLPATH, *PEMRSTROKEANDFILLPATH,
  4520.   EMRSTROKEPATH       , *PEMRSTROKEPATH;
  4521.  
  4522. typedef struct _tagEMREXCLUDECLIPRECT
  4523. {
  4524.     EMR   emr;
  4525.     RECT   rclClip;
  4526. } EMREXCLUDECLIPRECT,   *PEMREXCLUDECLIPRECT,
  4527.   EMRINTERSECTCLIPRECT, *PEMRINTERSECTCLIPRECT;
  4528.  
  4529. typedef struct _tagEMRSETVIEWPORTORGEX
  4530. {
  4531.     EMR     emr;
  4532.     POINT    ptlOrigin;
  4533. } EMRSETVIEWPORTORGEX , *PEMRSETVIEWPORTORGEX ,
  4534.   EMRSETWINDOWORGEX   , *PEMRSETWINDOWORGEX   ,
  4535.   EMRSETBRUSHORGEX    , *PEMRSETBRUSHORGEX    ;
  4536.  
  4537. typedef struct _tagEMRSETVIEWPORTEXTEX
  4538. {
  4539.     EMR   emr;
  4540.     SIZEL szlExtent;
  4541. } EMRSETVIEWPORTEXTEX, *PEMRSETVIEWPORTEXTEX,
  4542.   EMRSETWINDOWEXTEX,   *PEMRSETWINDOWEXTEX;
  4543.  
  4544. typedef struct _tagEMRSCALEVIEWPORTEXTEX
  4545. {
  4546.     EMR   emr;
  4547.     LONG  xNum;
  4548.     LONG  xDenom;
  4549.     LONG  yNum;
  4550.     LONG  yDenom;
  4551. } EMRSCALEVIEWPORTEXTEX, *PEMRSCALEVIEWPORTEXTEX,
  4552.   EMRSCALEWINDOWEXTEX,   *PEMRSCALEWINDOWEXTEX;
  4553.  
  4554. typedef struct _tagEMRSETWORLDTRANSFORM
  4555. {
  4556.     EMR     emr;
  4557.     XFORM   xform;
  4558. } EMRSETWORLDTRANSFORM, *PEMRSETWORLDTRANSFORM;
  4559.  
  4560. typedef struct _tagEMRMODIFYWORLDTRANSFORM
  4561. {
  4562.     EMR     emr;
  4563.     XFORM   xform;
  4564.     DWORD     iMode;
  4565. } EMRMODIFYWORLDTRANSFORM, *PEMRMODIFYWORLDTRANSFORM;
  4566.  
  4567. typedef struct _tagEMRSETPIXELV
  4568. {
  4569.     EMR       emr;
  4570.     POINT      ptlPixel;
  4571.     COLORREF  crColor;
  4572. } EMRSETPIXELV, *PEMRSETPIXELV;
  4573.  
  4574. typedef struct _tagEMREXTFLOODFILL
  4575. {
  4576.     EMR     emr;
  4577.     POINT  ptlStart;
  4578.     COLORREF crColor;
  4579.     DWORD   iMode;
  4580. } EMREXTFLOODFILL, *PEMREXTFLOODFILL;
  4581.  
  4582. typedef struct _tagEMRELLIPSE
  4583. {
  4584.     EMR     emr;
  4585.     RECT   rclBox;
  4586. } EMRELLIPSE,  *PEMRELLIPSE,
  4587.   EMRRECTANGLE, *PEMRRECTANGLE;
  4588.  
  4589. typedef struct _tagEMRROUNDRECT
  4590. {
  4591.     EMR   emr;
  4592.     RECT  rclBox;
  4593.     SIZEL szlCorner;
  4594. } EMRROUNDRECT, *PEMRROUNDRECT;
  4595.  
  4596. typedef struct _tagEMRARC
  4597. {
  4598.     EMR     emr;
  4599.     RECT   rclBox;
  4600.     POINT  ptlStart;
  4601.     POINT  ptlEnd;
  4602. } EMRARC,   *PEMRARC,
  4603.   EMRARCTO, *PEMRARCTO,
  4604.   EMRCHORD, *PEMRCHORD,
  4605.   EMRPIE,   *PEMRPIE;
  4606.  
  4607. typedef struct _tagEMRANGLEARC
  4608. {
  4609.     EMR     emr;
  4610.     POINT  ptlCenter;
  4611.     DWORD   nRadius;
  4612.     float   eStartAngle;
  4613.     float   eSweepAngle;
  4614. } EMRANGLEARC, *PEMRANGLEARC;
  4615.  
  4616. typedef struct _tagEMRPOLYLINE
  4617. {
  4618.     EMR     emr;
  4619.     RECT   rclBounds;
  4620.     DWORD   cptl;
  4621.     POINT  aptl[1];
  4622. } EMRPOLYLINE,     *PEMRPOLYLINE,
  4623.   EMRPOLYBEZIER,   *PEMRPOLYBEZIER,
  4624.   EMRPOLYGON,      *PEMRPOLYGON,
  4625.   EMRPOLYBEZIERTO, *PEMRPOLYBEZIERTO,
  4626.   EMRPOLYLINETO,   *PEMRPOLYLINETO;
  4627.  
  4628. typedef struct _tagEMRPOLYLINE16
  4629. {
  4630.     EMR     emr;
  4631.     RECT    rclBounds;
  4632.     DWORD   cpts;
  4633.     POINTS  apts[1];
  4634. } EMRPOLYLINE16,     *PEMRPOLYLINE16,
  4635.   EMRPOLYBEZIER16,   *PEMRPOLYBEZIER16,
  4636.   EMRPOLYGON16,      *PEMRPOLYGON16,
  4637.   EMRPOLYBEZIERTO16, *PEMRPOLYBEZIERTO16,
  4638.   EMRPOLYLINETO16,   *PEMRPOLYLINETO16;
  4639.  
  4640. typedef struct _tagEMRPOLYDRAW
  4641. {
  4642.     EMR     emr;
  4643.     RECT    rclBounds;
  4644.     DWORD   cptl;
  4645.     POINT   aptl[1];
  4646.     BYTE    abTypes[1];
  4647. } EMRPOLYDRAW, *PEMRPOLYDRAW;
  4648.  
  4649. typedef struct _tagEMRPOLYDRAW16
  4650. {
  4651.     EMR     emr;
  4652.     RECT    rclBounds;
  4653.     DWORD   cpts;
  4654.     POINTS  apts[1];
  4655.     BYTE    abTypes[1];
  4656. } EMRPOLYDRAW16, *PEMRPOLYDRAW16;
  4657.  
  4658. typedef struct _tagEMRPOLYPOLYLINE
  4659. {
  4660.     EMR     emr;
  4661.     RECT    rclBounds;
  4662.     DWORD   nPolys;
  4663.     DWORD   cptl;
  4664.     DWORD   aPolyCounts[1];
  4665.     POINTL  aptl[1];
  4666. } EMRPOLYPOLYLINE, *PEMRPOLYPOLYLINE,
  4667.   EMRPOLYPOLYGON,  *PEMRPOLYPOLYGON;
  4668.  
  4669. typedef struct _tagEMRPOLYPOLYLINE16
  4670. {
  4671.     EMR     emr;
  4672.     RECT    rclBounds;
  4673.     DWORD   nPolys;
  4674.     DWORD   cpts;
  4675.     DWORD   aPolyCounts[1];
  4676.     POINTS  apts[1];
  4677. } EMRPOLYPOLYLINE16, *PEMRPOLYPOLYLINE16,
  4678.   EMRPOLYPOLYGON16,  *PEMRPOLYPOLYGON16;
  4679.  
  4680. typedef struct _tagEMRINVERTRGN
  4681. {
  4682.     EMR     emr;
  4683.     RECT    rclBounds;
  4684.     DWORD   cbRgnData;
  4685.     BYTE    RgnData[1];
  4686. } EMRINVERTRGN, *PEMRINVERTRGN,
  4687.   EMRPAINTRGN,  *PEMRPAINTRGN;
  4688.  
  4689. typedef struct _tagEMRFILLRGN
  4690. {
  4691.     EMR     emr;
  4692.     RECT    rclBounds;
  4693.     DWORD   cbRgnData;
  4694.     DWORD   ihBrush;
  4695.     BYTE    RgnData[1];
  4696. } EMRFILLRGN, *PEMRFILLRGN;
  4697.  
  4698. typedef struct _tagEMRFRAMERGN
  4699. {
  4700.     EMR     emr;
  4701.     RECT    rclBounds;
  4702.     DWORD   cbRgnData;
  4703.     DWORD   ihBrush;
  4704.     SIZEL   szlStroke;
  4705.     BYTE    RgnData[1];
  4706. } EMRFRAMERGN, *PEMRFRAMERGN;
  4707.  
  4708. typedef struct _tagEMREXTSELECTCLIPRGN
  4709. {
  4710.     EMR     emr;
  4711.     DWORD   cbRgnData;
  4712.     DWORD   iMode;
  4713.     BYTE    RgnData[1];
  4714. } EMREXTSELECTCLIPRGN, *PEMREXTSELECTCLIPRGN;
  4715.  
  4716. typedef struct _tagEMREXTTEXTOUTA
  4717. {
  4718.     EMR     emr;
  4719.     RECT    rclBounds;
  4720.     DWORD   iGraphicsMode;
  4721.     float     exScale;
  4722.     float     eyScale;
  4723.     EMRTEXT emrtext;
  4724. } EMREXTTEXTOUTA, *PEMREXTTEXTOUTA,
  4725.   EMREXTTEXTOUTW, *PEMREXTTEXTOUTW;
  4726.  
  4727. typedef struct _tagEMRPOLYTEXTOUTA
  4728. {
  4729.     EMR     emr;
  4730.     RECT    rclBounds;
  4731.     DWORD   iGraphicsMode;
  4732.     float     exScale;
  4733.     float     eyScale;
  4734.     LONG    cStrings;
  4735.     EMRTEXT aemrtext[1];
  4736. } EMRPOLYTEXTOUTA, *PEMRPOLYTEXTOUTA,
  4737.   EMRPOLYTEXTOUTW, *PEMRPOLYTEXTOUTW;
  4738.  
  4739. typedef struct _tagEMRBITBLT
  4740. {
  4741.     EMR     emr;
  4742.     RECT    rclBounds;
  4743.     LONG    xDest;
  4744.     LONG    yDest;
  4745.     LONG    cxDest;
  4746.     LONG    cyDest;
  4747.     DWORD   dwRop;
  4748.     LONG    xSrc;
  4749.     LONG    ySrc;
  4750.     XFORM   xformSrc;
  4751.     COLORREF crBkColorSrc;
  4752.     DWORD   iUsageSrc;
  4753.     DWORD   offBmiSrc;
  4754.     DWORD   cbBmiSrc;
  4755.     DWORD   offBitsSrc;
  4756.     DWORD   cbBitsSrc;
  4757. } EMRBITBLT, *PEMRBITBLT;
  4758.  
  4759. typedef struct _tagEMRSTRETCHBLT
  4760. {
  4761.     EMR      emr;
  4762.     RECT     rclBounds;
  4763.     LONG     xDest;
  4764.     LONG     yDest;
  4765.     LONG     cxDest;
  4766.     LONG     cyDest;
  4767.     DWORD    dwRop;
  4768.     LONG     xSrc;
  4769.     LONG     ySrc;
  4770.     XFORM    xformSrc;
  4771.     COLORREF crBkColorSrc;
  4772.     DWORD    iUsageSrc;
  4773.     DWORD    offBmiSrc;
  4774.     DWORD    cbBmiSrc;
  4775.     DWORD    offBitsSrc;
  4776.     DWORD    cbBitsSrc;
  4777.     LONG     cxSrc;
  4778.     LONG     cySrc;
  4779. } EMRSTRETCHBLT, *PEMRSTRETCHBLT;
  4780.  
  4781. typedef struct _tagEMRMASKBLT
  4782. {
  4783.     EMR     emr;
  4784.     RECT    rclBounds;
  4785.     LONG    xDest;
  4786.     LONG    yDest;
  4787.     LONG    cxDest;
  4788.     LONG    cyDest;
  4789.     DWORD   dwRop;
  4790.     LONG    xSrc;
  4791.     LONG    ySrc;
  4792.     XFORM   xformSrc;
  4793.     COLORREF crBkColorSrc;
  4794.     DWORD   iUsageSrc;
  4795.     DWORD   offBmiSrc;
  4796.     DWORD   cbBmiSrc;
  4797.     DWORD   offBitsSrc;
  4798.     DWORD   cbBitsSrc;
  4799.     LONG    xMask;
  4800.     LONG    yMask;
  4801.     DWORD   iUsageMask;
  4802.     DWORD   offBmiMask;
  4803.     DWORD   cbBmiMask;
  4804.     DWORD   offBitsMask;
  4805.     DWORD   cbBitsMask;
  4806. } EMRMASKBLT, *PEMRMASKBLT;
  4807.  
  4808. typedef struct _tagEMRPLGBLT
  4809. {
  4810.     EMR     emr;
  4811.     RECT    rclBounds;
  4812.     POINTL  aptlDest[3];
  4813.     LONG    xSrc;
  4814.     LONG    ySrc;
  4815.     LONG    cxSrc;
  4816.     LONG    cySrc;
  4817.     XFORM   xformSrc;
  4818.     COLORREF crBkColorSrc;
  4819.     DWORD   iUsageSrc;
  4820.     DWORD   offBmiSrc;
  4821.     DWORD   cbBmiSrc;
  4822.     DWORD   offBitsSrc;
  4823.     DWORD   cbBitsSrc;
  4824.     LONG    xMask;
  4825.     LONG    yMask;
  4826.     DWORD   iUsageMask;
  4827.     DWORD   offBmiMask;
  4828.     DWORD   cbBmiMask;
  4829.     DWORD   offBitsMask;
  4830.     DWORD   cbBitsMask;
  4831. } EMRPLGBLT, *PEMRPLGBLT;
  4832.  
  4833. typedef struct _tagEMRSETDIBITSTODEVICE
  4834. {
  4835.     EMR     emr;
  4836.     RECT    rclBounds;
  4837.     LONG    xDest;
  4838.     LONG    yDest;
  4839.     LONG    xSrc;
  4840.     LONG    ySrc;
  4841.     LONG    cxSrc;
  4842.     LONG    cySrc;
  4843.     DWORD   offBmiSrc;
  4844.     DWORD   cbBmiSrc;
  4845.     DWORD   offBitsSrc;
  4846.     DWORD   cbBitsSrc;
  4847.     DWORD   iUsageSrc;
  4848.     DWORD   iStartScan;
  4849.     DWORD   cScans;
  4850. } EMRSETDIBITSTODEVICE, *PEMRSETDIBITSTODEVICE;
  4851.  
  4852. typedef struct _tagEMRSTRETCHDIBITS
  4853. {
  4854.     EMR     emr;
  4855.     RECT    rclBounds;
  4856.     LONG    xDest;
  4857.     LONG    yDest;
  4858.     LONG    xSrc;
  4859.     LONG    ySrc;
  4860.     LONG    cxSrc;
  4861.     LONG    cySrc;
  4862.     DWORD   offBmiSrc;
  4863.     DWORD   cbBmiSrc;
  4864.     DWORD   offBitsSrc;
  4865.     DWORD   cbBitsSrc;
  4866.     DWORD   iUsageSrc;
  4867.     DWORD   dwRop;
  4868.     LONG    cxDest;
  4869.     LONG    cyDest;
  4870. } EMRSTRETCHDIBITS, *PEMRSTRETCHDIBITS;
  4871.  
  4872. typedef struct tagLOGFONTW
  4873. {
  4874.     LONG      lfHeight;
  4875.     LONG      lfWidth;
  4876.     LONG      lfEscapement;
  4877.     LONG      lfOrientation;
  4878.     LONG      lfWeight;
  4879.     BYTE      lfItalic;
  4880.     BYTE      lfUnderline;
  4881.     BYTE      lfStrikeOut;
  4882.     BYTE      lfCharSet;
  4883.     BYTE      lfOutPrecision;
  4884.     BYTE      lfClipPrecision;
  4885.     BYTE      lfQuality;
  4886.     BYTE      lfPitchAndFamily;
  4887.     WCHAR     lfFaceName[LF_FACESIZE];
  4888. } LOGFONTW, *PLOGFONTW;
  4889.  
  4890. #define ELF_VENDOR_SIZE   4
  4891.  
  4892. typedef struct _tagEXTLOGFONTW
  4893. {
  4894.     LOGFONTW  elfLogFont;
  4895.     WCHAR     elfFullName[LF_FULLFACESIZE];
  4896.     WCHAR     elfStyle[LF_FACESIZE];
  4897.     DWORD     elfVersion;
  4898.     DWORD     elfStyleSize;
  4899.     DWORD     elfMatch;
  4900.     DWORD     elfReserved;
  4901.     BYTE      elfVendorId[ELF_VENDOR_SIZE];
  4902.     DWORD     elfCulture;
  4903.     PANOSE    elfPanose;
  4904. } EXTLOGFONTW, *PEXTLOGFONTW;
  4905.  
  4906. typedef struct _tagEMREXTCREATEFONTINDIRECTW
  4907. {
  4908.     EMR         emr;
  4909.     DWORD       ihFont;
  4910.     EXTLOGFONTW elfw;
  4911. } EMREXTCREATEFONTINDIRECTW, *PEMREXTCREATEFONTINDIRECTW;
  4912.  
  4913. typedef struct _tagEMRCREATEPALETTE
  4914. {
  4915.     EMR        emr;
  4916.     DWORD      ihPal;
  4917.     LOGPALETTE lgpl;
  4918. } EMRCREATEPALETTE, *PEMRCREATEPALETTE;
  4919.  
  4920. typedef struct _tagEMRCREATEPEN
  4921. {
  4922.     EMR     emr;
  4923.     DWORD   ihPen;
  4924.     LOGPEN  lopn;
  4925. } EMRCREATEPEN, *PEMRCREATEPEN;
  4926.  
  4927. typedef struct _tagEMREXTCREATEPEN
  4928. {
  4929.     EMR       emr;
  4930.     DWORD     ihPen;
  4931.     DWORD     offBmi;
  4932.     DWORD     cbBmi;
  4933.     DWORD     offBits;
  4934.     DWORD     cbBits;
  4935.     EXTLOGPEN elp;
  4936. } EMREXTCREATEPEN, *PEMREXTCREATEPEN;
  4937.  
  4938. typedef struct _tagEMRCREATEBRUSHINDIRECT
  4939. {
  4940.     EMR      emr;
  4941.     DWORD    ihBrush;
  4942.     LOGBRUSH lb;
  4943. } EMRCREATEBRUSHINDIRECT, *PEMRCREATEBRUSHINDIRECT;
  4944.  
  4945. typedef struct _tagEMRCREATEMONOBRUSH
  4946. {
  4947.     EMR     emr;
  4948.     DWORD   ihBrush;
  4949.     DWORD   iUsage;
  4950.     DWORD   offBmi;
  4951.     DWORD   cbBmi;
  4952.     DWORD   offBits;
  4953.     DWORD   cbBits;
  4954. } EMRCREATEMONOBRUSH, *PEMRCREATEMONOBRUSH;
  4955.  
  4956. typedef struct _tagEMRCREATEDIBPATTERNBRUSHPT
  4957. {
  4958.     EMR     emr;
  4959.     DWORD   ihBrush;
  4960.     DWORD   iUsage;
  4961.     DWORD   offBmi;
  4962.     DWORD   cbBmi;
  4963.     DWORD   offBits;
  4964.     DWORD   cbBits;
  4965. } EMRCREATEDIBPATTERNBRUSHPT, *PEMRCREATEDIBPATTERNBRUSHPT;
  4966.  
  4967. typedef struct _tagEMRFORMAT
  4968. {
  4969.     DWORD   dSignature;
  4970.     DWORD   nVersion;
  4971.     DWORD   cbData;
  4972.     DWORD   offData;
  4973. } EMRFORMAT, *PEMRFORMAT;
  4974.  
  4975.  
  4976. #define GDICOMMENT_IDENTIFIER           0x43494447
  4977. #define GDICOMMENT_WINDOWS_METAFILE     0x80000001
  4978. #define GDICOMMENT_BEGINGROUP           0x00000002
  4979. #define GDICOMMENT_ENDGROUP             0x00000003
  4980. #define GDICOMMENT_MULTIFORMATS         0x40000004
  4981. #define EPS_SIGNATURE                   0x46535045
  4982.  
  4983.  
  4984. typedef struct _tagENHMETARECORD
  4985. {
  4986.     DWORD iType;
  4987.     DWORD nSize;
  4988.     DWORD dParm[1];
  4989. } ENHMETARECORD, *PENHMETARECORD, *LPENHMETARECORD;
  4990.  
  4991.  
  4992. typedef int (* EXPENTRY ENHMFENUMPROC)(HDC, PHANDLETABLE, const PENHMETARECORD, int, LPARAM);
  4993.  
  4994.  
  4995. #define RDH_RECTANGLES  1
  4996.  
  4997. typedef struct _tagRGNDATAHEADER {
  4998.     DWORD dwSize;
  4999.     DWORD iType;
  5000.     DWORD nCount;
  5001.     DWORD nRgnSize;
  5002.     RECT   rcBound;
  5003. } RGNDATAHEADER, *PRGNDATAHEADER, *LPRGNDATAHEADER;
  5004.  
  5005. typedef struct _tagRGNDATA {
  5006.     RGNDATAHEADER rdh;
  5007.     char            Buffer[1];
  5008. } RGNDATA, *PRGNDATA, *LPRGNDATA;
  5009.  
  5010.  
  5011. typedef struct _tagICONINFO {
  5012.     BOOL    fIcon;
  5013.     DWORD   xHotspot;
  5014.     DWORD   yHotspot;
  5015.     HBITMAP hbmMask;
  5016.     HBITMAP hbmColor;
  5017. } ICONINFO, *PICONINFO;
  5018.  
  5019.  
  5020. /* Arc direction */
  5021. #define AD_COUNTERCLOCKWISE 1
  5022. #define AD_CLOCKWISE        2
  5023.  
  5024.  
  5025. typedef UINT      MMRESULT;
  5026.  
  5027. typedef struct _tagMMTIME
  5028. {
  5029.    WORD          wType;
  5030.  
  5031.    union {
  5032.       DWORD     ms;
  5033.       DWORD     sample;
  5034.       DWORD     cb;
  5035.       DWORD     ticks;
  5036.  
  5037.       struct {
  5038.          BYTE  hour;
  5039.          BYTE  min;
  5040.          BYTE  sec;
  5041.          BYTE  frame;
  5042.          BYTE  fps;
  5043.          BYTE  dummy;
  5044.       } smpte;
  5045.       struct {
  5046.          DWORD songptrpos;
  5047.       } midi;
  5048.    } u;
  5049. } MMTIME, *PMMTIME;
  5050.  
  5051. /* Types for wType field in MMTIME struct
  5052.  */
  5053. #define TIME_MS         0x0001
  5054. #define TIME_SAMPLES    0x0002
  5055. #define TIME_BYTES      0x0004
  5056. #define TIME_SMPTE      0x0008
  5057. #define TIME_MIDI       0x0010
  5058. #define TIME_TICKS      0x0020
  5059.  
  5060.  
  5061. typedef struct _tagTIME_ZONE_INFORMATION {
  5062.     LONG       Bias;
  5063.     WCHAR      StandardName[ 32 ];
  5064.     SYSTEMTIME StandardDate;
  5065.     LONG       StandardBias;
  5066.     WCHAR      DaylightName[ 32 ];
  5067.     SYSTEMTIME DaylightDate;
  5068.     LONG       DaylightBias;
  5069. } TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION;
  5070.  
  5071. #define TIME_ZONE_ID_UNKNOWN  0
  5072. #define TIME_ZONE_ID_STANDARD 1
  5073. #define TIME_ZONE_ID_DAYLIGHT 2
  5074.  
  5075. #define HINSTANCE_ERROR 32
  5076.  
  5077. /* LoadModule structure
  5078.  */
  5079. typedef struct _tagLOADPARMS32 {
  5080.     LPSTR lpEnvAddress;
  5081.     LPSTR lpCmdLine;
  5082.     LPSTR lpCmdShow;
  5083.     DWORD dwReserved;
  5084. } LOADPARMS32, *PLOADPARMS32;
  5085.  
  5086. /* DC Graphics Mode
  5087.  */
  5088. #define GM_COMPATIBLE       1
  5089. #define GM_ADVANCED         2
  5090.  
  5091. #define DCX_WINDOW                    0x00000001L
  5092. #define DCX_CACHE                     0x00000002L
  5093. #define DCX_NORESETATTRS              0x00000004L
  5094. #define DCX_CLIPCHILDREN              0x00000008L
  5095. #define DCX_CLIPSIBLINGS              0x00000010L
  5096. #define DCX_PARENTCLIP                0x00000020L
  5097. #define DCX_EXCLUDERGN                0x00000040L
  5098. #define DCX_INTERSECTRGN              0x00000080L
  5099. #define DCX_EXCLUDEUPDATE             0x00000100L
  5100. #define DCX_INTERSECTUPDATE           0x00000200L
  5101. #define DCX_LOCKWINDOWUPDATE          0x00000400L
  5102. #define DCX_VALIDATE                  0x00200000L
  5103.  
  5104. /* Defines for the fVirt field of the Accelerator table structure (ACCEL).
  5105.  */
  5106. #define FVIRTKEY  TRUE
  5107. #define FNOINVERT 0x02
  5108. #define FSHIFT    0x04
  5109. #define FCONTROL  0x08
  5110. #define FALT      0x10
  5111.  
  5112. typedef struct {
  5113.    unsigned bAppReturnCode:8;
  5114.    unsigned reserved      :6;
  5115.    unsigned fBusy         :1;
  5116.    unsigned fAck          :1;
  5117. } DDEACK;
  5118.  
  5119. typedef struct {
  5120.    unsigned reserved :14;
  5121.    unsigned fDeferUpd:1;
  5122.    unsigned fAckReq  :1;
  5123.    short    cfFormat;
  5124. } DDEADVISE;
  5125.  
  5126. typedef struct {
  5127.    unsigned unused   :12;
  5128.    unsigned fResponse:1;
  5129.    unsigned fRelease :1;
  5130.    unsigned reserved :1;
  5131.    unsigned fAckReq  :1;
  5132.    short    cfFormat;
  5133.    BYTE     Value[1];
  5134. } DDEDATA;
  5135.  
  5136. typedef struct {
  5137.    unsigned   unused   :13;
  5138.    unsigned   fRelease :1;
  5139.    unsigned   fReserved:2;
  5140.    short      cfFormat;
  5141.    BYTE     Value[1];
  5142. } DDEPOKE;
  5143.  
  5144. typedef struct {
  5145.    unsigned unused   :13;
  5146.    unsigned fRelease :1;
  5147.    unsigned fDeferUpd:1;
  5148.    unsigned fAckReq  :1;
  5149.    short    cfFormat;
  5150. } DDELN;
  5151.  
  5152. typedef struct {
  5153.    unsigned unused   :12;
  5154.    unsigned fAck     :1;
  5155.    unsigned fRelease :1;
  5156.    unsigned fReserved:1;
  5157.    unsigned fAckReq  :1;
  5158.    short    cfFormat;
  5159.    BYTE   rgb[1];
  5160. } DDEUP;
  5161.  
  5162. /* The following is a list of valid 'Transaction Type' flags:
  5163.  */
  5164. #define  XTYPF_NOBLOCK         0x0002  /* transaction cannot be blocked    */
  5165. #define  XTYPF_NODATA          0x0004  /* no data on advise notifications  */
  5166. #define  XTYPF_ACKREQ          0x0008  /* acknowledge receipt of message   */
  5167.  
  5168. /* The following is a list of valid 'Transaction Class' values and indicate
  5169.  * the type of value returned from a 'Callback' function:
  5170.  */
  5171. #define  XCLASS_BOOL           0x1000  /* TRUE or FALSE                    */
  5172. #define  XCLASS_DATA           0x2000  /* HDDEDATA,CBR_BLOCK or NULLHANDLE */
  5173. #define  XCLASS_FLAGS          0x4000  /* DDE_FACK,_FBUSY or _FNOTPROCESSED*/
  5174. #define  XCLASS_NOTIFICATION   0x8000  /* return value is ignored          */
  5175. #define  XCLASS_MASK           0xFC00
  5176.  
  5177. /* DDE flags indicating transaction results.
  5178.  */
  5179. #define DDE_FACK               0x8000
  5180. #define DDE_FBUSY              0x4000
  5181. #define DDE_FNOTPROCESSED      0x0000
  5182.  
  5183. /* The following is a list of valid 'Transaction Types':
  5184.  */
  5185. #define  XTYP_ERROR           (0x0000 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
  5186. #define  XTYP_ADVDATA         (0x0010 | XCLASS_FLAGS)
  5187. #define  XTYP_ADVREQ          (0x0020 | XCLASS_DATA         | XTYPF_NOBLOCK)
  5188. #define  XTYP_ADVSTART        (0x0030 | XCLASS_BOOL)
  5189. #define  XTYP_ADVSTOP         (0x0040 | XCLASS_NOTIFICATION)
  5190. #define  XTYP_EXECUTE         (0x0050 | XCLASS_FLAGS)
  5191. #define  XTYP_CONNECT         (0x0060 | XCLASS_BOOL         | XTYPF_NOBLOCK)
  5192. #define  XTYP_CONNECT_CONFIRM (0x0070 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
  5193. #define  XTYP_XACT_COMPLETE   (0x0080 | XCLASS_NOTIFICATION)
  5194. #define  XTYP_POKE            (0x0090 | XCLASS_FLAGS)
  5195. #define  XTYP_REGISTER        (0x00A0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
  5196. #define  XTYP_REQUEST         (0x00B0 | XCLASS_DATA)
  5197. #define  XTYP_DISCONNECT      (0x00C0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
  5198. #define  XTYP_UNREGISTER      (0x00D0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
  5199. #define  XTYP_WILDCONNECT     (0x00E0 | XCLASS_DATA         | XTYPF_NOBLOCK)
  5200. #define  XTYP_MONITOR         (0x00F0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
  5201.  
  5202. /* Conversation values:
  5203.  */
  5204. #define  ST_CONNECTED          0x0001  /* a conversation is established    */
  5205. #define  ST_ADVISE             0x0002  /* One or more data links active    */
  5206. #define  ST_ISLOCAL            0x0004  /* both sides are using DDEML       */
  5207. #define  ST_BLOCKED            0x0008  /* conversation is blocked          */
  5208. #define  ST_CLIENT             0x0010  /* client side of conversation      */
  5209. #define  ST_TERMINATED         0x0020  /* conversation has terminated      */
  5210. #define  ST_INLIST             0x0040  /* conversation is part of a list   */
  5211. #define  ST_BLOCKNEXT          0x0080  /* block after next callback        */
  5212. #define  ST_ISSELF             0x0100  /* both sides are in same thread    */
  5213.  
  5214. /* Conversation values:
  5215.  */
  5216. #define  XST_NULL               0   /* initial state of a conversation     */
  5217. #define  XST_INCOMPLETE         1   /* last transaction failed             */
  5218. #define  XST_CONNECTED          2   /* no active transactions              */
  5219. #define  XST_INIT1              3   /* waiting initiate acknowledgement    */
  5220. #define  XST_INIT2              4   /* initiate acknowledgement received   */
  5221. #define  XST_REQSENT            5   /* waiting Request acknowledgement     */
  5222. #define  XST_DATARCVD           6   /* requested data has been received    */
  5223. #define  XST_POKESENT           7   /* waiting Poke acknowledgement        */
  5224. #define  XST_POKEACKRCVD        8   /* Poke acknowledgment received        */
  5225. #define  XST_EXECSENT           9   /* waiting Execute acknowledgement     */
  5226. #define  XST_EXECACKRCVD       10   /* Execute acknowledgement received    */
  5227. #define  XST_ADVSENT           11   /* waiting Advise acknowledgement      */
  5228. #define  XST_UNADVSENT         12   /* waiting Unadvise acknowledgement    */
  5229. #define  XST_ADVACKRCVD        13   /* Advise acknowledgement received     */
  5230. #define  XST_UNADVACKRCVD      14   /* Unadvise acknowledgement received   */
  5231. #define  XST_ADVDATASENT       15   /* waiting Advise Data acknowledgement */
  5232. #define  XST_ADVDATAACKRCVD    16   /* Advise Data acknowledgement received*/
  5233.  
  5234. #define SZDDE_ITEM_ITEMLIST     "TopicItemList"
  5235. #define SZDDESYS_TOPIC          "System"
  5236. #define SZDDESYS_ITEM_TOPICS    "Topics"
  5237. #define SZDDESYS_ITEM_SYSITEMS  "SysItems"
  5238. #define SZDDESYS_ITEM_RTNMSG    "ReturnMessage"
  5239. #define SZDDESYS_ITEM_STATUS    "Status"
  5240. #define SZDDESYS_ITEM_FORMATS   "Formats"
  5241. #define SZDDESYS_ITEM_HELP      "Help"
  5242.  
  5243. typedef struct _tagHSZPAIR
  5244. {
  5245.    HSZ         hszSvc;
  5246.    HSZ         hszTopic;
  5247. } HSZPAIR, *PHSZPAIR;
  5248.  
  5249. #define  HDATA_APPOWNED             0x0001
  5250.  
  5251. /* Monitor flags:
  5252.  */
  5253. #define  MF_HSZ_INFO                ((ULONG)0x01000000L)
  5254. #define  MF_SENDMSGS                ((ULONG)0x02000000L)
  5255. #define  MF_POSTMSGS                ((ULONG)0x04000000L)
  5256. #define  MF_CALLBACKS               ((ULONG)0x08000000L)
  5257. #define  MF_ERRORS                  ((ULONG)0x10000000L)
  5258. #define  MF_LINKS                   ((ULONG)0x20000000L)
  5259. #define  MF_CONV                    ((ULONG)0x40000000L)
  5260. #define  MF_MASK                    ((ULONG)0xFF000000L)
  5261.  
  5262. /* Callback filter flags:
  5263.  */
  5264. #define  CBF_FAIL_SELFCONNECTIONS   ((ULONG)0x00001000L)
  5265. #define  CBF_FAIL_CONNECTIONS       ((ULONG)0x00002000L)
  5266. #define  CBF_FAIL_ADVISES           ((ULONG)0x00004000L)
  5267. #define  CBF_FAIL_EXECUTES          ((ULONG)0x00008000L)
  5268. #define  CBF_FAIL_POKES             ((ULONG)0x00010000L)
  5269. #define  CBF_FAIL_REQUESTS          ((ULONG)0x00020000L)
  5270. #define  CBF_FAIL_ALLSVRXACTIONS    ((ULONG)0x0003f000L)
  5271.  
  5272. #define  CBF_SKIP_CONNECT_CONFIRMS  ((ULONG)0x00040000L)
  5273. #define  CBF_SKIP_REGISTRATIONS     ((ULONG)0x00080000L)
  5274. #define  CBF_SKIP_UNREGISTRATIONS   ((ULONG)0x00100000L)
  5275. #define  CBF_SKIP_DISCONNECTS       ((ULONG)0x00200000L)
  5276. #define  CBF_SKIP_ALLNOTIFICATIONS  ((ULONG)0x003c0000L)
  5277.  
  5278. #define  CBF_MASK                   ((ULONG)0x00FFF000L)
  5279.  
  5280. /* Application flags:
  5281.  */
  5282. #define  APPCMD_CLIENTONLY          ((ULONG)0x00000010L)
  5283. #define  APPCMD_FILTERINITS         ((ULONG)0x00000020L)
  5284. #define  APPCMD_MASK                ((ULONG)0x00000FF0L)
  5285.  
  5286. /* Application class flags:
  5287.  */
  5288. #define  APPCLASS_STANDARD          ((ULONG)0x00000000L)
  5289. #define  APPCLASS_MONITOR           ((ULONG)0x00000001L)
  5290. #define  APPCLASS_MASK              ((ULONG)0x0000000FL)
  5291.  
  5292. /* Miscellaneous DDEML definitions:
  5293.  */
  5294. #define  CBR_BLOCK                  ((ULONG)-1L)
  5295. #define  QID_SYNC                   ((ULONG)-1L)
  5296. #define  MSGF_DDEMGR                0x8001
  5297. #define  TIMEOUT_ASYNC              ((ULONG)-1L)
  5298. #define  CADV_LATEACK               0xFFFF
  5299.  
  5300. /*
  5301.  */
  5302. #define  DNS_REGISTER               ((ULONG)0x00000001L)
  5303. #define  DNS_UNREGISTER             ((ULONG)0x00000002L)
  5304. #define  DNS_FILTERON               ((ULONG)0x00000004L)
  5305. #define  DNS_FILTEROFF              ((ULONG)0x00000008L)
  5306.  
  5307. /*
  5308.  */
  5309. #define  EC_ENABLEALL               0
  5310. #define  EC_ENABLEONE               ST_BLOCKNEXT
  5311. #define  EC_DISABLE                 ST_BLOCKED
  5312. #define  EC_QUERYWAITING            2
  5313.  
  5314. typedef struct _tagMONCBSTRUCT
  5315. {
  5316.    UINT        cb;
  5317.    WORD        wReserved;
  5318.    DWORD       dwTime;
  5319.    HANDLE      hTask;
  5320.    DWORD       dwRet;
  5321.    UINT        wType;
  5322.    UINT        wFmt;
  5323.    HCONV       hConv;
  5324.    HSZ         hsz1;
  5325.    HSZ         hsz2;
  5326.    HDDEDATA    hData;
  5327.    DWORD       dwData1;
  5328.    DWORD       dwData2;
  5329.    CONVCONTEXT cc;
  5330.    DWORD       cbData;
  5331.    DWORD       Data[8];
  5332. } MONCBSTRUCT, *PMONCBSTRUCT;
  5333.  
  5334. typedef struct _tagMONCONVSTRUCT
  5335. {
  5336.    UINT        cb;
  5337.    BOOL        fConnect;
  5338.    DWORD       dwTime;
  5339.    HANDLE      hTask;
  5340.    HSZ         hszSvc;
  5341.    HSZ         hszTopic;
  5342.    HCONV       hConvClient;
  5343.    HCONV       hConvServer;
  5344. }  MONCONVSTRUCT, *PMONCONVSTRUCT;
  5345.  
  5346. typedef struct _tagMONERRSTRUCT
  5347. {
  5348.    UINT        cb;
  5349.    UINT        wLastError;
  5350.    DWORD       dwTime;
  5351.    HANDLE      hTask;
  5352. }  MONERRSTRUCT, *PMONERRSTRUCT;
  5353.  
  5354. typedef struct _tagMONHSZSTRUCT
  5355. {
  5356.    UINT        cb;
  5357.    BOOL        fsAction;
  5358.    DWORD       dwTime;
  5359.    HSZ         hsz;
  5360.    HANDLE      hTask;
  5361.    WORD        wReserved;
  5362.    char        str[1];
  5363. }  MONHSZSTRUCT, *PMONHSZSTRUCT;
  5364.  
  5365. #define  MH_CREATE      1
  5366. #define  MH_KEEP        2
  5367. #define  MH_DELETE      3
  5368. #define  MH_CLEANUP     4
  5369.  
  5370. typedef struct _tagMONLINKSTRUCT
  5371. {
  5372.    UINT        cb;
  5373.    DWORD       dwTime;
  5374.    HANDLE      hTask;
  5375.    BOOL        fEstablished;
  5376.    BOOL        fNoData;
  5377.    HSZ         hszSvc;
  5378.    HSZ         hszTopic;
  5379.    HSZ         hszItem;
  5380.    UINT        wFmt;
  5381.    BOOL        fServer;
  5382.    HCONV       hConvServer;
  5383.    HCONV       hConvClient;
  5384. }  MONLINKSTRUCT, *PMONLINKSTRUCT;
  5385.  
  5386. typedef struct _tagDDEML_MSG_HOOK_DATA
  5387. {
  5388.    UINT        uiLo;
  5389.    UINT        uiHigh;
  5390.    DWORD       cbData;
  5391.    DWORD       Data[8];
  5392. }  DDEML_MSG_HOOK_DATA, *PDDEML_MSG_HOOK_DATA;
  5393.  
  5394. typedef struct _tagMONMSGSTRUCT
  5395. {
  5396.    UINT        cb;
  5397.    HWND        hwndTo;
  5398.    DWORD       dwTime;
  5399.    HANDLE      hTask;
  5400.    UINT        wMsg;
  5401.    WPARAM      wParam;
  5402.    LPARAM      lParam;
  5403.    DDEML_MSG_HOOK_DATA dmhd;
  5404. }  MONMSGSTRUCT, *PMONMSGSTRUCT;
  5405.  
  5406. /* Dynamic Data Exchange Managment Library error values:
  5407.  */
  5408. #define  DMLERR_NO_ERROR            0
  5409.  
  5410. #define  DMLERR_FIRST               0x4000
  5411. #define  DMLERR_ADVACKTIMEOUT       0x4000
  5412. #define  DMLERR_BUSY                0x4001
  5413. #define  DMLERR_DATAACKTIMEOUT      0x4002
  5414. #define  DMLERR_DLL_NOT_INITIALIZED 0x4003
  5415. #define  DMLERR_DLL_USAGE           0x4004
  5416. #define  DMLERR_EXECACKTIMEOUT      0x4005
  5417. #define  DMLERR_INVALIDPARAMETER    0x4006
  5418. #define  DMLERR_LOW_MEMORY          0x4007
  5419. #define  DMLERR_MEMORY_ERROR        0x4008
  5420. #define  DMLERR_NOTPROCESSED        0x4009
  5421. #define  DMLERR_NO_CONV_ESTABLISHED 0x400a
  5422. #define  DMLERR_POKEACKTIMEOUT      0x400b
  5423. #define  DMLERR_POSTMSG_FAILED      0x400c
  5424. #define  DMLERR_REENTRANCY          0x400d
  5425. #define  DMLERR_SERVER_DIED         0x400e
  5426. #define  DMLERR_SYS_ERROR           0x400f
  5427. #define  DMLERR_UNADVACKTIMEOUT     0x4010
  5428. #define  DMLERR_UNFOUND_QUEUE_ID    0x4011
  5429. #define  DMLERR_LAST                0x4011
  5430.  
  5431. /* Dynamic Data Exchange Managment Library function prototypes:
  5432.  */
  5433.  
  5434. /* Default codepage
  5435.  */
  5436. #define CP_WINANSI      1004
  5437.  
  5438.  
  5439. #define SC_SIZE         0xF000
  5440. #define SC_MOVE         0xF010
  5441. #define SC_MINIMIZE     0xF020
  5442. #define SC_MAXIMIZE     0xF030
  5443. #define SC_NEXTWINDOW   0xF040
  5444. #define SC_PREVWINDOW   0xF050
  5445. #define SC_CLOSE        0xF060
  5446. #define SC_VSCROLL      0xF070
  5447. #define SC_HSCROLL      0xF080
  5448. #define SC_MOUSEMENU    0xF090
  5449. #define SC_KEYMENU      0xF100
  5450. #define SC_ARRANGE      0xF110
  5451. #define SC_RESTORE      0xF120
  5452. #define SC_TASKLIST     0xF130
  5453. #define SC_SCREENSAVE   0xF140
  5454. #define SC_HOTKEY       0xF150
  5455. #define SC_ICON         SC_MINIMIZE
  5456. #define SC_ZOOM         SC_MAXIMIZE
  5457.  
  5458.  
  5459. #define META_SETBKCOLOR              0x0201
  5460. #define META_SETBKMODE               0x0102
  5461. #define META_SETMAPMODE              0x0103
  5462. #define META_SETROP2                 0x0104
  5463. #define META_SETRELABS               0x0105
  5464. #define META_SETPOLYFILLMODE         0x0106
  5465. #define META_SETSTRETCHBLTMODE       0x0107
  5466. #define META_SETTEXTCHAREXTRA        0x0108
  5467. #define META_SETTEXTCOLOR            0x0209
  5468. #define META_SETTEXTJUSTIFICATION    0x020A
  5469. #define META_SETWINDOWORG            0x020B
  5470. #define META_SETWINDOWEXT            0x020C
  5471. #define META_SETVIEWPORTORG          0x020D
  5472. #define META_SETVIEWPORTEXT          0x020E
  5473. #define META_OFFSETWINDOWORG         0x020F
  5474. #define META_SCALEWINDOWEXT          0x0410
  5475. #define META_OFFSETVIEWPORTORG       0x0211
  5476. #define META_SCALEVIEWPORTEXT        0x0412
  5477. #define META_LINETO                  0x0213
  5478. #define META_MOVETO                  0x0214
  5479. #define META_EXCLUDECLIPRECT         0x0415
  5480. #define META_INTERSECTCLIPRECT       0x0416
  5481. #define META_ARC                     0x0817
  5482. #define META_ELLIPSE                 0x0418
  5483. #define META_FLOODFILL               0x0419
  5484. #define META_PIE                     0x081A
  5485. #define META_RECTANGLE               0x041B
  5486. #define META_ROUNDRECT               0x061C
  5487. #define META_PATBLT                  0x061D
  5488. #define META_SAVEDC                  0x001E
  5489. #define META_SETPIXEL                0x041F
  5490. #define META_OFFSETCLIPRGN           0x0220
  5491. #define META_TEXTOUT                 0x0521
  5492. #define META_BITBLT                  0x0922
  5493. #define META_STRETCHBLT              0x0B23
  5494. #define META_POLYGON                 0x0324
  5495. #define META_POLYLINE                0x0325
  5496. #define META_ESCAPE                  0x0626
  5497. #define META_RESTOREDC               0x0127
  5498. #define META_FILLREGION              0x0228
  5499. #define META_FRAMEREGION             0x0429
  5500. #define META_INVERTREGION            0x012A
  5501. #define META_PAINTREGION             0x012B
  5502. #define META_SELECTCLIPREGION        0x012C
  5503. #define META_SELECTOBJECT            0x012D
  5504. #define META_SETTEXTALIGN            0x012E
  5505. #define META_CHORD                   0x0830
  5506. #define META_SETMAPPERFLAGS          0x0231
  5507. #define META_EXTTEXTOUT              0x0a32
  5508. #define META_SETDIBTODEV             0x0d33
  5509. #define META_SELECTPALETTE           0x0234
  5510. #define META_REALIZEPALETTE          0x0035
  5511. #define META_ANIMATEPALETTE          0x0436
  5512. #define META_SETPALENTRIES           0x0037
  5513. #define META_POLYPOLYGON             0x0538
  5514. #define META_RESIZEPALETTE           0x0139
  5515. #define META_DIBBITBLT               0x0940
  5516. #define META_DIBSTRETCHBLT           0x0b41
  5517. #define META_DIBCREATEPATTERNBRUSH   0x0142
  5518. #define META_STRETCHDIB              0x0f43
  5519. #define META_EXTFLOODFILL            0x0548
  5520. #define META_DELETEOBJECT            0x01f0
  5521. #define META_CREATEPALETTE           0x00f7
  5522. #define META_CREATEPATTERNBRUSH      0x01F9
  5523. #define META_CREATEPENINDIRECT       0x02FA
  5524. #define META_CREATEFONTINDIRECT      0x02FB
  5525. #define META_CREATEBRUSHINDIRECT     0x02FC
  5526. #define META_CREATEREGION            0x06FF
  5527.  
  5528.  
  5529. typedef struct _tagMINMAXINFO {
  5530.    POINT ptReserved;
  5531.    POINT ptMaxSize;
  5532.    POINT ptMaxPosition;
  5533.    POINT ptMinTrackSize;
  5534.    POINT ptMaxTrackSize;
  5535. } MINMAXINFO, *PMINMAXINFO, *LPMINMAXINFO;
  5536.  
  5537. #define MSGF_DIALOGBOX      0
  5538. #define MSGF_MESSAGEBOX     1
  5539. #define MSGF_MENU           2
  5540. #define MSGF_MOVE           3
  5541. #define MSGF_SIZE           4
  5542. #define MSGF_SCROLLBAR      5
  5543. #define MSGF_NEXTWINDOW     6
  5544. #define MSGF_MAINLOOP       8
  5545. #define MSGF_MAX            8
  5546. #define MSGF_USER        4096
  5547.  
  5548. #define HELP_CONTEXT            0x0001L
  5549. #define HELP_QUIT               0x0002L
  5550. #define HELP_INDEX              0x0003L
  5551. #define HELP_CONTENTS           0x0003L
  5552. #define HELP_HELPONHELP         0x0004L
  5553. #define HELP_SETINDEX           0x0005L
  5554. #define HELP_SETCONTENTS        0x0005L
  5555. #define HELP_CONTEXTPOPUP       0x0008L
  5556. #define HELP_FORCEFILE          0x0009L
  5557. #define HELP_KEY                0x0101L
  5558. #define HELP_COMMAND            0x0102L
  5559. #define HELP_PARTIALKEY         0x0105L
  5560. #define HELP_MULTIKEY           0x0201L
  5561. #define HELP_SETWINPOS          0x0203L
  5562.  
  5563. #define MK_LBUTTON          0x0001
  5564. #define MK_RBUTTON          0x0002
  5565. #define MK_SHIFT            0x0004
  5566. #define MK_CONTROL          0x0008
  5567. #define MK_MBUTTON          0x0010
  5568.  
  5569. #define ST_BEGINSWP         0
  5570. #define ST_ENDSWP           1
  5571.  
  5572. #define HTERROR             (-2)
  5573. #define HTTRANSPARENT       (-1)
  5574. #define HTNOWHERE           0
  5575. #define HTCLIENT            1
  5576. #define HTCAPTION           2
  5577. #define HTSYSMENU           3
  5578. #define HTGROWBOX           4
  5579. #define HTSIZE              HTGROWBOX
  5580. #define HTMENU              5
  5581. #define HTHSCROLL           6
  5582. #define HTVSCROLL           7
  5583. #define HTMINBUTTON         8
  5584. #define HTMAXBUTTON         9
  5585. #define HTLEFT              10
  5586. #define HTRIGHT             11
  5587. #define HTTOP               12
  5588. #define HTTOPLEFT           13
  5589. #define HTTOPRIGHT          14
  5590. #define HTBOTTOM            15
  5591. #define HTBOTTOMLEFT        16
  5592. #define HTBOTTOMRIGHT       17
  5593. #define HTBORDER            18
  5594. #define HTREDUCE            HTMINBUTTON
  5595. #define HTZOOM              HTMAXBUTTON
  5596. #define HTSIZEFIRST         HTLEFT
  5597. #define HTSIZELAST          HTBOTTOMRIGHT
  5598.  
  5599. #define SMTO_NORMAL         0x0000
  5600. #define SMTO_BLOCK          0x0001
  5601. #define SMTO_ABORTIFHUNG    0x0002
  5602.  
  5603. #define HELPINFO_WINDOW    0x0001
  5604. #define HELPINFO_MENUITEM  0x0002
  5605. typedef struct tagHELPINFO
  5606. {
  5607.     UINT    cbSize;
  5608.     int     iContextType;
  5609.     int     iCtrlId;
  5610.     HANDLE  hItemHandle;
  5611.     DWORD   dwContextId;
  5612.     POINT   MousePos;
  5613. }  HELPINFO, *LPHELPINFO;
  5614.  
  5615.  
  5616. /* Hook Related structures ...
  5617.  */
  5618. typedef struct _CWPSTRUCT {
  5619.  
  5620.     LPARAM lParam;
  5621.     WPARAM wParam;
  5622.     DWORD  message;
  5623.     HWND   hwnd;
  5624. } CWPSTRUCT;
  5625. typedef CWPSTRUCT          *PCWPSTRUCT;
  5626.  
  5627. typedef struct _DEBUGHOOKINFO {
  5628.     DWORD  idThread;
  5629.     LPARAM reserved;
  5630.     LPARAM lParam;
  5631.     WPARAM wParam;
  5632.     int      code;
  5633. } DEBUGHOOKINFO;
  5634. typedef DEBUGHOOKINFO      *PDEBUGHOOKINFO;
  5635.  
  5636. typedef struct _EVENTMSG {
  5637.     UINT  message;
  5638.     UINT  paramL;
  5639.     UINT  paramH;
  5640.     DWORD time;
  5641.     HWND  hwnd;
  5642. } EVENTMSG;
  5643. typedef EVENTMSG           *PEVENTMSG;
  5644.  
  5645. typedef struct _MOUSEHOOKSTRUCT {
  5646.     POINT pt;
  5647.     HWND  hwnd;
  5648.     UINT  wHitTestCode;
  5649.     DWORD dwExtraInfo;
  5650. } MOUSEHOOKSTRUCT;
  5651. typedef MOUSEHOOKSTRUCT    *PMOUSEHOOKSTRUCT;
  5652.  
  5653. #define MakeProcInstance(proc, hinst) (proc)
  5654. #define FreeProcInstance(proc) (proc)
  5655. #define FreeModule(hLibModule) FreeLibrary((hLibModule))
  5656. #define Yield()
  5657.  
  5658. #define GetWindowTask(hWnd) ((HANDLE)GetWindowThreadProcessId(hWnd, NULL))
  5659.  
  5660.  
  5661. /* Macro'd APIs
  5662.  */
  5663. #define CreateWindow(lpClassName, lpWindowName, dwStyle, x, y,\
  5664.                         nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)\
  5665.         CreateWindowEx(0, lpClassName, lpWindowName, dwStyle, x, y,\
  5666.                           nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)
  5667.  
  5668. /* TBD: This must be removed before release
  5669.  */
  5670. #ifndef NO_HEAPSIZE_MACRO
  5671. #define HeapSize(handle, flags, pMem) AweHeapSize(handle, flags, pMem)
  5672. #endif
  5673.  
  5674. #define AnsiToOem     CharToOem
  5675. #define OemToAnsi     OemToChar
  5676. #define AnsiToOemBuff CharToOemBuff
  5677. #define OemToAnsiBuff OemToCharBuff
  5678. #define AnsiUpper     CharUpper
  5679. #define AnsiUpperBuff CharUpperBuff
  5680. #define AnsiLower     CharLower
  5681. #define AnsiLowerBuff CharLowerBuff
  5682. #define AnsiNext      CharNext
  5683. #define AnsiPrev      CharPrev
  5684. #define GetStringTypeA GetStringTypeEx
  5685.  
  5686.  
  5687. /* Name Mapped API's
  5688.  */
  5689. #define CreateBitmapIndirect            _CreateBitmapIndirect
  5690. #define CreateDialogIndirect            _CreateDialogIndirect
  5691. #define CreateDialogIndirectParam       _CreateDialogIndirectParam
  5692. #define CreateIconIndirect              _CreateIconIndirect
  5693. #define DialogBoxIndirect               _DialogBoxIndirect
  5694. #define DialogBoxIndirectParam          _DialogBoxIndirectParam
  5695. #define LoadMenuIndirect                _LoadMenuIndirect
  5696. #define LoadResource                    _LoadResource
  5697.  
  5698.  
  5699. /* API Prototypes
  5700.  */
  5701. int       WINAPI WinMain( HINSTANCE, HINSTANCE, LPSTR, int );
  5702.  
  5703. int       WINAPI AbortDoc( HDC );
  5704.  
  5705. BOOL    WINAPI AbortPath( HDC );
  5706.  
  5707. ATOM    WINAPI AddAtom( LPCSTR );
  5708.  
  5709. int       WINAPI AddFontResource( LPCSTR );
  5710.  
  5711. BOOL    WINAPI AdjustWindowRect( PRECT, DWORD, BOOL );
  5712.  
  5713. BOOL    WINAPI AdjustWindowRectEx( PRECT, DWORD, BOOL, DWORD );
  5714.  
  5715. BOOL    WINAPI AngleArc( HDC, int, int, DWORD, float startAngle, float sweepAngle );
  5716.  
  5717. BOOL    WINAPI AnimatePalette( HPALETTE, UINT, UINT, const PALETTEENTRY *);
  5718.  
  5719. BOOL    WINAPI AppendMenu( HMENU, UINT, UINT, LPCSTR );
  5720.  
  5721. BOOL    WINAPI Arc( HDC, int, int, int, int, int, int, int, int );
  5722.  
  5723. BOOL    WINAPI ArcTo( HDC, int, int, int, int, int xRad1, int yRad1, int xRad2, int yRad2);
  5724.  
  5725. UINT    WINAPI ArrangeIconicWindows( HWND );
  5726.  
  5727. BOOL    WINAPI Beep( DWORD, DWORD );
  5728.  
  5729. HDWP    WINAPI BeginDeferWindowPos( int );
  5730.  
  5731. HDC     WINAPI BeginPaint( HWND, PPAINTSTRUCT );
  5732.  
  5733. BOOL    WINAPI BeginPath( HDC );
  5734.  
  5735. BOOL    WINAPI BitBlt( HDC , int, int, int, int, HDC , int, int, DWORD );
  5736.  
  5737. BOOL    WINAPI BringWindowToTop( HWND );
  5738.  
  5739. BOOL    WINAPI CallMsgFilter( PMSG, int );
  5740.  
  5741. LRESULT WINAPI CallNextHookEx( HHOOK, int, WPARAM, LPARAM );
  5742.  
  5743. LRESULT WINAPI CallWindowProc( WNDPROC, HWND, UINT, WPARAM, LPARAM );
  5744.  
  5745. BOOL    WINAPI ChangeClipboardChain( HWND, HWND );
  5746.  
  5747. LPSTR   WINAPI CharLower( LPSTR );
  5748.  
  5749. DWORD   WINAPI CharLowerBuff( LPSTR, DWORD );
  5750.  
  5751. LPSTR   WINAPI CharUpper( LPSTR );
  5752.  
  5753. DWORD   WINAPI CharUpperBuff( LPSTR, DWORD );
  5754.  
  5755. BOOL    WINAPI CheckDlgButton( HWND, int, UINT );
  5756.  
  5757. DWORD   WINAPI CheckMenuItem( HMENU, UINT, UINT );
  5758.  
  5759. BOOL    WINAPI CheckRadioButton( HWND, int, int, int );
  5760.  
  5761. HWND    WINAPI ChildWindowFromPoint( HWND, POINT );
  5762.  
  5763. BOOL    WINAPI ChooseColor( PCHOOSECOLOR );
  5764.  
  5765. BOOL    WINAPI ChooseFont( LPCHOOSEFONT );
  5766.  
  5767. BOOL    WINAPI Chord( HDC , int, int, int, int, int xRadial1, int yRadial1, int xRadial2, int yRadial2);
  5768.  
  5769. BOOL    WINAPI ClientToScreen( HWND, PPOINT );
  5770.  
  5771. BOOL    WINAPI ClipCursor( const RECT *);
  5772.  
  5773. BOOL    WINAPI CloseClipboard( VOID );
  5774.  
  5775. HENHMETAFILE WINAPI CloseEnhMetaFile( HDC );
  5776.  
  5777. BOOL    WINAPI CloseFigure( HDC );
  5778.  
  5779. BOOL    WINAPI CloseHandle( HANDLE );
  5780.  
  5781. HMETAFILE WINAPI CloseMetaFile( HDC );
  5782.  
  5783. BOOL    WINAPI CloseWindow( HWND );
  5784.  
  5785. int       WINAPI CombineRgn( HRGN, HRGN hrgnSrc1, HRGN hrgnSrc2, int );
  5786.  
  5787. DWORD   WINAPI CommDlgExtendedError( VOID );
  5788.  
  5789. LONG    WINAPI CompareFileTime( const FILETIME *, const FILETIME * );
  5790.  
  5791. int       WINAPI CopyAcceleratorTable( HACCEL, PACCEL, int );
  5792.  
  5793. LCID    WINAPI ConvertDefaultLocale( LCID );
  5794.  
  5795. HCURSOR WINAPI CopyCursor( HCURSOR );
  5796.  
  5797. HENHMETAFILE WINAPI CopyEnhMetaFile( HENHMETAFILE, LPCSTR );
  5798.  
  5799. BOOL    WINAPI CopyFile( LPCSTR, LPCSTR, BOOL );
  5800.  
  5801. HICON   WINAPI CopyIcon( HICON );
  5802.  
  5803. HMETAFILE WINAPI CopyMetaFile( HMETAFILE, LPCSTR );
  5804.  
  5805. BOOL    WINAPI CopyRect( PRECT, const RECT *);
  5806.  
  5807. int       WINAPI CountClipboardFormats( VOID );
  5808.  
  5809. HACCEL  WINAPI CreateAcceleratorTable( PACCEL, int );
  5810.  
  5811. HBITMAP WINAPI CreateBitmap( int, int, UINT, UINT, const void * );
  5812.  
  5813. HBITMAP WINAPI CreateBitmapIndirect( const BITMAP * );
  5814.  
  5815. HBRUSH  WINAPI CreateBrushIndirect( PLOGBRUSH );
  5816.  
  5817. BOOL    WINAPI CreateCaret( HWND, HBITMAP, int, int );
  5818.  
  5819. HBITMAP WINAPI CreateCompatibleBitmap( HDC , int, int );
  5820.  
  5821. HDC     WINAPI CreateCompatibleDC( HDC );
  5822.  
  5823. HCURSOR WINAPI CreateCursor( HINSTANCE, int, int, int, int, const VOID *, const VOID *);
  5824.  
  5825. HDC     WINAPI CreateDC( LPCSTR, LPCSTR, LPCSTR, const DEVMODE *);
  5826.  
  5827. HBRUSH  WINAPI CreateDIBPatternBrushPt( const VOID *, UINT );
  5828.  
  5829. HBITMAP WINAPI CreateDIBitmap( HDC, const BITMAPINFOHEADER *, DWORD, const void *, const BITMAPINFO *, UINT );
  5830.  
  5831. HWND    WINAPI CreateDialog( HINSTANCE, LPCSTR, HWND, DLGPROC );
  5832.  
  5833. HWND    WINAPI CreateDialogParam( HINSTANCE, LPCSTR, HWND, DLGPROC, LPARAM );
  5834.  
  5835. HWND    WINAPI CreateDialogIndirect( HINSTANCE, const DLGTEMPLATE *, HWND, DLGPROC );
  5836.  
  5837. HWND    WINAPI CreateDialogIndirectParam( HINSTANCE, const DLGTEMPLATE *, HWND, DLGPROC, LPARAM );
  5838.  
  5839. BOOL    WINAPI CreateDirectory( LPCSTR, PSECURITY_ATTRIBUTES );
  5840.  
  5841. HRGN    WINAPI CreateEllipticRgn( int, int, int, int );
  5842.  
  5843. HRGN    WINAPI CreateEllipticRgnIndirect( const RECT * );
  5844.  
  5845. HDC     WINAPI CreateEnhMetaFile( HDC, LPCSTR, const RECT *, LPCSTR );
  5846.  
  5847. HANDLE  WINAPI CreateEvent( PSECURITY_ATTRIBUTES, BOOL, BOOL, LPCSTR );
  5848.  
  5849. HANDLE  WINAPI CreateFile( LPCSTR, DWORD, DWORD, PSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE );
  5850.  
  5851. HFONT   WINAPI CreateFont( int, int, int, int, int, DWORD, DWORD, DWORD, DWORD,
  5852.                                   DWORD, DWORD, DWORD, DWORD, LPCSTR );
  5853.  
  5854. HFONT   WINAPI CreateFontIndirect( const  LOGFONT *);
  5855.  
  5856. HBRUSH  WINAPI CreateHatchBrush( int, COLORREF );
  5857.  
  5858. HDC     WINAPI CreateIC( LPCSTR, LPCSTR, LPCSTR, const DEVMODE *);
  5859.  
  5860. HICON   WINAPI CreateIcon( HINSTANCE, int, int, BYTE, BYTE, const BYTE *, const BYTE * );
  5861.  
  5862. HICON   WINAPI CreateIconFromResource( PBYTE, DWORD, BOOL, DWORD );
  5863.  
  5864. HICON   WINAPI CreateIconIndirect( PICONINFO );
  5865.  
  5866. HMENU   WINAPI CreateMenu( void);
  5867.  
  5868. HDC     WINAPI CreateMetaFile( LPCSTR );
  5869.  
  5870. HWND    WINAPI CreateMDIWindow( LPSTR, LPSTR, DWORD, int, int, int, int, HWND, HINSTANCE, LPARAM );
  5871.  
  5872. HANDLE  WINAPI CreateMutex( PSECURITY_ATTRIBUTES, BOOL, LPCSTR );
  5873.  
  5874. HPALETTE WINAPI CreatePalette( const LOGPALETTE * );
  5875.  
  5876. HBRUSH  WINAPI CreatePatternBrush( HBITMAP );
  5877.  
  5878. HPEN    WINAPI CreatePen( int, int, COLORREF );
  5879.  
  5880. HPEN    WINAPI CreatePenIndirect( const LOGPEN * );
  5881.  
  5882. HRGN    WINAPI CreatePolyPolygonRgn( const POINT *, const INT *, int, int );
  5883.  
  5884. HRGN    WINAPI CreatePolygonRgn( const POINT *, int, int );
  5885.  
  5886. HMENU   WINAPI CreatePopupMenu( VOID );
  5887.  
  5888. BOOL    WINAPI CreateProcess( LPCSTR, LPCSTR, PSECURITY_ATTRIBUTES, PSECURITY_ATTRIBUTES,
  5889.                          BOOL, DWORD, PVOID, LPCSTR, PSTARTUPINFO,
  5890.                          PPROCESS_INFORMATION );
  5891.  
  5892. HRGN    WINAPI CreateRectRgn( int, int, int, int );
  5893.  
  5894. HRGN    WINAPI CreateRectRgnIndirect( const RECT * );
  5895.  
  5896. HRGN    WINAPI CreateRoundRectRgn( int, int, int, int, int, int );
  5897.  
  5898. HANDLE  WINAPI CreateSemaphore( PSECURITY_ATTRIBUTES, LONG, LONG, LPSTR );
  5899.  
  5900. HBRUSH  WINAPI CreateSolidBrush( COLORREF );
  5901.  
  5902. HANDLE  WINAPI CreateThread( PSECURITY_ATTRIBUTES, DWORD, PTHREAD_START_ROUTINE, PVOID, DWORD, PDWORD );
  5903.  
  5904. HWND    WINAPI CreateWindowEx( DWORD, LPCSTR, LPCSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, PVOID );
  5905.  
  5906. BOOL    WINAPI DPtoLP( HDC, PPOINT, int );
  5907.  
  5908. BOOL    WINAPI DdeAbandonTransaction( DWORD, HCONV, DWORD );
  5909.  
  5910. PBYTE   WINAPI DdeAccessData(HDDEDATA, PDWORD );
  5911.  
  5912. HDDEDATA WINAPI DdeAddData( HDDEDATA, LPBYTE, DWORD, DWORD );
  5913.  
  5914. HDDEDATA WINAPI DdeClientTransaction( LPBYTE, DWORD, HCONV,
  5915.                           HSZ, UINT, UINT, DWORD, LPDWORD );
  5916.  
  5917. int       WINAPI DdeCmpStringHandles( HSZ hsz1, HSZ hsz2);
  5918.  
  5919. HCONV   WINAPI DdeConnect( DWORD, HSZ, HSZ, PCONVCONTEXT );
  5920.  
  5921. HCONVLIST WINAPI DdeConnectList(DWORD, HSZ, HSZ, HCONVLIST, PCONVCONTEXT );
  5922.  
  5923. HDDEDATA WINAPI DdeCreateDataHandle(DWORD, LPBYTE, DWORD, DWORD, HSZ, UINT, UINT );
  5924.  
  5925. HSZ     WINAPI DdeCreateStringHandle(DWORD, LPTSTR, int );
  5926.  
  5927. BOOL    WINAPI DdeDisconnect(HCONV );
  5928.  
  5929. BOOL    WINAPI DdeDisconnectList( HCONVLIST );
  5930.  
  5931. BOOL    WINAPI DdeEnableCallback(DWORD, HCONV, UINT );
  5932.  
  5933. BOOL    WINAPI DdeFreeDataHandle( HDDEDATA );
  5934.  
  5935. BOOL    WINAPI DdeFreeStringHandle(DWORD, HSZ );
  5936.  
  5937. DWORD   WINAPI DdeGetData( HDDEDATA, LPBYTE, DWORD, DWORD );
  5938.  
  5939. UINT    WINAPI DdeGetLastError(DWORD );
  5940.  
  5941. UINT    WINAPI DdeInitialize(PDWORD, PFNCALLBACK, DWORD, DWORD );
  5942.  
  5943. BOOL    WINAPI DdeKeepStringHandle(DWORD, HSZ );
  5944.  
  5945. HDDEDATA WINAPI DdeNameService( DWORD, HSZ hsz1, HSZ hsz2, UINT );
  5946.  
  5947. BOOL    WINAPI DdePostAdvise(DWORD, HSZ, HSZ );
  5948.  
  5949. UINT    WINAPI DdeQueryConvInfo( HCONV, DWORD, PCONVINFO );
  5950.  
  5951. HCONV   WINAPI DdeQueryNextServer( HCONVLIST, HCONV );
  5952.  
  5953. DWORD   WINAPI DdeQueryString(DWORD, HSZ, LPSTR, DWORD, int );
  5954.  
  5955. HCONV   WINAPI DdeReconnect( HCONV );
  5956.  
  5957. BOOL    WINAPI DdeSetUserHandle( HCONV, DWORD, DWORD );
  5958.  
  5959. BOOL    WINAPI DdeUnaccessData( HDDEDATA );
  5960.  
  5961. BOOL    WINAPI DdeUninitialize(DWORD );
  5962.  
  5963. LRESULT WINAPI DefDlgProc( HWND, UINT, WPARAM mp1, LPARAM mp2 );
  5964.  
  5965. HDWP    WINAPI DeferWindowPos( HDWP, HWND, HWND hWndInsertAfter , int, int, int, int, UINT );
  5966.  
  5967. LRESULT WINAPI DefFrameProc( HWND, HWND, UINT, WPARAM, LPARAM );
  5968.  
  5969. LRESULT WINAPI DefMDIChildProc( HWND, UINT, WPARAM, LPARAM );
  5970.  
  5971. LRESULT WINAPI DefWindowProc( HWND, UINT, WPARAM mp1, LPARAM mp2 );
  5972.  
  5973. ATOM    WINAPI DeleteAtom( ATOM );
  5974.  
  5975. VOID    WINAPI DeleteCriticalSection( PCRITICAL_SECTION );
  5976.  
  5977. BOOL    WINAPI DeleteDC( HDC );
  5978.  
  5979. BOOL    WINAPI DeleteEnhMetaFile( HENHMETAFILE );
  5980.  
  5981. BOOL    WINAPI DeleteFile( LPCSTR );
  5982.  
  5983. VOID    WINAPI DeleteHDCObjects( HDC );
  5984.  
  5985. BOOL    WINAPI DeleteMenu( HMENU, UINT, UINT );
  5986.  
  5987. BOOL    WINAPI DeleteMetaFile( HMETAFILE );
  5988.  
  5989. BOOL    WINAPI DeleteObject( HANDLE );
  5990.  
  5991. BOOL    WINAPI DestroyAcceleratorTable( HACCEL );
  5992.  
  5993. BOOL    WINAPI DestroyCaret( VOID );
  5994.  
  5995. BOOL    WINAPI DestroyCursor( HCURSOR );
  5996.  
  5997. BOOL    WINAPI DestroyIcon( HICON );
  5998.  
  5999. BOOL    WINAPI DestroyMenu( HMENU );
  6000.  
  6001. BOOL    WINAPI DestroyWindow( HWND );
  6002.  
  6003. DWORD   WINAPI DeviceCapabilities( LPCTSTR, LPCTSTR, WORD, LPTSTR, const DEVMODE *);
  6004.  
  6005. int       WINAPI DialogBox( HINSTANCE, LPCSTR, HWND, DLGPROC );
  6006.  
  6007. int       WINAPI DialogBoxParam( HINSTANCE, LPCSTR, HWND, DLGPROC, LPARAM );
  6008.  
  6009. int       WINAPI DialogBoxIndirect( HINSTANCE, LPDLGTEMPLATE, HWND, DLGPROC );
  6010.  
  6011. int       WINAPI DialogBoxIndirectParam( HINSTANCE, LPDLGTEMPLATE, HWND, DLGPROC, LPARAM );
  6012.  
  6013. LONG    WINAPI DispatchMessage( const MSG * );
  6014.  
  6015. int       WINAPI DlgDirList( HWND, LPSTR, int, int, UINT );
  6016.  
  6017. int       WINAPI DlgDirListComboBox( HWND, LPSTR, int, int, UINT );
  6018.  
  6019. BOOL    WINAPI DlgDirSelectEx( HWND, LPSTR, int, int );
  6020.  
  6021. BOOL    WINAPI DlgDirSelectComboBoxEx( HWND, LPSTR, int, int );
  6022.  
  6023. BOOL    WINAPI DllEntryPoint( HINSTANCE, DWORD, LPVOID );
  6024.  
  6025. BOOL    WINAPI DosDateTimeToFileTime( WORD, WORD, PFILETIME );
  6026.  
  6027. VOID    WINAPI DragAcceptFiles( HWND, BOOL );
  6028.  
  6029. VOID    WINAPI DragFinish( HDROP );
  6030.  
  6031. UINT    WINAPI DragQueryFile( HDROP, UINT, LPTSTR, UINT );
  6032.  
  6033. BOOL    WINAPI DragQueryPoint( HDROP, PPOINT );
  6034.  
  6035. BOOL    WINAPI DrawFocusRect( HDC, const RECT * );
  6036.  
  6037. BOOL    WINAPI DrawIcon( HDC, int, int, HICON );
  6038.  
  6039. BOOL    WINAPI DrawMenuBar( HWND );
  6040.  
  6041. int       WINAPI DrawText( HDC, LPCSTR, int, PRECT, UINT );
  6042.  
  6043. BOOL    WINAPI DuplicateHandle( HANDLE, HANDLE, HANDLE, PHANDLE, DWORD, BOOL, DWORD );
  6044.  
  6045. BOOL    WINAPI Ellipse( HDC, int, int, int, int );
  6046.  
  6047. BOOL    WINAPI EmptyClipboard( void);
  6048.  
  6049. BOOL    WINAPI EnableMenuItem( HMENU, UINT, UINT );
  6050.  
  6051. BOOL    WINAPI EnableScrollBar( HWND, UINT, UINT );
  6052.  
  6053. BOOL    WINAPI EnableWindow( HWND, BOOL );
  6054.  
  6055. BOOL    WINAPI EndDeferWindowPos( HDWP );
  6056.  
  6057. BOOL    WINAPI EndDialog( HWND, int );
  6058.  
  6059. int       WINAPI EndDoc( HDC );
  6060.  
  6061. int       WINAPI EndPage( HDC );
  6062.  
  6063. BOOL    WINAPI EndPath( HDC );
  6064.  
  6065. BOOL    WINAPI EndPaint( HWND, const PAINTSTRUCT *);
  6066.  
  6067. VOID    WINAPI EnterCriticalSection( PCRITICAL_SECTION );
  6068.  
  6069. BOOL    WINAPI EnumChildWindows( HWND, WNDENUMPROC, LPARAM );
  6070.  
  6071. UINT    WINAPI EnumClipboardFormats( UINT );
  6072.  
  6073. BOOL    WINAPI EnumEnhMetaFile( HDC , HENHMETAFILE, ENHMFENUMPROC, PVOID, const RECT * );
  6074.  
  6075. int       WINAPI EnumFonts( HDC , LPCSTR, OLDFONTENUMPROC, LPARAM );
  6076.  
  6077. int       WINAPI EnumFontFamilies( HDC , LPCSTR, FONTENUMPROC, LPARAM );
  6078.  
  6079. BOOL    WINAPI EnumMetaFile( HDC , HMETAFILE, MFENUMPROC, LPARAM );
  6080.  
  6081. int       WINAPI EnumObjects( HDC , int, GOBJENUMPROC, LPARAM );
  6082.  
  6083. BOOL    WINAPI EnumPrinters( DWORD, LPTSTR, DWORD, LPBYTE, DWORD, LPDWORD, LPDWORD);
  6084.  
  6085. int       WINAPI EnumProps( HWND, PROPENUMPROC );
  6086.  
  6087. int       WINAPI EnumPropsEx( HWND, PROPENUMPROCEX, LPARAM );
  6088.  
  6089. BOOL    WINAPI EnumSystemLocales( LOCALE_ENUMPROC, DWORD );
  6090.  
  6091. BOOL    WINAPI EnumThreadWindows( DWORD, WNDENUMPROC, LPARAM );
  6092.  
  6093. BOOL    WINAPI EnumWindows( WNDENUMPROC, LPARAM );
  6094.  
  6095. BOOL    WINAPI EqualRect( const RECT *, const RECT * );
  6096.  
  6097. BOOL    WINAPI EqualRgn( HRGN, HRGN );
  6098.  
  6099. int       WINAPI Escape( HDC, int, int, LPCSTR, PVOID );
  6100.  
  6101. int       WINAPI ExcludeClipRect( HDC, int, int, int, int );
  6102.  
  6103. BOOL    WINAPI ExcludeUpdateRgn( HDC, HWND );
  6104.  
  6105. VOID    WINAPI ExitProcess( UINT );
  6106.  
  6107. VOID    WINAPI ExitThread( DWORD );
  6108.  
  6109. BOOL    WINAPI ExitWindows( DWORD, UINT );
  6110.  
  6111. BOOL    WINAPI ExitWindowsEx( UINT, DWORD );
  6112.  
  6113. HPEN    WINAPI ExtCreatePen( DWORD, DWORD, const LOGBRUSH *, DWORD, const DWORD * );
  6114.  
  6115. HRGN    WINAPI ExtCreateRegion( const XFORM *, DWORD, const RGNDATA * );
  6116.  
  6117. BOOL    WINAPI ExtFloodFill( HDC, int, int, COLORREF, UINT );
  6118.  
  6119. HICON   WINAPI ExtractIcon ( HINSTANCE , LPCSTR, UINT );
  6120.  
  6121. int       WINAPI ExtSelectClipRgn( HDC, HRGN, int );
  6122.  
  6123. BOOL    WINAPI ExtTextOut( HDC, int, int, UINT, const RECT *, LPCSTR, UINT, const int * );
  6124.  
  6125. VOID    WINAPI FatalAppExit( UINT, LPCSTR );
  6126.  
  6127. VOID    WINAPI FatalExit( UINT );
  6128.  
  6129. BOOL    WINAPI FileTimeToDosDateTime( const FILETIME *, PWORD, PWORD );
  6130.  
  6131. BOOL    WINAPI FileTimeToLocalFileTime( const FILETIME *, PFILETIME );
  6132.  
  6133. BOOL    WINAPI FileTimeToSystemTime( const FILETIME *, PSYSTEMTIME );
  6134.  
  6135. BOOL    WINAPI FillPath( HDC );
  6136.  
  6137. int       WINAPI FillRect( HDC, const RECT *, HBRUSH );
  6138.  
  6139. BOOL    WINAPI FillRgn( HDC, HRGN, HBRUSH );
  6140.  
  6141. ATOM    WINAPI FindAtom( LPCSTR );
  6142.  
  6143. BOOL    WINAPI FindClose( HANDLE );
  6144.  
  6145. HANDLE  WINAPI FindFirstFile( LPCSTR, PWIN32_FIND_DATA );
  6146.  
  6147. BOOL    WINAPI FindNextFile( HANDLE, PWIN32_FIND_DATA );
  6148.  
  6149. HRSRC   WINAPI FindResource( HINSTANCE, LPCSTR, LPCSTR );
  6150.  
  6151. HWND    WINAPI FindText( PFINDREPLACE );
  6152.  
  6153. HWND    WINAPI FindWindow( LPCSTR lpClassName , LPCSTR );
  6154.  
  6155. BOOL    WINAPI FlashWindow( HWND, BOOL );
  6156.  
  6157. BOOL    WINAPI FlattenPath( HDC );
  6158.  
  6159. BOOL    WINAPI FlushFileBuffers( HANDLE );
  6160.  
  6161. int       WINAPI FrameRect( HDC, const RECT *, HBRUSH );
  6162.  
  6163. BOOL    WINAPI FrameRgn( HDC, HRGN, HBRUSH, int, int );
  6164.  
  6165. BOOL    WINAPI FreeDDElParam( UINT, LONG );
  6166.  
  6167. BOOL    WINAPI FreeLibrary( HINSTANCE );
  6168.  
  6169. UINT    WINAPI GetACP( VOID );
  6170.  
  6171. HWND    WINAPI GetActiveWindow( void);
  6172.  
  6173. int       WINAPI GetArcDirection( HDC );
  6174.  
  6175. BOOL    WINAPI GetAspectRatioFilterEx( HDC, LPSIZE );
  6176.  
  6177. SHORT   WINAPI GetAsyncKeyState( int );
  6178.  
  6179. UINT    WINAPI GetAtomName( ATOM, LPTSTR, int );
  6180.  
  6181. LONG    WINAPI GetBitmapBits( HBITMAP, LONG, PVOID );
  6182.  
  6183. BOOL    WINAPI GetBitmapDimensionEx( HBITMAP, PSIZE );
  6184.  
  6185. COLORREF WINAPI GetBkColor( HDC );
  6186.  
  6187. int       WINAPI GetBkMode( HDC );
  6188.  
  6189. UINT    WINAPI GetBoundsRect( HDC, LPRECT, UINT );
  6190.  
  6191. BOOL    WINAPI GetBrushOrgEx( HDC, LPPOINT );
  6192.  
  6193. HWND    WINAPI GetCapture( void);
  6194.  
  6195. UINT    WINAPI GetCaretBlinkTime( VOID );
  6196.  
  6197. BOOL    WINAPI GetCaretPos( PPOINT );
  6198.  
  6199. BOOL    WINAPI GetCharABCWidths( HDC, UINT, UINT, PABC );
  6200.  
  6201. BOOL    WINAPI GetCharWidth( HDC, UINT, UINT, LPINT );
  6202.  
  6203. BOOL    WINAPI GetClassInfo( HINSTANCE hInstance , LPCTSTR, LPWNDCLASS );
  6204.  
  6205. DWORD   WINAPI GetClassLong( HWND, int );
  6206.  
  6207. int       WINAPI GetClassName( HWND, LPTSTR, int );
  6208.  
  6209. WORD    WINAPI GetClassWord( HWND, int );
  6210.  
  6211. BOOL    WINAPI GetClientRect( HWND, LPRECT );
  6212.  
  6213. HANDLE  WINAPI GetClipboardData( UINT );
  6214.  
  6215. int       WINAPI GetClipboardFormatName( UINT, LPTSTR, int );
  6216.  
  6217. HWND    WINAPI GetClipboardOwner( void);
  6218.  
  6219. HWND    WINAPI GetClipboardViewer( VOID );
  6220.  
  6221. int       WINAPI GetClipBox( HDC, LPRECT );
  6222.  
  6223. BOOL    WINAPI GetClipCursor( LPRECT );
  6224.  
  6225. int       WINAPI GetClipRgn( HDC, HRGN );
  6226.  
  6227. LPTSTR   WINAPI GetCommandLine( VOID );
  6228.  
  6229. DWORD   WINAPI GetCurrentDirectory( DWORD, LPTSTR );
  6230.  
  6231. HGDIOBJ WINAPI GetCurrentObject( HDC, UINT );
  6232.  
  6233. BOOL    WINAPI GetCurrentPositionEx( HDC, LPPOINT );
  6234.  
  6235. HANDLE  WINAPI GetCurrentProcess( VOID );
  6236.  
  6237. DWORD   WINAPI GetCurrentProcessId( VOID );
  6238.  
  6239. HANDLE  WINAPI GetCurrentThread( VOID );
  6240.  
  6241. DWORD   WINAPI GetCurrentThreadId( VOID );
  6242.  
  6243. DWORD   WINAPI GetCurrentTime( VOID );
  6244.  
  6245. HCURSOR WINAPI GetCursor( VOID );
  6246.  
  6247. BOOL    WINAPI GetCursorPos( PPOINT );
  6248.  
  6249. HDC     WINAPI GetDC( HWND );
  6250.  
  6251. HDC     WINAPI GetDCEx( HWND, HRGN, DWORD );
  6252.  
  6253. BOOL    WINAPI GetDCOrgEx( HDC, LPPOINT );
  6254.  
  6255. int       WINAPI GetDIBits( HDC, HBITMAP, UINT, UINT, LPVOID, LPBITMAPINFO, UINT );
  6256.  
  6257. int       WINAPI GetDeviceCaps( HDC, int );
  6258.  
  6259. LONG    WINAPI GetDialogBaseUnits( void);
  6260.  
  6261. BOOL    WINAPI GetDiskFreeSpace( LPCTSTR, LPDWORD, LPDWORD, LPDWORD, PDWORD );
  6262.  
  6263. int       WINAPI GetDlgCtrlID( HWND );
  6264.  
  6265. HWND    WINAPI GetDlgItem( HWND, int );
  6266.  
  6267. UINT    WINAPI GetDlgItemInt( HWND, int, PBOOL, BOOL );
  6268.  
  6269. UINT    WINAPI GetDlgItemText( HWND, int, LPTSTR, int );
  6270.  
  6271. UINT    WINAPI GetDoubleClickTime( VOID );
  6272.  
  6273. UINT    WINAPI GetDriveType( LPCTSTR );
  6274.  
  6275. HENHMETAFILE WINAPI GetEnhMetaFile( LPCTSTR );
  6276.  
  6277. UINT    WINAPI GetEnhMetaFileBits( HENHMETAFILE, UINT, LPBYTE );
  6278.  
  6279. UINT    WINAPI GetEnhMetaFileHeader( HENHMETAFILE, UINT, PENHMETAHEADER );
  6280.  
  6281. UINT    WINAPI GetEnhMetaFileDescription( HENHMETAFILE, UINT, LPTSTR );
  6282.  
  6283. UINT    WINAPI GetEnhMetaFilePaletteEntries( HENHMETAFILE, UINT, PPALETTEENTRY );
  6284.  
  6285. PVOID   WINAPI GetEnvironmentStrings( VOID );
  6286.  
  6287. DWORD   WINAPI GetEnvironmentVariable(LPCTSTR, LPTSTR, DWORD );
  6288.  
  6289. BOOL    WINAPI GetExitCodeProcess( HANDLE, LPDWORD );
  6290.  
  6291. BOOL    WINAPI GetExitCodeThread( HANDLE, LPDWORD );
  6292.  
  6293. DWORD   WINAPI GetFileAttributes( LPCTSTR );
  6294.  
  6295. BOOL    WINAPI GetFileInformationByHandle( HANDLE, PBY_HANDLE_FILE_INFORMATION );
  6296.  
  6297. DWORD   WINAPI GetFileSize( HANDLE, LPDWORD );
  6298.  
  6299. BOOL    WINAPI GetFileTime( HANDLE, PFILETIME, PFILETIME, PFILETIME );
  6300.  
  6301. short     WINAPI GetFileTitle( LPCSTR, LPSTR, WORD );
  6302.  
  6303. DWORD   WINAPI GetFileType( HANDLE );
  6304.  
  6305. HWND    WINAPI GetFocus( VOID );
  6306.  
  6307. HWND    WINAPI GetForegroundWindow( VOID );
  6308.  
  6309. DWORD   WINAPI GetFullPathName( LPCSTR, DWORD, LPSTR, LPSTR * );
  6310.  
  6311. int       WINAPI GetGraphicsMode(HDC);
  6312.  
  6313. BOOL    WINAPI GetIconInfo( HICON, PICONINFO );
  6314.  
  6315. DWORD   WINAPI GetKerningPairs( HDC, DWORD, PKERNINGPAIR );
  6316.  
  6317. HKL     WINAPI GetKeyboardLayout( DWORD );
  6318.  
  6319. int       WINAPI GetKeyboardType( int );
  6320.  
  6321. BOOL    WINAPI GetKeyboardState( PBYTE );
  6322.  
  6323. BOOL    WINAPI SetKeyboardState( LPBYTE );
  6324.  
  6325. int       WINAPI GetKeyNameText( LPARAM, LPSTR, int );
  6326.  
  6327. SHORT   WINAPI GetKeyState( int );
  6328.  
  6329. HWND    WINAPI GetLastActivePopup( HWND );
  6330.  
  6331. DWORD   WINAPI GetLastError( VOID );
  6332.  
  6333. int       WINAPI GetLocaleInfo( LCID, LCTYPE, LPSTR, int );
  6334.  
  6335. VOID    WINAPI GetLocalTime( PSYSTEMTIME );
  6336.  
  6337. DWORD   WINAPI GetLogicalDriveStrings( DWORD, LPSTR );
  6338.  
  6339. DWORD   WINAPI GetLogicalDrives( VOID );
  6340.  
  6341. int       WINAPI GetMapMode( HDC);
  6342.  
  6343. HMENU   WINAPI GetMenu( HWND );
  6344.  
  6345. LONG    WINAPI GetMenuCheckMarkDimensions(void);
  6346.  
  6347. DWORD   WINAPI GetMenuContextHelpId( HMENU);
  6348.  
  6349. int       WINAPI GetMenuItemCount( HMENU );
  6350.  
  6351. UINT    WINAPI GetMenuItemID( HMENU, int );
  6352.  
  6353. UINT    WINAPI GetMenuState( HMENU, UINT, UINT );
  6354.  
  6355. int       WINAPI GetMenuString( HMENU, UINT, LPSTR, int, UINT );
  6356.  
  6357. BOOL    WINAPI GetMessage( LPMSG, HWND hwnd , UINT, UINT );
  6358.  
  6359. LONG    WINAPI GetMessageExtraInfo( VOID );
  6360.  
  6361. DWORD   WINAPI GetMessagePos( VOID );
  6362.  
  6363. LONG    WINAPI GetMessageTime( VOID );
  6364.  
  6365. HMETAFILE WINAPI GetMetaFile( LPCTSTR );
  6366.  
  6367. UINT    WINAPI GetMetaFileBitsEx( HMETAFILE, UINT, LPVOID );
  6368.  
  6369. BOOL    WINAPI GetMiterLimit( HDC, PFLOAT);
  6370.  
  6371. DWORD   WINAPI GetModuleFileName( HMODULE, LPTSTR, DWORD );
  6372.  
  6373. HMODULE WINAPI GetModuleHandle( LPCTSTR );
  6374.  
  6375. COLORREF WINAPI GetNearestColor( HDC, COLORREF );
  6376.  
  6377. UINT    WINAPI GetNearestPaletteIndex( HPALETTE, COLORREF );
  6378.  
  6379. HWND    WINAPI GetNextDlgGroupItem( HWND, HWND, BOOL );
  6380.  
  6381. HWND    WINAPI GetNextDlgTabItem( HWND, HWND, BOOL );
  6382.  
  6383. HWND    WINAPI GetNextWindow( HWND, UINT );
  6384.  
  6385. UINT    WINAPI GetOEMCP( VOID );
  6386.  
  6387. int       WINAPI GetObject( HGDIOBJ, int, void * );
  6388.  
  6389. DWORD   WINAPI GetObjectType( HGDIOBJ );
  6390.  
  6391. HWND    WINAPI GetOpenClipboardWindow( VOID );
  6392.  
  6393. BOOL    WINAPI GetOpenFileName( POPENFILENAME );
  6394.  
  6395. UINT    WINAPI GetOutlineTextMetrics( HDC, UINT, POUTLINETEXTMETRIC );
  6396.  
  6397. BOOL    WINAPI GetOverlappedResult(HANDLE, LPOVERLAPPED, LPDWORD, BOOL );
  6398.  
  6399. UINT    WINAPI GetPaletteEntries( HPALETTE, UINT, UINT, PPALETTEENTRY );
  6400.  
  6401. HWND    WINAPI GetParent( HWND );
  6402.  
  6403. UINT    WINAPI GetPath( HDC, LPPOINT, LPBYTE, int );
  6404.  
  6405. COLORREF WINAPI GetPixel( HDC, int, int );
  6406.  
  6407. int       WINAPI GetPolyFillMode( HDC);
  6408.  
  6409. DWORD   WINAPI GetPriorityClass( HANDLE );
  6410.  
  6411. int       WINAPI GetPriorityClipboardFormat( PUINT, int );
  6412.  
  6413. UINT    WINAPI GetPrivateProfileInt( LPCTSTR, LPCTSTR, INT, LPCTSTR );
  6414.  
  6415. DWORD   WINAPI GetPrivateProfileString( LPCTSTR, LPCTSTR, LPCTSTR, LPTSTR, DWORD, LPCTSTR );
  6416.  
  6417. FARPROC WINAPI GetProcAddress( HMODULE, LPCSTR );
  6418.  
  6419. UINT    WINAPI GetProfileInt( LPCTSTR, LPCTSTR, INT );
  6420.  
  6421. DWORD   WINAPI GetProfileString( LPCTSTR, LPCTSTR, LPCTSTR, LPTSTR, DWORD );
  6422.  
  6423. HANDLE  WINAPI GetProp( HWND, LPCSTR );
  6424.  
  6425. DWORD   WINAPI GetQueueStatus( UINT );
  6426.  
  6427. int       WINAPI GetROP2( HDC );
  6428.  
  6429. BOOL    WINAPI GetRasterizerCaps( PRASTERIZER_STATUS, UINT );
  6430.  
  6431. int       WINAPI GetRgnBox( HRGN, PRECT );
  6432.  
  6433. DWORD   WINAPI GetRegionData( HRGN, DWORD, PRGNDATA );
  6434.  
  6435. BOOL    WINAPI GetSaveFileName( POPENFILENAME );
  6436.  
  6437. int       WINAPI GetScrollPos( HWND, int );
  6438.  
  6439. BOOL    WINAPI GetScrollRange( HWND, int, LPINT, LPINT );
  6440.  
  6441. HANDLE  WINAPI GetStdHandle( DWORD );
  6442.  
  6443. HGDIOBJ WINAPI GetStockObject( int );
  6444.  
  6445. int       WINAPI GetStretchBltMode( HDC );
  6446.  
  6447. BOOL    WINAPI GetStringTypeEx( LCID, DWORD, LPCSTR, int, LPWORD );
  6448.  
  6449. HMENU   WINAPI GetSubMenu( HWND, int );
  6450.  
  6451. DWORD   WINAPI GetSysColor( int );
  6452.  
  6453. UINT    WINAPI GetSystemDirectory( LPSTR, UINT );
  6454.  
  6455. HMENU   WINAPI GetSystemMenu( HWND, BOOL );
  6456.  
  6457. int       WINAPI GetSystemMetrics( int );
  6458.  
  6459. UINT    WINAPI GetSystemPaletteEntries( HDC, UINT, UINT, PPALETTEENTRY );
  6460.  
  6461. void      WINAPI GetSystemTime( PSYSTEMTIME );
  6462.  
  6463. DWORD   WINAPI GetTabbedTextExtent( HDC, LPCSTR, int, int, int * );
  6464.  
  6465. UINT    WINAPI GetTempFileName( LPCSTR, LPCSTR, UINT, LPSTR );
  6466.  
  6467. DWORD   WINAPI GetTempPath( DWORD, LPSTR );
  6468.  
  6469. UINT    WINAPI GetTextAlign( HDC);
  6470.  
  6471. int       WINAPI GetTextCharacterExtra( HDC);
  6472.  
  6473. COLORREF WINAPI GetTextColor( HDC );
  6474.  
  6475. BOOL    WINAPI GetTextExtentExPoint( HDC, LPCTSTR, INT, INT, LPINT, LPINT, LPSIZE );
  6476.  
  6477. BOOL    WINAPI GetTextExtentPoint( HDC, LPCTSTR, int, LPSIZE );
  6478.  
  6479. BOOL    WINAPI GetTextExtentPoint32( HDC, LPCTSTR, int, LPSIZE );
  6480.  
  6481. int       WINAPI GetTextFace( HDC, int, LPSTR );
  6482.  
  6483. BOOL    WINAPI GetTextMetrics( HDC, LPTEXTMETRIC );
  6484.  
  6485. LCID    WINAPI GetThreadLocale( void );
  6486.  
  6487. DWORD   WINAPI GetThreadPriority( HANDLE );
  6488.  
  6489. DWORD   WINAPI GetTickCount( VOID );
  6490.  
  6491. DWORD   WINAPI GetTimeZoneInformation( PTIME_ZONE_INFORMATION );
  6492.  
  6493. HWND    WINAPI GetTopWindow( HWND );
  6494.  
  6495. BOOL    WINAPI GetUpdateRect( HWND, LPRECT, BOOL );
  6496.  
  6497. int       WINAPI GetUpdateRgn( HWND, HRGN, BOOL );
  6498.  
  6499. LCID    WINAPI GetUserDefaultLCID( void );
  6500.  
  6501. LANGID  WINAPI GetUserDefaultLangID( void );
  6502.  
  6503. DWORD   WINAPI GetVersion( VOID );
  6504.  
  6505. BOOL    WINAPI GetVersionEx( LPOSVERSIONINFO );
  6506.  
  6507. BOOL    WINAPI GetViewportExtEx( HDC, LPSIZE );
  6508.  
  6509. BOOL    WINAPI GetViewportOrgEx( HDC, LPPOINT );
  6510.  
  6511. BOOL    WINAPI GetVolumeInformation( LPCSTR, LPSTR, DWORD, PDWORD,
  6512.                        PDWORD, PDWORD, LPSTR, DWORD );
  6513.  
  6514. UINT    WINAPI GetWinMetaFileBits( HENHMETAFILE, UINT, PBYTE, int, HDC);
  6515.  
  6516. HWND    WINAPI GetWindow( HWND, UINT );
  6517.  
  6518. HDC     WINAPI GetWindowDC( HWND );
  6519.  
  6520. BOOL    WINAPI GetWindowExtEx( HDC, PSIZE );
  6521.  
  6522. LONG    WINAPI GetWindowLong( HWND, int );
  6523.  
  6524. BOOL    WINAPI GetWindowOrgEx( HDC, LPPOINT );
  6525.  
  6526. BOOL    WINAPI GetWindowPlacement( HWND, PWINDOWPLACEMENT );
  6527.  
  6528. BOOL    WINAPI GetWindowRect( HWND, LPRECT );
  6529.  
  6530. UINT    WINAPI GetWindowsDirectory( LPSTR, UINT );
  6531.  
  6532. int       WINAPI GetWindowText( HWND, LPSTR, int );
  6533.  
  6534. int       WINAPI GetWindowTextLength( HWND );
  6535.  
  6536. DWORD   WINAPI GetWindowThreadProcessId(HWND, PDWORD );
  6537.  
  6538. WORD    WINAPI GetWindowWord( HWND, int );
  6539.  
  6540. BOOL    WINAPI GetWorldTransform( HDC, LPXFORM );
  6541.  
  6542. ATOM    WINAPI GlobalAddAtom( LPCTSTR );
  6543.  
  6544. HGLOBAL WINAPI GlobalAlloc( UINT, DWORD );
  6545.  
  6546. ATOM    WINAPI GlobalDeleteAtom( ATOM );
  6547.  
  6548. HGLOBAL WINAPI GlobalDiscard( HGLOBAL );
  6549.  
  6550. ATOM    WINAPI GlobalFindAtom( LPCSTR );
  6551.  
  6552. UINT    WINAPI GlobalFlags( HGLOBAL );
  6553.  
  6554. HGLOBAL WINAPI GlobalFree( HGLOBAL );
  6555.  
  6556. UINT    WINAPI GlobalGetAtomName( ATOM, LPSTR, int );
  6557.  
  6558. HGLOBAL WINAPI GlobalHandle( PVOID memPtr );
  6559.  
  6560. PVOID   WINAPI GlobalLock( HGLOBAL hglbMem );
  6561.  
  6562. VOID    WINAPI GlobalMemoryStatus( PMEMORYSTATUS );
  6563.  
  6564. HGLOBAL WINAPI GlobalReAlloc( HGLOBAL, DWORD, UINT );
  6565.  
  6566. DWORD   WINAPI GlobalSize( HGLOBAL );
  6567.  
  6568. BOOL    WINAPI GlobalUnlock( HGLOBAL hglbMem );
  6569.  
  6570. LPVOID  WINAPI HeapAlloc( HANDLE, DWORD, DWORD );
  6571.  
  6572. HANDLE  WINAPI HeapCreate( DWORD, DWORD, DWORD );
  6573.  
  6574. BOOL    WINAPI HeapDestroy( HANDLE );
  6575.  
  6576. BOOL    WINAPI HeapFree( HANDLE, DWORD, PVOID );
  6577.  
  6578. LPVOID  WINAPI HeapReAlloc( HANDLE, DWORD, LPVOID, DWORD );
  6579.  
  6580. DWORD   WINAPI HeapSize( HANDLE, DWORD, LPCVOID );
  6581.  
  6582. BOOL    WINAPI HideCaret( HWND );
  6583.  
  6584. BOOL    WINAPI HiliteMenuItem( HWND, HMENU, UINT, UINT );
  6585.  
  6586. HDC     WINAPI HPSToHDC( HWND, HDC, LPCSTR, LPRECT );
  6587.  
  6588. BOOL    WINAPI InflateRect( LPRECT, int, int );
  6589.  
  6590. BOOL    WINAPI InSendMessage( VOID );
  6591.  
  6592. BOOL    WINAPI InitAtomTable( DWORD );
  6593.  
  6594. VOID    WINAPI InitializeCriticalSection( PCRITICAL_SECTION );
  6595.  
  6596. BOOL    WINAPI InsertMenu( HMENU, UINT, UINT, UINT, LPCTSTR );
  6597.  
  6598. LONG    WINAPI InterlockedDecrement( PLONG );
  6599.  
  6600. LONG    WINAPI InterlockedExchange( PLONG, LONG );
  6601.  
  6602. LONG    WINAPI InterlockedIncrement( PLONG );
  6603.  
  6604. int       WINAPI IntersectClipRect( HDC, int, int, int, int );
  6605.  
  6606. BOOL    WINAPI IntersectRect( LPRECT, const RECT *, const RECT *);
  6607.  
  6608. BOOL    WINAPI InvalidateRect( HWND, const RECT *, BOOL );
  6609.  
  6610. BOOL    WINAPI InvalidateRgn( HWND, HRGN, BOOL );
  6611.  
  6612. BOOL    WINAPI InvertRect( HDC, const RECT *);
  6613.  
  6614. BOOL    WINAPI InvertRgn( HDC, HRGN );
  6615.  
  6616. BOOL    WINAPI IsBadCodePtr( FARPROC );
  6617.  
  6618. BOOL    WINAPI IsBadHugeReadPtr( const VOID *, UINT );
  6619.  
  6620. BOOL    WINAPI IsBadHugeWritePtr( LPVOID, UINT );
  6621.  
  6622. BOOL    WINAPI IsBadReadPtr( const VOID *, UINT );
  6623.  
  6624. BOOL    WINAPI IsBadStringPtr( LPCTSTR, UINT );
  6625.  
  6626. BOOL    WINAPI IsBadWritePtr( LPVOID, UINT );
  6627.  
  6628. BOOL    WINAPI IsChild( HWND, HWND );
  6629.  
  6630. BOOL    WINAPI IsClipboardFormatAvailable( UINT );
  6631.  
  6632. BOOL    WINAPI IsDBCSLeadByte( BYTE );
  6633.  
  6634. BOOL    WINAPI IsDialogMessage( HWND, LPMSG );
  6635.  
  6636. UINT    WINAPI IsDlgButtonChecked( HWND, int );
  6637.  
  6638. BOOL    WINAPI IsIconic( HWND );
  6639.  
  6640. BOOL    WINAPI IsMenu( HMENU );
  6641.  
  6642. BOOL    WINAPI IsRectEmpty( const RECT *);
  6643.  
  6644. BOOL    WINAPI IsValidLocale( LCID, DWORD );
  6645.  
  6646. BOOL    WINAPI IsWindow( HWND );
  6647.  
  6648. BOOL    WINAPI IsWindowEnabled( HWND );
  6649.  
  6650. BOOL    WINAPI IsWindowVisible( HWND );
  6651.  
  6652. BOOL    WINAPI IsZoomed( HWND );
  6653.  
  6654. BOOL    WINAPI KillTimer(HWND, UINT );
  6655.  
  6656. BOOL    WINAPI LPtoDP( HDC, LPPOINT, int );
  6657.  
  6658. VOID    WINAPI LeaveCriticalSection( PCRITICAL_SECTION );
  6659.  
  6660. BOOL    WINAPI LineDDA( int, int, int, int, LINEDDAPROC, LPARAM );
  6661.  
  6662. BOOL    WINAPI LineTo( HDC, int, int );
  6663.  
  6664. HACCEL  WINAPI LoadAccelerators( HINSTANCE, LPCSTR );
  6665.  
  6666. HBITMAP WINAPI LoadBitmap( HINSTANCE, LPCSTR );
  6667.  
  6668. HCURSOR WINAPI LoadCursor( HINSTANCE, LPCSTR );
  6669.  
  6670. HICON   WINAPI LoadIcon( HINSTANCE, LPCSTR );
  6671.  
  6672. HINSTANCE WINAPI LoadLibrary( LPCSTR );
  6673.  
  6674. HMENU   WINAPI LoadMenu( HINSTANCE, LPCSTR );
  6675.  
  6676. HMENU   WINAPI LoadMenuIndirect( const MENUITEMTEMPLATEHEADER * );
  6677.  
  6678. DWORD   WINAPI LoadModule( LPCSTR, PVOID );
  6679.  
  6680. HGLOBAL WINAPI LoadResource( HINSTANCE, HRSRC );
  6681.  
  6682. PVOID   WINAPI LockResource( HGLOBAL );
  6683.  
  6684. int       WINAPI LoadString( HINSTANCE, UINT, LPSTR, int );
  6685.  
  6686. HLOCAL  WINAPI LocalAlloc( UINT, UINT );
  6687.  
  6688. HLOCAL  WINAPI LocalDiscard( HLOCAL );
  6689.  
  6690. UINT    WINAPI LocalFlags( HLOCAL );
  6691.  
  6692. BOOL    WINAPI LocalFileTimeToFileTime( const FILETIME *, PFILETIME );
  6693.  
  6694. HLOCAL  WINAPI LocalFree( HLOCAL );
  6695.  
  6696. HLOCAL  WINAPI LocalHandle( LPCVOID );
  6697.  
  6698. LPVOID  WINAPI LocalLock( HLOCAL );
  6699.  
  6700. HLOCAL  WINAPI LocalReAlloc( HLOCAL, UINT, UINT );
  6701.  
  6702. UINT    WINAPI LocalSize( HLOCAL );
  6703.  
  6704. BOOL    WINAPI LocalUnlock( HLOCAL hlocal);
  6705.  
  6706. BOOL    WINAPI LockFile( HANDLE, DWORD, DWORD, DWORD, DWORD );
  6707.  
  6708. BOOL    WINAPI LockWindowUpdate( HWND );
  6709.  
  6710. BOOL    WINAPI MapDialogRect( HWND, LPRECT );
  6711.  
  6712. UINT    WINAPI MapVirtualKey( UINT, UINT );
  6713.  
  6714. int       WINAPI MapWindowPoints( HWND, HWND, PPOINT, int );
  6715.  
  6716. BOOL    WINAPI MaskBlt( HDC, int, int, int, int, HDC, int, int, HBITMAP, int, int, DWORD );
  6717.  
  6718. int       WINAPI MessageBox( HWND hwnd , LPCSTR, LPCSTR, UINT );
  6719.  
  6720. BOOL    WINAPI MessageBeep( UINT );
  6721.  
  6722. DWORD   WINAPI MsgWaitForMultipleObjects( DWORD, LPHANDLE, BOOL, DWORD, DWORD );
  6723.  
  6724. BOOL    WINAPI ModifyMenu( HMENU, UINT, UINT, UINT, LPCTSTR );
  6725.  
  6726. BOOL    WINAPI ModifyWorldTransform( HDC, const XFORM *, DWORD );
  6727.  
  6728. BOOL    WINAPI MoveFile( LPCTSTR, LPCTSTR );
  6729.  
  6730. BOOL    WINAPI MoveToEx( HDC, int, int, LPPOINT );
  6731.  
  6732. BOOL    WINAPI MoveWindow( HWND, int, int, int, int, BOOL );
  6733.  
  6734. int       WINAPI MulDiv(int, int, int );
  6735.  
  6736. int       WINAPI MultiByteToWideChar( UINT, DWORD, LPCSTR, int, LPWSTR, int );
  6737.  
  6738. int       WINAPI OffsetClipRgn( HDC, int, int );
  6739.  
  6740. BOOL    WINAPI OffsetRect( LPRECT, int, int );
  6741.  
  6742. int       WINAPI OffsetRgn( HRGN, int, int );
  6743.  
  6744. BOOL    WINAPI OffsetViewportOrgEx( HDC, int, int, LPPOINT );
  6745.  
  6746. BOOL    WINAPI OffsetWindowOrgEx( HDC, int, int, LPPOINT );
  6747.  
  6748. BOOL    WINAPI OpenClipboard( HWND );
  6749.  
  6750. HANDLE  WINAPI OpenEvent( DWORD, BOOL, LPCTSTR );
  6751.  
  6752. HFILE   WINAPI OpenFile( LPCSTR, POFSTRUCT, UINT );
  6753.  
  6754. HANDLE  WINAPI OpenMutex( DWORD, BOOL, LPCTSTR );
  6755.  
  6756. HANDLE  WINAPI OpenProcess( DWORD, BOOL, DWORD );
  6757.  
  6758. HANDLE  WINAPI OpenSemaphore( DWORD, BOOL, LPCTSTR );
  6759.  
  6760. VOID    WINAPI OutputDebugString( LPCSTR );
  6761.  
  6762. LONG    WINAPI PackDDElParam(UINT, UINT, UINT );
  6763.  
  6764. BOOL    WINAPI PaintRgn( HDC, HRGN );
  6765.  
  6766. BOOL    WINAPI PatBlt( HDC, int, int, int, int, DWORD );
  6767.  
  6768. HRGN    WINAPI PathToRegion( HDC);
  6769.  
  6770. BOOL    WINAPI PeekMessage( LPMSG, HWND, UINT, UINT, UINT );
  6771.  
  6772. BOOL    WINAPI Pie( HDC, int, int, int, int, int, int, int, int );
  6773.  
  6774. BOOL    WINAPI PlayEnhMetaFile( HDC, HENHMETAFILE, const RECT * );
  6775.  
  6776. BOOL    WINAPI PlayEnhMetaFileRecord( HDC, LPHANDLETABLE, const ENHMETARECORD *, UINT );
  6777.  
  6778. BOOL    WINAPI PlayMetaFile( HDC, HMETAFILE );
  6779.  
  6780. BOOL    WINAPI PlayMetaFileRecord( HDC, LPHANDLETABLE, LPMETARECORD, UINT );
  6781.  
  6782. BOOL    WINAPI PolyBezier( HDC, const POINT *, DWORD );
  6783.  
  6784. BOOL    WINAPI PolyBezierTo( HDC, const POINT *, DWORD );
  6785.  
  6786. BOOL    WINAPI PolyDraw( HDC, const POINT *, const BYTE *, int );
  6787.  
  6788. BOOL    WINAPI Polygon( HDC, const POINT *, int );
  6789.  
  6790. BOOL    WINAPI Polyline( HDC, const POINT *, int );
  6791.  
  6792. BOOL    WINAPI PolylineTo( HDC, const POINT *, DWORD );
  6793.  
  6794. BOOL    WINAPI PolyPolygon( HDC, const POINT *, LPINT, int );
  6795.  
  6796. BOOL    WINAPI PolyPolyline( HDC, const POINT *, const DWORD *, DWORD );
  6797.  
  6798. VOID    WINAPI PostQuitMessage( int );
  6799.  
  6800. BOOL    WINAPI PostMessage( HWND, UINT, WPARAM mp1, LPARAM mp2 );
  6801.  
  6802. BOOL    WINAPI PostThreadMessage( DWORD, UINT, WPARAM, LPARAM );
  6803.  
  6804. BOOL    WINAPI PtInRect( const RECT *, POINT );
  6805.  
  6806. BOOL    WINAPI PtInRegion( HRGN, int, int );
  6807.  
  6808. BOOL    WINAPI PtVisible( HDC, int, int );
  6809.  
  6810. BOOL    WINAPI PrintDlg( PPRINTDLG );
  6811.  
  6812. BOOL    WINAPI PulseEvent ( HANDLE );
  6813.  
  6814. BOOL    WINAPI ReadFile( HANDLE, LPVOID, DWORD, LPDWORD, LPOVERLAPPED );
  6815.  
  6816. UINT    WINAPI RealizePalette( HDC);
  6817.  
  6818. BOOL    WINAPI RectInRegion( HRGN, const RECT * );
  6819.  
  6820. BOOL    WINAPI RectVisible( HDC, const RECT *);
  6821.  
  6822. BOOL    WINAPI Rectangle( HDC, int, int, int, int );
  6823.  
  6824. BOOL    WINAPI RedrawWindow( HWND, const RECT *, HRGN, DWORD );
  6825.  
  6826. LONG    WINAPI   RegCloseKey( HKEY );
  6827.  
  6828. LONG    WINAPI    RegCreateKey( HKEY, LPCTSTR, PHKEY );
  6829.  
  6830. LONG    WINAPI    RegCreateKeyEx( HKEY, LPCTSTR, DWORD, LPSTR, DWORD, REGSAM, LPSECURITY_ATTRIBUTES, PHKEY, PDWORD );
  6831.  
  6832. LONG    WINAPI    RegDeleteKey( HKEY, LPCTSTR );
  6833.  
  6834. LONG    WINAPI    RegDeleteValue( HKEY, LPSTR );
  6835.  
  6836. LONG    WINAPI   RegEnumKey( HKEY, DWORD, LPSTR, DWORD );
  6837.  
  6838. LONG    WINAPI   RegEnumKeyEx( HKEY, DWORD, LPSTR, PDWORD, PDWORD, LPSTR, PDWORD, PFILETIME );
  6839.  
  6840. LONG    WINAPI   RegEnumValue( HKEY, DWORD, LPSTR, PDWORD, PDWORD, PDWORD, LPBYTE, PDWORD );
  6841.  
  6842. LONG    WINAPI   RegFlushKey( HKEY );
  6843.  
  6844. LONG    WINAPI   RegOpenKey( HKEY, LPCTSTR, PHKEY );
  6845.  
  6846. LONG    WINAPI   RegOpenKeyEx( HKEY, LPCTSTR, DWORD, REGSAM, PHKEY );
  6847.  
  6848. LONG    WINAPI   RegQueryInfoKey( HKEY, LPSTR, PDWORD, PDWORD, PDWORD, PDWORD,
  6849.                                       PDWORD, PDWORD, PDWORD, PDWORD, PDWORD, PFILETIME );
  6850.  
  6851. LONG    WINAPI   RegQueryValue( HKEY, LPCSTR, LPSTR, PLONG );
  6852.  
  6853. LONG    WINAPI   RegQueryValueEx( HKEY, LPCSTR, LPDWORD, LPDWORD, LPBYTE, LPDWORD );
  6854.  
  6855. LONG    WINAPI   RegSetValue( HKEY, LPCTSTR, DWORD, LPCTSTR, DWORD );
  6856.  
  6857. LONG    WINAPI   RegSetValueEx( HKEY, LPCTSTR, DWORD, DWORD, const BYTE *, DWORD );
  6858.  
  6859. WORD    WINAPI RegisterClass( const WNDCLASS *);
  6860.  
  6861. UINT    WINAPI RegisterClipboardFormat( LPCSTR );
  6862.  
  6863. UINT    WINAPI RegisterWindowMessage( LPCSTR );
  6864.  
  6865. BOOL    WINAPI ReleaseCapture( void );
  6866.  
  6867. int       WINAPI ReleaseDC( HWND, HDC );
  6868.  
  6869. BOOL    WINAPI ReleaseMutex( HANDLE );
  6870.  
  6871. BOOL    WINAPI ReleaseSemaphore( HANDLE, LONG, LPLONG );
  6872.  
  6873. BOOL    WINAPI RemoveDirectory( LPCTSTR );
  6874.  
  6875. BOOL    WINAPI RemoveFontResource( LPCSTR );
  6876.  
  6877. BOOL    WINAPI RemoveMenu( HMENU, UINT, UINT );
  6878.  
  6879. HANDLE  WINAPI RemoveProp( HWND, LPCSTR );
  6880.  
  6881. HWND    WINAPI ReplaceText( PFINDREPLACE );
  6882.  
  6883. BOOL    WINAPI ReplyMessage( LRESULT );
  6884.  
  6885. BOOL    WINAPI ResetDC( HDC, const DEVMODE * );
  6886.  
  6887. BOOL    WINAPI ResetEvent( HANDLE );
  6888.  
  6889. BOOL    WINAPI ResizePalette( HPALETTE, UINT );
  6890.  
  6891. BOOL    WINAPI RestoreDC( HDC, int );
  6892.  
  6893. DWORD   WINAPI ResumeThread( HANDLE );
  6894.  
  6895. LONG    WINAPI ReuseDDElParam( LONG, UINT, UINT, UINT, UINT );
  6896.  
  6897. BOOL    WINAPI RoundRect( HDC, int, int, int, int, int, int );
  6898.  
  6899. int       WINAPI SaveDC( HDC );
  6900.  
  6901. BOOL    WINAPI ScaleViewportExtEx( HDC, int, int, int, int, LPSIZE );
  6902.  
  6903. BOOL    WINAPI ScaleWindowExtEx( HDC, int, int, int, int, LPSIZE );
  6904.  
  6905. BOOL    WINAPI ScreenToClient( HWND, LPPOINT );
  6906.  
  6907. BOOL    WINAPI ScrollDC( HDC, int, int, const RECT *, const RECT *, HRGN, LPRECT );
  6908.  
  6909. BOOL    WINAPI ScrollWindow( HWND, int, int, const RECT *, const RECT * );
  6910.  
  6911. int       WINAPI ScrollWindowEx( HWND, int, int, const RECT *, const RECT *, HRGN, LPRECT, UINT );
  6912.  
  6913. DWORD   WINAPI SearchPath( LPCSTR, LPCSTR, LPCSTR, DWORD, LPSTR, LPSTR *);
  6914.  
  6915. BOOL    WINAPI SelectClipPath( HDC, int );
  6916.  
  6917. int       WINAPI SelectClipRgn( HDC, HRGN );
  6918.  
  6919. HGDIOBJ WINAPI SelectObject( HDC, HGDIOBJ );
  6920.  
  6921. HPALETTE WINAPI SelectPalette( HDC, HPALETTE, BOOL );
  6922.  
  6923. LONG    WINAPI SendDlgItemMessage( HWND, int, UINT, WPARAM, LPARAM );
  6924.  
  6925. LRESULT WINAPI SendMessage( HWND, UINT, WPARAM mp1, LPARAM mp2 );
  6926.  
  6927. int       WINAPI SetAbortProc( HDC, ABORTPROC );
  6928.  
  6929. HWND    WINAPI SetActiveWindow( HWND );
  6930.  
  6931. int       WINAPI SetArcDirection( HDC, int );
  6932.  
  6933. LONG    WINAPI SetBitmapBits( HBITMAP, DWORD, const VOID * );
  6934.  
  6935. BOOL    WINAPI SetBitmapDimensionEx( HBITMAP, int, int, LPSIZE );
  6936.  
  6937. COLORREF WINAPI SetBkColor( HDC, COLORREF );
  6938.  
  6939. int       WINAPI SetBkMode( HDC, int );
  6940.  
  6941. LONG    WINAPI SetBoundsRect( HDC, const RECT *, UINT );
  6942.  
  6943. BOOL    WINAPI SetBrushOrgEx( HDC, int, int, LPPOINT );
  6944.  
  6945. HWND    WINAPI SetCapture( HWND );
  6946.  
  6947. BOOL    WINAPI SetCaretBlinkTime( UINT );
  6948.  
  6949. BOOL    WINAPI SetCaretPos( int, int );
  6950.  
  6951. DWORD   WINAPI SetClassLong( HWND, int, LONG );
  6952.  
  6953. WORD    WINAPI SetClassWord( HWND, int, WORD );
  6954.  
  6955. HANDLE  WINAPI SetClipboardData( UINT, HANDLE );
  6956.  
  6957. HWND    WINAPI SetClipboardViewer( HWND );
  6958.  
  6959. BOOL    WINAPI SetCurrentDirectory(  LPCTSTR );
  6960.  
  6961. HCURSOR WINAPI SetCursor( HCURSOR );
  6962.  
  6963. BOOL    WINAPI SetCursorPos( int, int );
  6964.  
  6965. int       WINAPI SetDIBits( HDC, HBITMAP, UINT, UINT, const VOID *, const BITMAPINFO *, UINT );
  6966.  
  6967. int       WINAPI SetDIBitsToDevice( HDC, int, int, int, int, int, int, UINT, UINT, PVOID, PBITMAPINFO, UINT );
  6968.  
  6969. BOOL    WINAPI SetDlgItemInt( HWND, int, UINT, BOOL );
  6970.  
  6971. BOOL    WINAPI SetDlgItemText( HWND, int, LPCTSTR );
  6972.  
  6973. BOOL    WINAPI SetDoubleClickTime( UINT );
  6974.  
  6975. BOOL    WINAPI SetEndOfFile( HANDLE );
  6976.  
  6977. HENHMETAFILE WINAPI SetEnhMetaFileBits( UINT, const BYTE * );
  6978.  
  6979. BOOL    WINAPI SetEnvironmentVariable( LPCTSTR, LPCTSTR );
  6980.  
  6981. BOOL    WINAPI SetEvent( HANDLE );
  6982.  
  6983. BOOL    WINAPI SetFileAttributes( LPCTSTR, DWORD );
  6984.  
  6985. DWORD   WINAPI SetFilePointer( HANDLE, LONG, PLONG, DWORD );
  6986.  
  6987. BOOL    WINAPI SetFileTime( HANDLE, const FILETIME *, const FILETIME *, const FILETIME * );
  6988.  
  6989. HWND    WINAPI SetFocus( HWND );
  6990.  
  6991. BOOL    WINAPI SetForegroundWindow( HWND );
  6992.  
  6993. int       WINAPI SetGraphicsMode(HDC, int );
  6994.  
  6995. UINT    WINAPI SetHandleCount( UINT );
  6996.  
  6997. VOID    WINAPI SetLastError( DWORD );
  6998.  
  6999. BOOL    WINAPI SetLocaleInfo( LCID, LCTYPE, LPCSTR );
  7000.  
  7001. BOOL    WINAPI SetLocalTime( const SYSTEMTIME * );
  7002.  
  7003. int       WINAPI SetMapMode( HDC, int );
  7004.  
  7005. DWORD   WINAPI SetMapperFlags( HDC, DWORD );
  7006.  
  7007. BOOL    WINAPI SetMenu( HWND, HMENU );
  7008.  
  7009. BOOL    WINAPI SetMenuContextHelpId( HMENU, DWORD);
  7010.  
  7011. BOOL    WINAPI SetMenuItemBitmaps( HMENU, UINT, UINT, HBITMAP, HBITMAP );
  7012.  
  7013. HMETAFILE WINAPI SetMetaFileBitsEx( UINT, PBYTE );
  7014.  
  7015. BOOL    WINAPI SetMiterLimit( HDC, FLOAT, PFLOAT );
  7016.  
  7017. UINT    WINAPI SetPaletteEntries( HPALETTE, UINT, UINT, const PALETTEENTRY *);
  7018.  
  7019. HWND    WINAPI SetParent( HWND, HWND );
  7020.  
  7021. COLORREF
  7022.           WINAPI SetPixel( HDC, int, int, COLORREF );
  7023.  
  7024. int       WINAPI SetPolyFillMode( HDC, int );
  7025.  
  7026. BOOL    WINAPI SetPriorityClass( HANDLE, DWORD );
  7027.  
  7028. BOOL    WINAPI SetProp( HWND, LPCSTR, HANDLE );
  7029.  
  7030. BOOL    WINAPI SetRect( LPRECT, int, int, int, int );
  7031.  
  7032. BOOL    WINAPI SetRectEmpty( LPRECT );
  7033.  
  7034. BOOL    WINAPI SetRectRgn( HRGN, int, int, int, int );
  7035.  
  7036. int       WINAPI SetROP2( HDC, int );
  7037.  
  7038. int       WINAPI SetScrollPos( HWND, int, int, BOOL );
  7039.  
  7040. BOOL    WINAPI SetScrollRange( HWND, int, int, int, BOOL );
  7041.  
  7042. BOOL    WINAPI SetStdHandle( DWORD, HANDLE );
  7043.  
  7044. int       WINAPI SetStretchBltMode( HDC, int );
  7045.  
  7046. BOOL    WINAPI SetSysColors( int, const INT *, const COLORREF * );
  7047.  
  7048. BOOL    WINAPI SetSystemTime( const SYSTEMTIME * );
  7049.  
  7050. BOOL    WINAPI SetTimeZoneInformation( const TIME_ZONE_INFORMATION * );
  7051.  
  7052. UINT    WINAPI SetTextAlign( HDC, UINT );
  7053.  
  7054. int       WINAPI SetTextCharacterExtra( HDC, int );
  7055.  
  7056. COLORREF WINAPI SetTextColor( HDC, COLORREF );
  7057.  
  7058. BOOL    WINAPI SetTextJustification( HDC, int, int );
  7059.  
  7060. BOOL    WINAPI SetThreadPriority( HANDLE, int );
  7061.  
  7062. UINT    WINAPI SetTimer( HWND, UINT, UINT, TIMERPROC );
  7063.  
  7064. BOOL    WINAPI SetViewportExtEx( HDC, int, int, LPSIZE );
  7065.  
  7066. BOOL    WINAPI SetViewportOrgEx( HDC, int, int, LPPOINT );
  7067.  
  7068. BOOL    WINAPI SetVolumeLabel( LPCTSTR, LPCTSTR );
  7069.  
  7070. BOOL    WINAPI SetWindowExtEx( HDC, int, int, LPSIZE );
  7071.  
  7072. LONG    WINAPI SetWindowLong( HWND, int, LONG );
  7073.  
  7074. BOOL    WINAPI SetWindowOrgEx( HDC, int, int, LPPOINT );
  7075.  
  7076. BOOL    WINAPI SetWindowPlacement( HWND, const WINDOWPLACEMENT * );
  7077.  
  7078. BOOL    WINAPI SetWindowPos( HWND, HWND, int, int, int, int, UINT );
  7079.  
  7080. HHOOK   WINAPI SetWindowsHookEx( int, HOOKPROC, HINSTANCE, DWORD );
  7081.  
  7082. BOOL    WINAPI SetWindowText( HWND, LPCSTR );
  7083.  
  7084. WORD    WINAPI SetWindowWord( HWND, int, WORD );
  7085.  
  7086. HENHMETAFILE WINAPI SetWinMetaFileBits( UINT, const BYTE *, HDC, const METAFILEPICT * );
  7087.  
  7088. BOOL    WINAPI GdiComment(HDC, UINT, CONST BYTE *);
  7089.  
  7090. BOOL    WINAPI SetWorldTransform( HDC, const XFORM * );
  7091.  
  7092. HINSTANCE    WINAPI ShellExecute( HWND, LPCTSTR, LPCTSTR, LPTSTR, LPCTSTR, INT );
  7093.  
  7094. BOOL    WINAPI ShowCaret( HWND );
  7095.  
  7096. int       WINAPI ShowCursor( BOOL );
  7097.  
  7098. BOOL    WINAPI ShowOwnedPopups( HWND, BOOL );
  7099.  
  7100. BOOL    WINAPI ShowScrollBar( HWND, int, BOOL );
  7101.  
  7102. BOOL    WINAPI ShowWindow( HWND, int );
  7103.  
  7104. DWORD   WINAPI SizeofResource( HINSTANCE, HRSRC );
  7105.  
  7106. VOID    WINAPI Sleep( DWORD );
  7107.  
  7108. int       WINAPI StartDoc( HDC, PDOCINFO );
  7109.  
  7110. int       WINAPI StartPage( HDC );
  7111.  
  7112. int       WINAPI StretchDIBits( HDC, int, int, int, int, int, int, int, int, void *, PBITMAPINFO, UINT, DWORD );
  7113.  
  7114. BOOL    WINAPI StretchBlt( HDC, int, int, int, int, HDC, int, int, int, int,  DWORD );
  7115.  
  7116. BOOL    WINAPI StrokeAndFillPath( HDC );
  7117.  
  7118. BOOL    WINAPI StrokePath( HDC );
  7119.  
  7120. BOOL    WINAPI SubtractRect( LPRECT, const RECT *, const RECT *);
  7121.  
  7122. DWORD   WINAPI SuspendThread( HANDLE );
  7123.  
  7124. BOOL    WINAPI SwapMouseButton( BOOL );
  7125.  
  7126. BOOL    WINAPI SystemParametersInfo( UINT, UINT, PVOID, UINT );
  7127.  
  7128. BOOL    WINAPI SystemTimeToFileTime( const SYSTEMTIME *, PFILETIME );
  7129.  
  7130. BOOL    WINAPI SystemTimeToTzSpecificLocalTime( PTIME_ZONE_INFORMATION, PSYSTEMTIME, PSYSTEMTIME );
  7131.  
  7132. LONG    WINAPI TabbedTextOut( HDC, int, int, LPCSTR, int, int, int *, int );
  7133.  
  7134. BOOL    WINAPI TerminateProcess( HANDLE, UINT );
  7135.  
  7136. BOOL    WINAPI TerminateThread( HANDLE, DWORD );
  7137.  
  7138. BOOL    WINAPI TextOut( HDC, int, int, LPCSTR, int );
  7139.  
  7140. DWORD   WINAPI TlsAlloc( VOID );
  7141.  
  7142. BOOL    WINAPI TlsFree( DWORD );
  7143.  
  7144. LPVOID  WINAPI TlsGetValue( DWORD );
  7145.  
  7146. BOOL    WINAPI TlsSetValue( DWORD, LPVOID );
  7147.  
  7148. BOOL    WINAPI TrackPopupMenu( HMENU, UINT, int, int, int, HWND, const RECT * );
  7149.  
  7150. int       WINAPI TranslateAccelerator( HWND, HACCEL, PMSG );
  7151.  
  7152. BOOL    WINAPI TranslateMDISysAccel( HWND, PMSG );
  7153.  
  7154. BOOL    WINAPI TranslateMessage( const MSG * );
  7155.  
  7156. BOOL    WINAPI UnhookWindowsHookEx( HHOOK );
  7157.  
  7158. BOOL    WINAPI UnionRect( LPRECT, const RECT *, const RECT * );
  7159.  
  7160. BOOL    WINAPI UnlockFile( HANDLE, DWORD, DWORD, DWORD, DWORD );
  7161.  
  7162. BOOL    WINAPI UnpackDDElParam(UINT, LONG, PUINT, PUINT );
  7163.  
  7164. BOOL    WINAPI UnrealizeObject( HGDIOBJ );
  7165.  
  7166. BOOL    WINAPI UnregisterClass( LPCTSTR, HINSTANCE );
  7167.  
  7168. BOOL    WINAPI UpdateWindow( HWND );
  7169.  
  7170. BOOL    WINAPI ValidateRect( HWND, const RECT *);
  7171.  
  7172. BOOL    WINAPI ValidateRgn( HWND, HRGN );
  7173.  
  7174. LPVOID  WINAPI VirtualAlloc( LPVOID, DWORD, DWORD, DWORD );
  7175.  
  7176. BOOL    WINAPI VirtualFree( LPVOID, DWORD, DWORD );
  7177.  
  7178. DWORD   WINAPI VirtualQuery( LPVOID, PMEMORY_BASIC_INFORMATION, DWORD );
  7179.  
  7180. SHORT   WINAPI VkKeyScan( char keyScan);
  7181.  
  7182. DWORD   WINAPI WaitForInputIdle( HANDLE, DWORD );
  7183.  
  7184. DWORD   WINAPI WaitForMultipleObjects( DWORD, const HANDLE *, BOOL, DWORD );
  7185.  
  7186. DWORD   WINAPI WaitForSingleObject( HANDLE, DWORD );
  7187.  
  7188. BOOL    WINAPI WaitMessage( void);
  7189.  
  7190. int       WINAPI WideCharToMultiByte( UINT, DWORD, LPCWSTR, int, LPSTR, int, LPCSTR, LPBOOL );
  7191.  
  7192. BOOL    WINAPI WidenPath( HDC);
  7193.  
  7194. UINT    WINAPI WinExec( LPCSTR, UINT );
  7195.  
  7196. BOOL    WINAPI WinHelp( HWND, LPCSTR, UINT, DWORD );
  7197.  
  7198. HWND    WINAPI WindowFromPoint( POINT );
  7199.  
  7200. HWND    WINAPI WindowFromDC( HDC );
  7201.  
  7202. BOOL    WINAPI WriteFile( HANDLE, LPCVOID, DWORD, LPDWORD, LPOVERLAPPED );
  7203.  
  7204. BOOL    WINAPI WritePrivateProfileString( LPCTSTR, LPCTSTR, LPCTSTR, LPCTSTR );
  7205.  
  7206. BOOL    WINAPI WriteProfileString( LPCTSTR, LPCTSTR, LPCTSTR );
  7207.  
  7208. VOID    WINAPI ZeroMemory( PVOID, DWORD );
  7209.  
  7210. HFILE   WINAPI _lclose( HFILE );
  7211.  
  7212. HFILE   WINAPI _lcreat( LPCSTR, int );
  7213.  
  7214. HFILE   WINAPI _lopen( LPCSTR, int );
  7215.  
  7216. UINT    WINAPI _lread( HFILE, PVOID, UINT );
  7217.  
  7218. LONG    WINAPI _llseek( HFILE, LONG, int );
  7219.  
  7220. UINT    WINAPI _lwrite( HFILE, const VOID *, UINT );
  7221.  
  7222. MMRESULT WINAPI timeGetSystemTime( PMMTIME, UINT );
  7223.  
  7224. DWORD   WINAPI timeGetTime( VOID );
  7225.  
  7226. int       WINAPI wsprintf( LPSTR, LPCSTR, ... );
  7227.  
  7228. int       WINAPI wvsprintf( LPSTR, LPCSTR, const VOID *);
  7229.  
  7230. LPSTR   WINAPI CharNext( LPCSTR );
  7231.  
  7232. LPSTR   WINAPI CharPrev( LPCSTR, LPCSTR );
  7233.  
  7234. HWND    WINAPI GetDesktopWindow( VOID );
  7235.  
  7236. BOOL    WINAPI CharToOem( LPCSTR, LPSTR );
  7237.  
  7238. BOOL    WINAPI OemToChar( LPCSTR, LPSTR );
  7239.  
  7240. BOOL    WINAPI CharToOemBuff( LPCSTR, LPSTR, DWORD );
  7241.  
  7242. BOOL    WINAPI OemToCharBuff( LPCSTR, LPSTR, DWORD );
  7243.  
  7244. BOOL    WINAPI FloodFill(HDC, int, int, COLORREF );
  7245.  
  7246. BOOL    WINAPI IsCharAlpha( wchar_t );
  7247.  
  7248. BOOL    WINAPI IsCharAlphaNumeric( wchar_t );
  7249.  
  7250. BOOL    WINAPI IsCharLower( wchar_t );
  7251.  
  7252. BOOL    WINAPI IsCharUpper( wchar_t );
  7253.  
  7254. LPSTR   WINAPI lstrcat( LPSTR, LPCSTR );
  7255.  
  7256. int       WINAPI lstrcmp( LPCSTR, LPCSTR );
  7257.  
  7258. int       WINAPI lstrcmp2( LPCSTR, LPCSTR );
  7259.  
  7260. int       WINAPI lstrcmpi( LPCSTR, LPCSTR );
  7261.  
  7262. LPSTR   WINAPI lstrcpy( LPSTR, LPCSTR );
  7263.  
  7264. int       WINAPI lstrlen( LPCSTR );
  7265.  
  7266. int       WINAPI lstrcmpW( LPCWSTR, LPCWSTR );
  7267.  
  7268. /* -----------------------------------------------------------------*/
  7269.  
  7270.  
  7271. int       WINAPI WinCallWinMain(int, char *[], FNMAIN, int);
  7272.  
  7273. /* The following functions are used for translating data between the native
  7274.  * Presentation Manager format and the Developer API Extensions equivalents.
  7275.  */
  7276. typedef enum { WINX2PM, PM2WINX} XLATEDIR;
  7277.  
  7278. BOOL    WINAPI WinDeleteGraphicsObjectHandle( HGDIOBJ );
  7279. void      WINAPI WinInitializeOpen32( ULONG );
  7280. void      WINAPI WinTerminateOpen32( ULONG );
  7281. BOOL    WINAPI WinTranslateDevicePoints( HDC, HWND, PPOINT, INT, XLATEDIR );
  7282. BOOL    WINAPI WinTranslateDeviceRects ( HDC, HWND, PRECT,  INT, XLATEDIR );
  7283. ULONG   WINAPI WinTranslateGraphicsObjectHandle( HGDIOBJ, XLATEDIR, ULONG );
  7284. ULONG   WINAPI WinTranslateMnemonicString( LPCSTR, LPSTR *, ULONG, XLATEDIR );
  7285.  
  7286. DWORD   WINAPI WinQueryTranslateMode( VOID );
  7287. BOOL    WINAPI WinSetTranslateMode( DWORD );
  7288.  
  7289.  
  7290.  
  7291. /* Reset the packing mode to that specified at compile time via
  7292.  * the compiler switch.
  7293.  */
  7294. #pragma pack()
  7295.  
  7296. #if __IBMC__ || __IBMCPP__
  7297.    #pragma info( none )
  7298.    #ifndef __CHKHDR__
  7299.       #pragma info( restore )
  7300.    #endif
  7301.    #pragma info( restore )
  7302. #endif
  7303.  
  7304. #endif    /* ifdef _OS2WIN_H */
  7305.