Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2531 lines
70 KiB

  1. ;*************************************************************************
  2. ;
  3. ; WINDOWS.INC - Windows assembly language structures & constants
  4. ;
  5. ; Copyright (c) 1985-1994, Microsoft Corp. All rights reserved.
  6. ;*************************************************************************
  7. ;
  8. ; Conditional Block includes: (True states)
  9. ; NOTEXT - don't include TextMetric struc & text drawing modes & stock objs.
  10. ; NORASTOPS - don't include binary and ternary raster ops.
  11. ; NOVK - don't include virtual key definitions
  12. ; NOMB - don't include message box definitions
  13. ; NOWM - don't include window messages
  14. ;
  15. ;
  16. FALSE = 0
  17. TRUE = 1
  18. NULL = 0
  19. ;*******************************************************************
  20. ;
  21. ; Rectangle
  22. ;
  23. ;*******************************************************************
  24. RECT struc
  25. rcLeft dw ?
  26. rcTop dw ?
  27. rcRight dw ?
  28. rcBottom dw ?
  29. RECT ends
  30. ;*******************************************************************
  31. ;
  32. ; Window Class structure
  33. ;
  34. ;*******************************************************************
  35. WNDCLASS struc
  36. clsStyle dw ? ; class style
  37. clsLpfnWndProc dd ?
  38. clsCbClsExtra dw ?
  39. clsCbWndExtra dw ?
  40. clsHInstance dw ? ; instance handle
  41. clsHIcon dw ? ; class icon handle
  42. clsHCursor dw ? ; class cursor handle
  43. clsHbrBackground dw ? ; class background brush
  44. clsLpszMenuName dd ? ; menu name
  45. clsLpszClassName dd ? ; far ptr to class name
  46. WNDCLASS ends
  47. IFNDEF NOTEXT
  48. TEXTMETRIC struc
  49. tmHeight dw ?
  50. tmAscent dw ?
  51. tmDescent dw ?
  52. tmIntLeading dw ?
  53. tmExtLeading dw ?
  54. tmAveCharWidth dw ?
  55. tmMaxCharWidth dw ?
  56. tmWeight dw ?
  57. tmItalic db ?
  58. tmUnderlined db ?
  59. tmStruckOut db ?
  60. tmFirstChar db ?
  61. tmLastChar db ?
  62. tmDefaultChar db ?
  63. tmBreakChar db ?
  64. tmPitch db ?
  65. tmCharSet db ?
  66. tmOverhang dw ?
  67. tmAspectX dw ?
  68. tmAspectY dw ?
  69. TEXTMETRIC ends
  70. LF_FACESIZE EQU 32
  71. LOGFONT struc
  72. lfHeight dw ?
  73. lfWidth dw ?
  74. lfEscapement dw ?
  75. lfOrientation dw ?
  76. lfWeight dw ?
  77. lfItalic db ?
  78. lfUnderline db ?
  79. lfStrikeOut db ?
  80. lfCharSet db ?
  81. lfOutPrecision db ?
  82. lfClipPrecision db ?
  83. lfQuality db ?
  84. lfPitchAndFamily db ?
  85. lfFaceName db LF_FACESIZE dup(?)
  86. LOGFONT ends
  87. LOGBRUSH struc
  88. lbStyle dw ?
  89. lbColor dd ?
  90. lbHatch dw ?
  91. LOGBRUSH ends
  92. ;
  93. ; Text Drawing modes
  94. ;
  95. TRANSPARENT = 1
  96. OPAQUE = 2
  97. ;
  98. ; Mapping Modes
  99. ;
  100. MM_TEXT = 1
  101. MM_LOMETRIC = 2
  102. MM_HIMETRIC = 3
  103. MM_LOENGLISH = 4
  104. MM_HIENGLISH = 5
  105. MM_TWIPS = 6
  106. MM_ISOTROPIC = 7
  107. MM_ANISOTROPIC = 8
  108. ;
  109. ; Coordinate Modes
  110. ;
  111. ABSOLUTE = 1
  112. RELATIVE = 2
  113. ;
  114. ; Stock Logical Objects
  115. ;
  116. WHITE_BRUSH = 0
  117. LTGRAY_BRUSH = 1
  118. GRAY_BRUSH = 2
  119. DKGRAY_BRUSH = 3
  120. BLACK_BRUSH = 4
  121. NULL_BRUSH = 5
  122. HOLLOW_BRUSH = 5
  123. WHITE_PEN = 6
  124. BLACK_PEN = 7
  125. NULL_PEN = 8
  126. DOT_MARKER = 9
  127. OEM_FIXED_FONT = 10
  128. ANSI_FIXED_FONT = 11
  129. ANSI_VAR_FONT = 12
  130. SYSTEM_FONT = 13
  131. DEVICE_DEFAULT_FONT = 14
  132. DEFAULT_PALETTE = 15
  133. SYSTEM_FIXED_FONT = 16
  134. ENDIF
  135. ;
  136. ; Brush Styles
  137. ;
  138. BS_SOLID = 0
  139. BS_NULL = 1
  140. BS_HOLLOW = BS_NULL
  141. BS_HATCHED = 2
  142. BS_PATTERN = 3
  143. BS_INDEXED = 4
  144. BS_DIBPATTERN = 5
  145. ;
  146. ; Hatch Styles
  147. ;
  148. HS_HORIZONTAL = 0 ; -----
  149. HS_VERTICAL = 1 ; |||||
  150. HS_FDIAGONAL = 2 ; \\\\\
  151. HS_BDIAGONAL = 3 ; /////
  152. HS_CROSS = 4 ; +++++
  153. HS_DIAGCROSS = 5 ; xxxxx
  154. ;
  155. ; Pen Styles
  156. ;
  157. PS_SOLID = 0
  158. PS_DASH = 1 ; -------
  159. PS_DOT = 2 ; .......
  160. PS_DASHDOT = 3 ; _._._._
  161. PS_DASHDOTDOT = 4 ; _.._.._
  162. PS_NULL = 5
  163. PS_INSIDEFRAME = 6
  164. ;
  165. ; Device Parameters for GetDeviceCaps()
  166. ;
  167. DRIVERVERSION =0 ; Device driver version
  168. TECHNOLOGY =2 ; Device classification
  169. HORZSIZE =4 ; Horizontal size in millimeters
  170. VERTSIZE =6 ; Vertical size in millimeters
  171. HORZRES =8 ; Horizontal width in pixels
  172. VERTRES =10 ; Vertical width in pixels
  173. BITSPIXEL =12 ; Number of bits per pixel
  174. PLANES =14 ; Number of planes
  175. NUMBRUSHES =16 ; Number of brushes the device has
  176. NUMPENS =18 ; Number of pens the device has
  177. NUMMARKERS =20 ; Number of markers the device has
  178. NUMFONTS =22 ; Number of fonts the device has
  179. NUMCOLORS =24 ; Number of colors the device supports
  180. PDEVICESIZE =26 ; Size required for device descriptor
  181. CURVECAPS =28 ; Curve capabilities
  182. LINECAPS =30 ; Line capabilities
  183. POLYGONALCAPS =32 ; Polygonal capabilities
  184. TEXTCAPS =34 ; Text capabilities
  185. CLIPCAPS =36 ; Clipping capabilities
  186. RASTERCAPS =38 ; Bitblt capabilities
  187. ASPECTX =40 ; Length of the X leg
  188. ASPECTY =42 ; Length of the Y leg
  189. ASPECTXY =44 ; Length of the hypotenuse
  190. LOGPIXELSX =88 ; Logical pixels/inch in X
  191. LOGPIXELSY =90 ; Logical pixels/inch in Y
  192. SIZEPALETTE =104 ; Number of entries in physical palette
  193. NUMRESERVED =106 ; Number of reserved entries in palette
  194. COLORRES =108 ; Actual color resolution
  195. ;
  196. ifndef NOGDICAPMASKS
  197. ;
  198. ; Device Capability Masks:
  199. ;
  200. ; Device Technologies
  201. DT_PLOTTER = 0 ; /* Vector plotter */
  202. DT_RASDISPLAY = 1 ; /* Raster display */
  203. DT_RASPRINTER = 2 ; /* Raster printer */
  204. DT_RASCAMERA = 3 ; /* Raster camera */
  205. DT_CHARSTREAM = 4 ; /* Character-stream, PLP */
  206. DT_METAFILE = 5 ; /* Metafile, VDM */
  207. DT_DISPFILE = 6 ; /* Display-file */
  208. ;
  209. ; Curve Capabilities
  210. CC_NONE = 0 ; /* Curves not supported */
  211. CC_CIRCLES = 1 ; /* Can do circles */
  212. CC_PIE = 2 ; /* Can do pie wedges */
  213. CC_CHORD = 4 ; /* Can do chord arcs */
  214. CC_ELLIPSES = 8 ; /* Can do ellipese */
  215. CC_WIDE = 16 ; /* Can do wide lines */
  216. CC_STYLED = 32 ; /* Can do styled lines */
  217. CC_WIDESTYLED = 64 ; /* Can do wide styled lines */
  218. CC_INTERIORS = 128; /* Can do interiors */
  219. ;
  220. ; Line Capabilities
  221. LC_NONE = 0 ; /* Lines not supported */
  222. LC_POLYLINE = 2 ; /* Can do polylines */
  223. LC_MARKER = 4 ; /* Can do markers */
  224. LC_POLYMARKER = 8 ; /* Can do polymarkers */
  225. LC_WIDE = 16 ; /* Can do wide lines */
  226. LC_STYLED = 32 ; /* Can do styled lines */
  227. LC_WIDESTYLED = 64 ; /* Can do wide styled lines */
  228. LC_INTERIORS = 128; /* Can do interiors */
  229. ;
  230. ; Polygonal Capabilities
  231. PC_NONE = 0 ; /* Polygonals not supported */
  232. PC_POLYGON = 1 ; /* Can do polygons */
  233. PC_RECTANGLE = 2 ; /* Can do rectangles */
  234. PC_WINDPOLYGON = 4 ; /* Can do winding polygons */
  235. PC_TRAPEZOID = 4 ; /* Can do trapezoids */
  236. PC_SCANLINE = 8 ; /* Can do scanlines */
  237. PC_WIDE = 16 ; /* Can do wide borders */
  238. PC_STYLED = 32 ; /* Can do styled borders */
  239. PC_WIDESTYLED = 64 ; /* Can do wide styled borders */
  240. PC_INTERIORS = 128; /* Can do interiors */
  241. PC_POLYPOLYGON = 256; /* Can do PolyPolygons */
  242. ;
  243. ; Polygonal Capabilities */
  244. CP_NONE = 0 ; /* No clipping of output */
  245. CP_RECTANGLE = 1 ; /* Output clipped to rects */
  246. ;
  247. ; Text Capabilities
  248. TC_OP_CHARACTER = 0001h ; /* Can do OutputPrecision CHARACTER */
  249. TC_OP_STROKE = 0002h ; /* Can do OutputPrecision STROKE */
  250. TC_CP_STROKE = 0004h ; /* Can do ClipPrecision STROKE */
  251. TC_CR_90 = 0008h ; /* Can do CharRotAbility 90 */
  252. TC_CR_ANY = 0010h ; /* Can do CharRotAbility ANY */
  253. TC_SF_X_YINDEP = 0020h ; /* Can do ScaleFreedom X_YINDEPENDENT */
  254. TC_SA_DOUBLE = 0040h ; /* Can do ScaleAbility DOUBLE */
  255. TC_SA_INTEGER = 0080h ; /* Can do ScaleAbility INTEGER */
  256. TC_SA_CONTIN = 0100h ; /* Can do ScaleAbility CONTINUOUS */
  257. TC_EA_DOUBLE = 0200h ; /* Can do EmboldenAbility DOUBLE */
  258. TC_IA_ABLE = 0400h ; /* Can do ItalisizeAbility ABLE */
  259. TC_UA_ABLE = 0800h ; /* Can do UnderlineAbility ABLE */
  260. TC_SO_ABLE = 1000h ; /* Can do StrikeOutAbility ABLE */
  261. TC_RA_ABLE = 2000h ; /* Can do RasterFontAble ABLE */
  262. TC_VA_ABLE = 4000h ; /* Can do VectorFontAble ABLE */
  263. TC_RESERVED = 8000h
  264. ;
  265. ; Raster Capabilities
  266. RC_BITBLT = 1 ; /* Can do standard BLT. */
  267. RC_BANDING = 2 ; /* Device requires banding support */
  268. RC_SCALING = 4 ; /* Device requires scaling support */
  269. RC_BITMAP64 = 8 ; /* Device can support >64K bitmap */
  270. RC_GDI20_OUTPUT = 0010h ; /* has 2.0 output calls */
  271. RC_DI_BITMAP = 0080h ; /* supports DIB to memory */
  272. RC_PALETTE = 0100h ; /* supports a palette */
  273. RC_DIBTODEV = 0200h ; /* supports DIBitsToDevice */
  274. RC_BIGFONT = 0400h ; /* supports >64K fonts */
  275. RC_STRETCHBLT = 0800h ; /* supports StretchBlt */
  276. RC_FLOODFILL = 1000h ; /* supports FloodFill */
  277. RC_STRETCHDIB = 2000h ; /* supports StretchDIBits */
  278. endif ;NOGDICAPMASKS
  279. ; palette entry flags
  280. ;
  281. PC_RESERVED = 1 ;/* palette index used for animation */
  282. PC_EXPLICIT = 2 ;/* palette index is explicit to device */
  283. PC_NOCOLLAPSE = 4 ;/* do not match color to system palette */
  284. ; DIB color table identifiers
  285. ;
  286. DIB_RGB_COLORS = 0 ;/* color table in RGBTriples */
  287. DIB_PAL_COLORS = 1 ;/* color table in palette indices */
  288. ;
  289. ;constants for Get/SetSystemPaletteUse()
  290. ;
  291. SYSPAL_STATIC = 1
  292. SYSPAL_NOSTATIC = 2
  293. ; constants for CreateDIBitmap
  294. CBM_INIT = 4 ;/* initialize bitmap */
  295. ;
  296. ; Bitmap format constants
  297. BI_RGB = 0
  298. BI_RLE8 = 1
  299. BI_RLE4 = 2
  300. ;
  301. ;
  302. ANSI_CHARSET = 0
  303. SYMBOL_CHARSET = 2
  304. SHIFTJIS_CHARSET = 128 ;/* Japan */
  305. HANGEUL_CHARSET = 129 ;/* Korea */
  306. GB2312_CHARSET = 134 ;/* China */
  307. CHINESEBIG5_CHARSET = 136 ;/* Taiwan */
  308. OEM_CHARSET = 255
  309. ;
  310. ; styles for CombineRgn
  311. ;
  312. RGN_AND = 1
  313. RGN_OR = 2
  314. RGN_XOR = 3
  315. RGN_DIFF = 4
  316. RGN_COPY = 5
  317. ;
  318. ; Predefined cursor & icon IDs
  319. ;
  320. IDC_ARROW = 32512
  321. IDC_IBEAM = 32513
  322. IDC_WAIT = 32514
  323. IDC_CROSS = 32515
  324. IDC_UPARROW = 32516
  325. IDC_SIZE = 32640
  326. IDC_ICON = 32641
  327. IDC_SIZENWSE = 32642
  328. IDC_SIZENESW = 32643
  329. IDC_SIZEWE = 32644
  330. IDC_SIZENS = 32645
  331. IDC_APPSTARTING = 32650
  332. IDI_APPLICATION = 32512
  333. IDI_HAND = 32513
  334. IDI_QUESTION = 32514
  335. IDI_EXCLAMATION = 32515
  336. IDI_ASTERISK = 32516
  337. ;
  338. ; OEM Resource Ordinal Numbers */
  339. ;
  340. OBM_CLOSE = 32754
  341. OBM_UPARROW = 32753
  342. OBM_DNARROW = 32752
  343. OBM_RGARROW = 32751
  344. OBM_LFARROW = 32750
  345. OBM_REDUCE = 32749
  346. OBM_ZOOM = 32748
  347. OBM_RESTORE = 32747
  348. OBM_REDUCED = 32746
  349. OBM_ZOOMD = 32745
  350. OBM_RESTORED = 32744
  351. OBM_UPARROWD = 32743
  352. OBM_DNARROWD = 32742
  353. OBM_RGARROWD = 32741
  354. OBM_LFARROWD = 32740
  355. OBM_MNARROW = 32739
  356. OBM_COMBO = 32738
  357. OBM_UPARROWI = 32737
  358. OBM_DNARROWI = 32736
  359. OBM_RGARROWI = 32735
  360. OBM_LFARROWI = 32734
  361. OBM_OLD_CLOSE = 32767
  362. OBM_SIZE = 32766
  363. OBM_OLD_UPARROW = 32765
  364. OBM_OLD_DNARROW = 32764
  365. OBM_OLD_RGARROW = 32763
  366. OBM_OLD_LFARROW = 32762
  367. OBM_BTSIZE = 32761
  368. OBM_CHECK = 32760
  369. OBM_CHECKBOXES = 32759
  370. OBM_BTNCORNERS = 32758
  371. OBM_OLD_REDUCE = 32757
  372. OBM_OLD_ZOOM = 32756
  373. OBM_OLD_RESTORE = 32755
  374. OCR_NORMAL = 32512
  375. OCR_IBEAM = 32513
  376. OCR_WAIT = 32514
  377. OCR_CROSS = 32515
  378. OCR_UP = 32516
  379. OCR_SIZE = 32640
  380. OCR_ICON = 32641
  381. OCR_SIZENWSE = 32642
  382. OCR_SIZENESW = 32643
  383. OCR_SIZEWE = 32644
  384. OCR_SIZENS = 32645
  385. OCR_SIZEALL = 32646
  386. OCR_ICOCUR = 32647
  387. OIC_SAMPLE = 32512
  388. OIC_HAND = 32513
  389. OIC_QUES = 32514
  390. OIC_BANG = 32515
  391. OIC_NOTE = 32516
  392. ;
  393. ; Scroll bar constants
  394. ;
  395. SB_HORZ = 0
  396. SB_VERT = 1
  397. SB_CTL = 2
  398. SB_BOTH = 3
  399. ;
  400. ; Scroll Commands
  401. ;
  402. SB_LINEUP = 0
  403. SB_LINEDOWN = 1
  404. SB_PAGEUP = 2
  405. SB_PAGEDOWN = 3
  406. SB_THUMBPOSITION = 4
  407. SB_THUMBTRACK = 5
  408. SB_TOP = 6
  409. SB_BOTTOM = 7
  410. SB_ENDSCROLL = 8
  411. ;
  412. ; MessageBox type flags
  413. ;
  414. IFNDEF NOMB
  415. MB_OK = 0000H
  416. MB_OKCANCEL = 0001H
  417. MB_ABORTRETRYIGNORE = 0002H
  418. MB_YESNOCANCEL = 0003H
  419. MB_YESNO = 0004H
  420. MB_RETRYCANCEL = 0005H
  421. MB_ICONHAND = 0010H
  422. MB_ICONQUESTION = 0020H
  423. MB_ICONEXCLAMATION = 0030H
  424. MB_ICONASTERISK = 0040H
  425. MB_DEFBUTTON1 = 0000H
  426. MB_DEFBUTTON2 = 0100H
  427. MB_DEFBUTTON3 = 0200H
  428. MB_APPLMODAL = 0000H
  429. MB_SYSTEMMODAL = 1000H
  430. MB_TASKMODAL = 2000H
  431. MB_NOFOCUS = 8000H
  432. ;
  433. ; Conventional dialog box and message box command IDs
  434. ;
  435. IDOK = 1
  436. IDCANCEL = 2
  437. IDABORT = 3
  438. IDRETRY = 4
  439. IDIGNORE = 5
  440. IDYES = 6
  441. IDNO = 7
  442. ;
  443. ; Flags for OpenFile
  444. ;
  445. OF_READ = 0000H
  446. OF_WRITE = 0001H
  447. OF_READWRITE = 0002H
  448. OF_SHARE_COMPAT = 0000H
  449. OF_SHARE_EXCLUSIVE = 0010H
  450. OF_SHARE_DENY_WRITE = 0020H
  451. OF_SHARE_DENY_READ = 0030H
  452. OF_SHARE_DENY_NONE = 0040H
  453. OF_PARSE = 0100H
  454. OF_DELETE = 0200H
  455. OF_VERIFY = 0400H ; Used with OF_REOPEN
  456. OF_SEARCH = 0400H ; Used without OF_REOPEN
  457. OF_CANCEL = 0800H
  458. OF_CREATE = 1000H
  459. OF_PROMPT = 2000H
  460. OF_EXIST = 4000H
  461. OF_REOPEN = 8000H
  462. TF_FORCEDRIVE = 80H
  463. OPENSTRUC STRUC
  464. opLen db ?
  465. opDisk db ?
  466. opXtra dw ?
  467. opDate dw ?
  468. opTime dw ?
  469. opFile db 120 dup (?)
  470. OPENSTRUC ENDS
  471. ;
  472. ; DrawText format flags
  473. ;
  474. DT_LEFT = 00H
  475. DT_CENTER = 01H
  476. DT_RIGHT = 02H
  477. DT_TOP = 00H
  478. DT_VCENTER = 04H
  479. DT_BOTTOM = 08H
  480. DT_WORDBREAK = 10H
  481. DT_SINGLELINE = 20H
  482. DT_EXPANDTABS = 40H
  483. DT_TABSTOP = 80H
  484. DT_NOCLIP = 0100H
  485. DT_EXTERNALLEADING = 0200H
  486. DT_CALCRECT = 0400H
  487. DT_NOPREFIX = 0800H
  488. DT_INTERNAL = 1000H
  489. ENDIF
  490. ;
  491. ; ExtFloodFill style flags
  492. ;
  493. FLOODFILLBORDER = 0
  494. FLOODFILLSURFACE = 1
  495. ;
  496. ; Memory manager flags
  497. ;
  498. LMEM_FIXED = 0000h
  499. LMEM_MOVEABLE = 0002h
  500. LMEM_NOCOMPACT = 0010H
  501. LMEM_NODISCARD = 0020H
  502. LMEM_ZEROINIT = 0040h
  503. LMEM_MODIFY = 0080H
  504. LMEM_DISCARDABLE= 0F00h
  505. LHND = LMEM_MOVEABLE+LMEM_ZEROINIT
  506. LPTR = LMEM_FIXED+LMEM_ZEROINIT
  507. ; Flags returned by LocalFlags (in addition to LMEM_DISCARDABLE)
  508. LMEM_DISCARDED = 4000H
  509. LMEM_LOCKCOUNT = 00FFH
  510. NONZEROLHND = LMEM_MOVEABLE
  511. NONZEROLPTR = LMEM_FIXED
  512. GMEM_FIXED = 0000h
  513. GMEM_MOVEABLE = 0002h
  514. GMEM_NOCOMPACT = 0010h
  515. GMEM_NODISCARD = 0020h
  516. GMEM_ZEROINIT = 0040h
  517. GMEM_MODIFY = 0080h
  518. GMEM_DISCARDABLE= 0100h
  519. GMEM_NOT_BANKED = 1000h
  520. GMEM_DDESHARE = 2000h
  521. GMEM_SHARE = 2000h
  522. GMEM_NOTIFY = 4000h
  523. GMEM_LOWER = GMEM_NOT_BANKED
  524. GHND = GMEM_MOVEABLE+GMEM_ZEROINIT
  525. GPTR = GMEM_FIXED+GMEM_ZEROINIT
  526. ; Flags returned by GlobalFlags (in addition to GMEM_DISCARDABLE)
  527. GMEM_DISCARDED = 4000h
  528. GMEM_LOCKCOUNT = 00FFh
  529. ; Flags returned by GetWinFlags
  530. WF_PMODE = 0001h
  531. WF_CPU286 = 0002h
  532. WF_CPU386 = 0004h
  533. WF_CPU486 = 0008h
  534. WF_STANDARD = 0010h
  535. WF_WIN286 = 0010h
  536. WF_ENHANCED = 0020h
  537. WF_WIN386 = 0020h
  538. WF_CPU086 = 0040h
  539. WF_CPU186 = 0080h
  540. WF_CPUR4000 = 0100h
  541. WF_RESERVED200 = 0200h
  542. WF_80x87 = 0400h
  543. WF_PAGING = 0800h
  544. WF_DOSPAGING = 1000h
  545. WF_WINNT = 4000h
  546. WF_WLO = 8000h
  547. WF_CPUMASK = 0FC00h ; mask against hiword of GetWinFlags
  548. WF_CPU_X86 = 0
  549. WF_CPU_R4000 = 1
  550. WF_CPU_ALPHA = 2
  551. WF_CPU_CLIPPER = 3
  552. ; WEP fSystemExit flag values
  553. WEP_SYSTEM_EXIT = 1
  554. WEP_FREE_DLL = 0
  555. ; Virtual Keys, Standard Set
  556. IFNDEF NOVK
  557. VK_LBUTTON = 01H
  558. VK_RBUTTON = 02H
  559. VK_CANCEL = 03H
  560. VK_BACK = 08H
  561. VK_TAB = 09H
  562. VK_CLEAR = 0cH
  563. VK_RETURN = 0dH
  564. VK_SHIFT = 10H
  565. VK_CONTROL = 11H
  566. VK_MENU = 12H
  567. VK_PAUSE = 13H
  568. VK_CAPITAL = 14H
  569. VK_ESCAPE = 1bH
  570. VK_SPACE = 20H
  571. VK_PRIOR = 21H
  572. VK_NEXT = 22H
  573. VK_END = 23H
  574. VK_HOME = 24H
  575. VK_LEFT = 25H
  576. VK_UP = 26H
  577. VK_RIGHT = 27H
  578. VK_DOWN = 28H
  579. ; VK_A thru VK_Z are the same as their ASCII equivalents: 'A' thru 'Z'
  580. ; VK_0 thru VK_9 are the same as their ASCII equivalents: '0' thru '0'
  581. VK_PRINT = 2aH
  582. VK_EXECUTE = 2bH
  583. VK_SNAPSHOT = 2ch ; Printscreen key..
  584. VK_INSERT = 2dH
  585. VK_DELETE = 2eH
  586. VK_HELP = 2fH
  587. VK_NUMPAD0 = 60H
  588. VK_NUMPAD1 = 61H
  589. VK_NUMPAD2 = 62H
  590. VK_NUMPAD3 = 63H
  591. VK_NUMPAD4 = 64H
  592. VK_NUMPAD5 = 65H
  593. VK_NUMPAD6 = 66H
  594. VK_NUMPAD7 = 67H
  595. VK_NUMPAD8 = 68H
  596. VK_NUMPAD9 = 69H
  597. VK_MULTIPLY = 6AH
  598. VK_ADD = 6BH
  599. VK_SEPARATER = 6CH
  600. VK_SUBTRACT = 6DH
  601. VK_DECIMAL = 6EH
  602. VK_DIVIDE = 6FH
  603. VK_F1 = 70H
  604. VK_F2 = 71H
  605. VK_F3 = 72H
  606. VK_F4 = 73H
  607. VK_F5 = 74H
  608. VK_F6 = 75H
  609. VK_F7 = 76H
  610. VK_F8 = 77H
  611. VK_F9 = 78H
  612. VK_F10 = 79H
  613. VK_F11 = 7aH
  614. VK_F12 = 7bH
  615. VK_F13 = 7cH
  616. VK_F14 = 7dH
  617. VK_F15 = 7eH
  618. VK_F16 = 7fH
  619. VK_F17 = 80H
  620. VK_F18 = 81H
  621. VK_F19 = 82H
  622. VK_F20 = 83H
  623. VK_F21 = 84H
  624. VK_F22 = 85H
  625. VK_F23 = 86H
  626. VK_F24 = 87H
  627. VK_NUMLOCK = 90H
  628. VK_SCROLL = 91H
  629. ENDIF
  630. IFNDEF NOWH
  631. ; SetWindowsHook() codes
  632. WH_MSGFILTER = (-1)
  633. WH_JOURNALRECORD = 0
  634. WH_JOURNALPLAYBACK = 1
  635. WH_KEYBOARD = 2
  636. WH_GETMESSAGE = 3
  637. WH_CALLWNDPROC = 4
  638. IFNDEF NOWIN31
  639. WH_CBT = 5
  640. WH_SYSMSGFILTER = 6
  641. WH_MOUSE = 7
  642. WH_HARDWARE = 8
  643. WH_DEBUG = 9
  644. ENDIF
  645. ;
  646. ; Hook Codes
  647. HC_GETLPLPFN = (-3)
  648. HC_LPLPFNNEXT = (-2)
  649. HC_LPFNNEXT = (-1)
  650. HC_ACTION = 0
  651. HC_GETNEXT = 1
  652. HC_SKIP = 2
  653. HC_NOREM = 3
  654. HC_NOREMOVE = 3
  655. HC_SYSMODALON = 4
  656. HC_SYSMODALOFF = 5
  657. ;
  658. ; CBT Hook Codes
  659. HCBT_MOVESIZE = 0
  660. HCBT_MINMAX = 1
  661. HCBT_QS = 2
  662. HCBT_CREATEWND = 3
  663. HCBT_DESTROYWND = 4
  664. HCBT_ACTIVATE = 5
  665. HCBT_CLICKSKIPPED = 6
  666. HCBT_KEYSKIPPED = 7
  667. HCBT_SYSCOMMAND = 8
  668. HCBT_SETFOCUS = 9
  669. ;
  670. ; WH_MSGFILTER Filter Proc Codes
  671. MSGF_DIALOGBOX = 0
  672. MSGF_MENU = 2
  673. MSGF_MOVE = 3
  674. MSGF_SIZE = 4
  675. MSGF_SCROLLBAR = 5
  676. MSGF_NEXTWINDOW = 6
  677. ;
  678. ; Window Manager Hook Codes
  679. WC_INIT = 1
  680. WC_SWP = 2
  681. WC_DEFWINDOWPROC = 3
  682. WC_MINMAX = 4
  683. WC_MOVE = 5
  684. WC_SIZE = 6
  685. WC_DRAWCAPTION = 7
  686. ;
  687. ; Message Structure used in Journaling
  688. EVENTMSG struc
  689. message dw ?
  690. paramL dw ?
  691. paramH dw ?
  692. time dd ?
  693. EVENTMSG ends
  694. ENDIF ;NOWH
  695. ; Window field offsets for GetWindowLong() and GetWindowWord()
  696. GWL_WNDPROC = (-4)
  697. GWW_HINSTANCE = (-6)
  698. GWW_HWNDPARENT = (-8)
  699. GWW_ID = (-12)
  700. GWL_STYLE = (-16)
  701. GWL_EXSTYLE = (-20)
  702. ; GetWindow() Constants
  703. GW_HWNDFIRST = 0
  704. GW_HWNDLAST = 1
  705. GW_HWNDNEXT = 2
  706. GW_HWNDPREV = 3
  707. GW_OWNER = 4
  708. GW_CHILD = 5
  709. ; Class field offsets for GetClassLong() and GetClassWord()
  710. GCL_MENUNAME = (-8)
  711. GCW_HBRBACKGROUND = (-10)
  712. GCW_HCURSOR = (-12)
  713. GCW_HICON = (-14)
  714. GCW_HMODULE = (-16)
  715. GCW_CBWNDEXTRA = (-18)
  716. GCW_CBCLSEXTRA = (-20)
  717. GCL_WNDPROC = (-24)
  718. GCW_STYLE = (-26)
  719. ; WinWhere() Area Codes
  720. HTERROR = (-2)
  721. HTTRANSPARENT = (-1)
  722. HTNOWHERE = 0
  723. HTCLIENT = 1
  724. HTCAPTION = 2
  725. HTSYSMENU = 3
  726. HTGROWBOX = 4
  727. HTSIZE = HTGROWBOX
  728. HTMENU = 5
  729. HTHSCROLL = 6
  730. HTVSCROLL = 7
  731. HTREDUCE = 8
  732. HTZOOM = 9
  733. HTLEFT = 10
  734. HTRIGHT = 11
  735. HTTOP = 12
  736. HTTOPLEFT = 13
  737. HTTOPRIGHT = 14
  738. HTBOTTOM = 15
  739. HTBOTTOMLEFT = 16
  740. HTBOTTOMRIGHT = 17
  741. HTSIZEFIRST = HTLEFT
  742. HTSIZELAST = HTBOTTOMRIGHT
  743. ;*************************************************************************
  744. ;
  745. ; Misc structures & constants
  746. ;
  747. ;*************************************************************************
  748. IFNDEF NOMST
  749. POINT struc
  750. ptX dw ?
  751. ptY dw ?
  752. POINT ends
  753. LOGPEN struc
  754. lopnStyle dw ?
  755. lopnWidth db (SIZE POINT) DUP(?)
  756. lopnColor dd ?
  757. LOGPEN ends
  758. BITMAP STRUC
  759. bmType DW ?
  760. bmWidth DW ?
  761. bmHeight DW ?
  762. bmWidthBytes DW ?
  763. bmPlanes DB ?
  764. bmBitsPixel DB ?
  765. bmBits DD ?
  766. BITMAP ENDS
  767. RGBTRIPLE struc
  768. rgbBlue db ?
  769. rgbGreen db ?
  770. rgbRed db ?
  771. RGBTRIPLE ends
  772. RGBQUAD struc
  773. rgbqBlue db ?
  774. rgbqGreen db ?
  775. rgbqRed db ?
  776. rgbqReserved db ?
  777. RGBQUAD ends
  778. ; structures for defining DIBs
  779. BITMAPCOREHEADER struc
  780. bcSize dd ?
  781. bcWidth dw ?
  782. bcHeight dw ?
  783. bcPlanes dw ?
  784. bcBitCount dw ?
  785. BITMAPCOREHEADER ends
  786. BITMAPINFOHEADER struc
  787. biSize dd ?
  788. biWidth dd ?
  789. biHeight dd ?
  790. biPlanes dw ?
  791. biBitCount dw ?
  792. biCompression dd ?
  793. biSizeImage dd ?
  794. biXPelsPerMeter dd ?
  795. biYPelsPerMeter dd ?
  796. biClrUsed dd ?
  797. biClrImportant dd ?
  798. BITMAPINFOHEADER ends
  799. BITMAPINFO struc
  800. bmiHeader db (SIZE BITMAPINFOHEADER) DUP (?)
  801. bmiColors db ? ; array of RGBQUADs
  802. BITMAPINFO ends
  803. BITMAPCOREINFO struc
  804. bmciHeader db (SIZE BITMAPCOREHEADER) DUP (?)
  805. bmciColors db ? ; array of RGBTRIPLEs
  806. BITMAPCOREINFO ends
  807. BITMAPFILEHEADER struc
  808. bfType dw ?
  809. bfSize dd ?
  810. bfReserved1 dw ?
  811. bfReserved2 dw ?
  812. bfOffBits dd ?
  813. BITMAPFILEHEADER ends
  814. WNDSTRUC struc
  815. WSwndStyle dd ?
  816. WSwndID dw ?
  817. WSwndText dw ?
  818. WSwndParent dw ?
  819. WSwndInstance dw ?
  820. WSwndClassProc dd ?
  821. WNDSTRUC ends
  822. ;
  823. ; Message structure
  824. ;
  825. MSGSTRUCT struc
  826. msHWND dw ?
  827. msMESSAGE dw ?
  828. msWPARAM dw ?
  829. msLPARAM dd ?
  830. msTIME dd ?
  831. msPT dd ?
  832. MSGSTRUCT ends
  833. NEWPARMS struc
  834. nprmHwnd dw ?
  835. nprmCmd db ?
  836. NEWPARMS ends
  837. ENDIF
  838. PAINTSTRUCT STRUC
  839. PShdc DW ?
  840. PSfErase DW ?
  841. PSrcPaint DB size RECT dup(?)
  842. PSfRestore DW ?
  843. PSfIncUpdate DW ?
  844. PSrgbReserved DB 16 dup(?)
  845. PAINTSTRUCT ENDS
  846. CREATESTRUCT struc
  847. cs_lpCreateParams dd ?
  848. cs_hInstance dw ?
  849. cs_hMenu dw ?
  850. cs_hwndParent dw ?
  851. cs_cy dw ?
  852. cs_cx dw ?
  853. cs_y dw ?
  854. cs_x dw ?
  855. cs_style dd ?
  856. cs_lpszName dd ?
  857. cs_lpszClass dd ?
  858. cs_dwExStyle dd ?
  859. CREATESTRUCT ends
  860. ;
  861. ; PostError constants
  862. ;
  863. WARNING = 0 ; command codes
  864. MINOR_ERROR = 1
  865. FATAL_ERROR = 2
  866. IGNORE = 0 ; response codes
  867. RETRY = 1
  868. ABORT = 2
  869. ;
  870. ; GDI-related constants & commands
  871. ;
  872. ERRORREGION = 0
  873. NULLREGION = 1
  874. SIMPLEREGION = 2
  875. COMPLEXREGION = 3
  876. IFNDEF NORASTOPS
  877. ;
  878. ; Binary raster ops
  879. ;
  880. R2_BLACK = 1
  881. R2_NOTMERGEPEN = 2
  882. R2_MASKNOTPEN = 3
  883. R2_NOTCOPYPEN = 4
  884. R2_MASKPENNOT = 5
  885. R2_NOT = 6
  886. R2_XORPEN = 7
  887. R2_NOTMASKPEN = 8
  888. R2_MASKPEN = 9
  889. R2_NOTXORPEN = 10
  890. R2_NOP = 11
  891. R2_MERGENOTPEN = 12
  892. R2_COPYPEN = 13
  893. R2_MERGEPENNOT = 14
  894. R2_MERGEPEN = 15
  895. R2_WHITE = 16
  896. ;
  897. ; Ternary raster ops
  898. ;
  899. SRCCOPY_L = 0020h ;dest=source
  900. SRCCOPY_H = 00CCh
  901. SRCPAINT_L = 0086h ;dest=source OR dest
  902. SRCPAINT_H = 00EEh
  903. SRCAND_L = 00C6h ;dest=source AND dest
  904. SRCAND_H = 0088h
  905. SRCINVERT_L = 0046h ;dest= source XOR dest
  906. SRCINVERT_H = 0066h
  907. SRCERASE_L = 0328h ;dest= source AND (not dest )
  908. SRCERASE_H = 0044h
  909. NOTSRCCOPY_L = 0008h ;dest= (not source)
  910. NOTSRCCOPY_H = 0033h
  911. NOTSRCERASE_L = 00A6h ;dest= (not source) AND (not dest)
  912. NOTSRCERASE_H = 0011h
  913. MERGECOPY_L = 00CAh ;dest= (source AND pattern)
  914. MERGECOPY_H = 00C0h
  915. MERGEPAINT_L = 0226h ;dest= (source AND pattern) OR dest
  916. MERGEPAINT_H = 00BBh
  917. PATCOPY_L = 0021h ;dest= pattern
  918. PATCOPY_H = 00F0h
  919. PATPAINT_L = 0A09h ;DPSnoo
  920. PATPAINT_H = 00FBh
  921. PATINVERT_L = 0049h ;dest= pattern XOR dest
  922. PATINVERT_H = 005Ah
  923. DSTINVERT_L = 0009h ;dest= (not dest)
  924. DSTINVERT_H = 0055h
  925. BLACKNESS_L = 0042h ;dest= BLACK
  926. BLACKNESS_H = 0000h
  927. WHITENESS_L = 0062h ;dest= WHITE
  928. WHITENESS_H = 00FFh
  929. ;
  930. ; StretchBlt modes
  931. ;
  932. BLACKONWHITE = 1
  933. WHITEONBLACK = 2
  934. COLORONCOLOR = 3
  935. ;
  936. ; New StretchBlt modes
  937. ;
  938. STRETCH_ANDSCANS = 1
  939. STRETCH_ORSCANS = 2
  940. STRETCH_DELETESCANS = 3
  941. ;
  942. ; PolyFill modes
  943. ;
  944. ALTERNATE = 1
  945. WINDING = 2
  946. ENDIF
  947. ;
  948. ; Text Alignment Options
  949. ;
  950. TA_NOUPDATECP = 0
  951. TA_UPDATECP = 1
  952. TA_LEFT = 0
  953. TA_RIGHT = 2
  954. TA_CENTER = 6
  955. TA_TOP = 0
  956. TA_BOTTOM = 8
  957. TA_BASELINE = 24
  958. ETO_GRAYED = 1
  959. ETO_OPAQUE = 2
  960. ETO_CLIPPED = 4
  961. ASPECT_FILTERING = 1
  962. ifndef NOMETAFILE
  963. ; Metafile Functions */
  964. META_SETBKCOLOR = 0201h
  965. META_SETBKMODE = 0102h
  966. META_SETMAPMODE = 0103h
  967. META_SETROP2 = 0104h
  968. META_SETRELABS = 0105h
  969. META_SETPOLYFILLMODE = 0106h
  970. META_SETSTRETCHBLTMODE = 0107h
  971. META_SETTEXTCHAREXTRA = 0108h
  972. META_SETTEXTCOLOR = 0209h
  973. META_SETTEXTJUSTIFICATION = 020Ah
  974. META_SETWINDOWORG = 020Bh
  975. META_SETWINDOWEXT = 020Ch
  976. META_SETVIEWPORTORG = 020Dh
  977. META_SETVIEWPORTEXT = 020Eh
  978. META_OFFSETWINDOWORG = 020Fh
  979. META_SCALEWINDOWEXT = 0400h
  980. META_OFFSETVIEWPORTORG = 0211h
  981. META_SCALEVIEWPORTEXT = 0412h
  982. META_LINETO = 0213h
  983. META_MOVETO = 0214h
  984. META_EXCLUDECLIPRECT = 0415h
  985. META_INTERSECTCLIPRECT = 0416h
  986. META_ARC = 0817h
  987. META_ELLIPSE = 0418h
  988. META_FLOODFILL = 0419h
  989. META_PIE = 081Ah
  990. META_RECTANGLE = 041Bh
  991. META_ROUNDRECT = 061Ch
  992. META_PATBLT = 061Dh
  993. META_SAVEDC = 001Eh
  994. META_SETPIXEL = 041Fh
  995. META_OFFSETCLIPRGN = 0220h
  996. META_TEXTOUT = 0521h
  997. META_BITBLT = 0922h
  998. META_STRETCHBLT = 0B23h
  999. META_POLYGON = 0324h
  1000. META_POLYLINE = 0325h
  1001. META_ESCAPE = 0626h
  1002. META_RESTOREDC = 0127h
  1003. META_FILLREGION = 0228h
  1004. META_FRAMEREGION = 0429h
  1005. META_INVERTREGION = 012Ah
  1006. META_PAINTREGION = 012Bh
  1007. META_SELECTCLIPREGION = 012Ch
  1008. META_SELECTOBJECT = 012Dh
  1009. META_SETTEXTALIGN = 012Eh
  1010. META_DRAWTEXT = 062Fh
  1011. META_CHORD = 0830h
  1012. META_SETMAPPERFLAGS = 0231h
  1013. META_EXTTEXTOUT = 0a32h
  1014. META_SETDIBTODEV = 0d33h
  1015. META_SELECTPALETTE = 0234h
  1016. META_REALIZEPALETTE = 0035h
  1017. META_ANIMATEPALETTE = 0436h
  1018. META_SETPALENTRIES = 0037h
  1019. META_POLYPOLYGON = 0538h
  1020. META_RESIZEPALETTE = 0139h
  1021. META_DIBBITBLT = 0940h
  1022. META_DIBSTRETCHBLT = 0b41h
  1023. META_DIBCREATEPATTERNBRUSH = 0142h
  1024. META_STRETCHDIB = 0f43h
  1025. META_DELETEOBJECT = 01f0h
  1026. META_CREATEPALETTE = 00f7h
  1027. META_CREATEBRUSH = 00F8h
  1028. META_CREATEPATTERNBRUSH = 01F9h
  1029. META_CREATEPENINDIRECT = 02FAh
  1030. META_CREATEFONTINDIRECT = 02FBh
  1031. META_CREATEBRUSHINDIRECT = 02FCh
  1032. META_CREATEBITMAPINDIRECT = 02FDh
  1033. META_CREATEBITMAP = 06FEh
  1034. META_CREATEREGION = 06FFh
  1035. ; /* Clipboard Metafile Picture Structure */
  1036. HANDLETABLE struc
  1037. ht_objectHandle dw ?
  1038. HANDLETABLE ends
  1039. METARECORD struc
  1040. mr_rdSize dd ?
  1041. mr_rdFunction dw ?
  1042. mr_rdParm dw ?
  1043. METARECORD ends
  1044. METAFILEPICT struc
  1045. mfp_mm dw ?
  1046. mfp_xExt dw ?
  1047. mfp_yExt dw ?
  1048. mfp_hMF dw ?
  1049. METAFILEPICT ends
  1050. METAHEADER struc
  1051. mtType dw ?
  1052. mtHeaderSize dw ?
  1053. mtVersion dw ?
  1054. mtSize dd ?
  1055. mtNoObjects dw ?
  1056. mtMaxRecord dd ?
  1057. mtNoParameters dw ?
  1058. METAHEADER ends
  1059. endif ; NOMETAFILE
  1060. ; GDI Escapes
  1061. NEWFRAME = 1
  1062. ABORTDOC = 2
  1063. NEXTBAND = 3
  1064. SETCOLORTABLE = 4
  1065. GETCOLORTABLE = 5
  1066. FLUSHOUTPUT = 6
  1067. DRAFTMODE = 7
  1068. QUERYESCSUPPORT = 8
  1069. SETABORTPROC = 9
  1070. STARTDOC = 10
  1071. ;; This value conflicts with a std WIN386 MACRO definition
  1072. ;;ENDDOC = 11
  1073. GETPHYSPAGESIZE = 12
  1074. GETPRINTINGOFFSET = 13
  1075. GETSCALINGFACTOR = 14
  1076. MFCOMMENT = 15
  1077. GETPENWIDTH = 16
  1078. SETCOPYCOUNT = 17
  1079. SELECTPAPERSOURCE = 18
  1080. DEVICEDATA = 19
  1081. PASSTHROUGH = 19
  1082. GETTECHNOLGY = 20
  1083. GETTECHNOLOGY = 20
  1084. SETENDCAP = 21
  1085. SETLINEJOIN = 22
  1086. SETMITERLIMIT = 23
  1087. BANDINFO = 24
  1088. DRAWPATTERNRECT = 25
  1089. GETVECTORPENSIZE = 26
  1090. GETVECTORBRUSHSIZE = 27
  1091. ENABLEDUPLEX = 28
  1092. ENABLEMANUALFEED = 29
  1093. GETSETPAPERBINS = 29
  1094. GETSETPRINTORIENT = 30
  1095. ENUMPAPERBINS = 31
  1096. GETEXTENDEDTEXTMETRICS = 256
  1097. GETEXTENTTABLE = 257
  1098. GETPAIRKERNTABLE = 258
  1099. GETTRACKKERNTABLE = 259
  1100. EXTTEXTOUT = 512
  1101. ENABLERELATIVEWIDTHS = 768
  1102. ENABLEPAIRKERNING = 769
  1103. SETKERNTRACK = 770
  1104. SETALLJUSTVALUES = 771
  1105. SETCHARSET = 772
  1106. GETSETSCREENPARAMS = 3072
  1107. STRETCHBLT = 2048
  1108. ; Spooler Error Codes
  1109. SP_NOTREPORTED = 4000h
  1110. SP_ERROR = (-1)
  1111. SP_APPABORT = (-2)
  1112. SP_USERABORT = (-3)
  1113. SP_OUTOFDISK = (-4)
  1114. SP_OUTOFMEMORY = (-5)
  1115. PR_JOBSTATUS = 0000
  1116. ; Object Definitions for EnumObjects()
  1117. OBJ_PEN = 1
  1118. OBJ_BRUSH = 2
  1119. ;
  1120. ; Menu flags for Change/Check/Enable MenuItem
  1121. ;
  1122. MF_INSERT = 0000h
  1123. MF_CHANGE = 0080h
  1124. MF_APPEND = 0100h
  1125. MF_DELETE = 0200h
  1126. MF_REMOVE = 1000h
  1127. MF_BYCOMMAND = 0000h
  1128. MF_BYPOSITION = 0400h
  1129. MF_SEPARATOR = 0800h
  1130. MF_ENABLED = 0000h
  1131. MF_GRAYED = 0001h
  1132. MF_DISABLED = 0002h
  1133. MF_UNCHECKED = 0000h
  1134. MF_CHECKED = 0008h
  1135. MF_USECHECKBITMAPS= 0200h
  1136. MF_STRING = 0000h
  1137. MF_BITMAP = 0004h
  1138. MF_OWNERDRAW = 0100h
  1139. MF_POPUP = 0010h
  1140. MF_MENUBARBREAK = 0020h
  1141. MF_MENUBREAK = 0040h
  1142. MF_UNHILITE = 0000h
  1143. MF_HILITE = 0080h
  1144. MF_SYSMENU = 2000h
  1145. MF_HELP = 4000h
  1146. MF_MOUSESELECT = 8000h
  1147. ;
  1148. ; System Menu Command Values
  1149. ;
  1150. SC_SIZE = 0F000h
  1151. SC_MOVE = 0F010h
  1152. SC_MINIMIZE = 0F020h
  1153. SC_MAXIMIZE = 0F030h
  1154. SC_NEXTWINDOW = 0F040h
  1155. SC_PREVWINDOW = 0F050h
  1156. SC_CLOSE = 0F060h
  1157. SC_VSCROLL = 0F070h
  1158. SC_HSCROLL = 0F080h
  1159. SC_MOUSEMENU = 0F090h
  1160. SC_KEYMENU = 0F100h
  1161. SC_ARRANGE = 0F110h
  1162. SC_RESTORE = 0F120h
  1163. SC_TASKLIST = 0F130h
  1164. SC_SCREENSAVE = 0F140h
  1165. SC_HOTKEY = 0F150h
  1166. SC_ICON = SC_MINIMIZE
  1167. SC_ZOOM = SC_MAXIMIZE
  1168. ;
  1169. ; Window State Messages
  1170. ;
  1171. IFNDEF NOWM
  1172. WM_STATE = 0000H
  1173. WM_NULL = 0000h
  1174. WM_CREATE = 0001h
  1175. WM_DESTROY = 0002h
  1176. WM_MOVE = 0003h
  1177. WM_SIZE = 0005h
  1178. WM_ACTIVATE = 0006h
  1179. WM_SETFOCUS = 0007h
  1180. WM_KILLFOCUS = 0008h
  1181. WM_ENABLE = 000Ah
  1182. WM_SETREDRAW = 000Bh
  1183. WM_SETTEXT = 000Ch
  1184. WM_GETTEXT = 000Dh
  1185. WM_GETTEXTLENGTH = 000Eh
  1186. WM_PAINT = 000Fh
  1187. WM_CLOSE = 0010h
  1188. WM_QUERYENDSESSION = 0011h
  1189. WM_QUIT = 0012h
  1190. WM_QUERYOPEN = 0013h
  1191. WM_ERASEBKGND = 0014h
  1192. WM_SYSCOLORCHANGE = 0015h
  1193. WM_ENDSESSION = 0016h
  1194. WM_SHOWWINDOW = 0018h
  1195. WM_CTLCOLOR = 0019h
  1196. WM_WININICHANGE = 001Ah
  1197. WM_DEVMODECHANGE = 001Bh
  1198. WM_ACTIVATEAPP = 001Ch
  1199. WM_FONTCHANGE = 001Dh
  1200. WM_TIMECHANGE = 001Eh
  1201. WM_CANCELMODE = 001Fh
  1202. WM_SETCURSOR = 0020h
  1203. WM_MOUSEACTIVATE = 0021h
  1204. WM_CHILDACTIVATE = 0022h
  1205. WM_QUEUESYNC = 0023h
  1206. WM_GETMINMAXINFO = 0024h
  1207. WM_HELP = 0025h
  1208. WM_ICONERASEBKGND = 0027h
  1209. WM_NEXTDLGCTL = 0028h
  1210. WM_SPOOLERSTATUS = 002Ah
  1211. WM_DRAWITEM = 002Bh
  1212. WM_MEASUREITEM = 002Ch
  1213. WM_DELETEITEM = 002Dh
  1214. WM_VKEYTOITEM = 002Eh
  1215. WM_CHARTOITEM = 002Fh
  1216. WM_SETFONT = 0030h
  1217. WM_GETFONT = 0031h
  1218. WM_QUERYDRAGICON = 0037h
  1219. ;WM_WINHELP = 0038h ;Win32
  1220. WM_COMPAREITEM = 0039h
  1221. ;WM_FULLSCREEN = 003Ah ;Win32
  1222. ;WM_CLIENTSHUTDOWN = 003Bh ;Win32
  1223. ;WM_DDEMLEVENT = 003Ch ;Win32
  1224. ;MM_CALCSCROLL = 003Fh ;Win32
  1225. WM_COMPACTING = 0041h
  1226. ;WM_OTHERWINDOWCREATED = 0042h ;Win32
  1227. ;WM_OTHERWINDOWDESTROYED = 0043h ;Win32
  1228. WM_COMMNOTIFY = 0044h
  1229. WM_WINDOWPOSCHANGING= 0046h
  1230. WM_WINDOWPOSCHANGED = 0047h
  1231. WM_POWER = 0048h
  1232. ;WM_COPYGLOBALDATA = 0049h ;Win32
  1233. ;WM_COPYDATA = 004Ah ;Win32
  1234. ;WM_CANCELJOURNAL = 004Bh ;Win32
  1235. ;WM_LOGONNOTIFY = 004Ch ;Win32
  1236. WM_NOTIFY = 004Eh
  1237. ;WM_ACCESS_WINDOW = 004Fh ;Win32
  1238. WM_TCARD = 0052h
  1239. WM_HELP = 0053h
  1240. ;WM_FINALDESTROY = 0070h
  1241. WM_NCCREATE = 0081h
  1242. WM_NCDESTROY = 0082h
  1243. WM_NCCALCSIZE = 0083h
  1244. WM_NCHITTEST = 0084h
  1245. WM_NCPAINT = 0085h
  1246. WM_NCACTIVATE = 0086h
  1247. WM_GETDLGCODE = 0087h
  1248. WM_NCMOUSEMOVE = 00A0h
  1249. WM_NCLBUTTONDOWN = 00A1h
  1250. WM_NCLBUTTONUP = 00A2h
  1251. WM_NCLBUTTONDBLCLK = 00A3h
  1252. WM_NCRBUTTONDOWN = 00A4h
  1253. WM_NCRBUTTONUP = 00A5h
  1254. WM_NCRBUTTONDBLCLK = 00A6h
  1255. WM_NCMBUTTONDOWN = 00A7h
  1256. WM_NCMBUTTONUP = 00A8h
  1257. WM_NCMBUTTONDBLCLK = 00A9h
  1258. WM_KEYFIRST = 0100h
  1259. WM_KEYDOWN = 0100h
  1260. WM_KEYUP = 0101h
  1261. WM_CHAR = 0102h
  1262. WM_DEADCHAR = 0103h
  1263. WM_SYSKEYDOWN = 0104h
  1264. WM_SYSKEYUP = 0105h
  1265. WM_SYSCHAR = 0106h
  1266. WM_SYSDEADCHAR = 0107h
  1267. WM_KEYLAST = 0108h
  1268. WM_INTERIM = 010Ch
  1269. WM_INITDIALOG = 0110h
  1270. WM_COMMAND = 0111h
  1271. WM_SYSCOMMAND = 0112h
  1272. WM_TIMER = 0113h
  1273. WM_HSCROLL = 0114h
  1274. WM_VSCROLL = 0115h
  1275. WM_INITMENU = 0116h
  1276. WM_INITMENUPOPUP = 0117h
  1277. WM_MENUSELECT = 011Fh
  1278. WM_MENUCHAR = 0120h
  1279. WM_ENTERIDLE = 0121h
  1280. ;WM_CTLCOLORFIRST = 0132h ;Win32
  1281. ;WM_CTLCOLORMSGBOX = 0132h ;Win32
  1282. ;WM_CTLCOLOREDIT = 0133h ;Win32
  1283. ;WM_CTLCOLORLISTBOX = 0134h ;Win32
  1284. ;WM_CTLCOLORBTN = 0135h ;Win32
  1285. ;WM_CTLCOLORDLG = 0136h ;Win32
  1286. ;WM_CTLCOLORSCROLLBAR = 0137h ;Win32
  1287. ;WM_CTLCOLORSTATIC = 0138h ;Win32
  1288. ;WM_CTLCOLORLAST = 0138h ;Win32
  1289. ;CB_GETEDITSEL = 0140h ;Win32
  1290. ;CB_LIMITTEXT = 0141h ;Win32
  1291. ;CB_SETEDITSEL = 0142h ;Win32
  1292. ;CB_ADDSTRING = 0143h ;Win32
  1293. ;CB_DELETESTRING = 0144h ;Win32
  1294. ;CB_DIR = 0145h ;Win32
  1295. ;CB_GETCOUNT = 0146h ;Win32
  1296. ;CB_GETCURSEL = 0147h ;Win32
  1297. ;CB_GETLBTEXT = 0148h ;Win32
  1298. ;CB_GETLBTEXTLEN = 0149h ;Win32
  1299. ;CB_INSERTSTRING = 014Ah ;Win32
  1300. ;CB_RESETCONTENT = 014Bh ;Win32
  1301. ;CB_FINDSTRING = 014Ch ;Win32
  1302. ;CB_SELECTSTRING = 014Dh ;Win32
  1303. ;CB_SETCURSEL = 014Eh ;Win32
  1304. ;CB_SHOWDROPDOWN = 014Fh ;Win32
  1305. ;CB_GETITEMDATA = 0150h ;Win32
  1306. ;CB_SETITEMDATA = 0151h ;Win32
  1307. ;CB_GETDROPPEDCONTROLRECT = 0152h ;Win32
  1308. ;CB_SETITEMHEIGHT = 0153h ;Win32
  1309. ;CB_GETITEMHEIGHT = 0154h ;Win32
  1310. ;CB_SETEXTENDEDUI = 0155h ;Win32
  1311. ;CB_GETEXTENDEDUI = 0156h ;Win32
  1312. ;CB_GETDROPPEDSTATE = 0157h ;Win32
  1313. ;CB_FINDSTRINGEXACT = 0158h ;Win32
  1314. ;CB_SETLOCALE = 0159h ;Win32
  1315. ;CB_GETLOCALE = 015ah ;Win32
  1316. ;STM_SETICON = 0170h ;Win32
  1317. ;STM_GETICON = 0171h ;Win32
  1318. ;LB_ADDSTRING = 0180h ;Win32
  1319. ;LB_INSERTSTRING = 0181h ;Win32
  1320. ;LB_DELETESTRING = 0182h ;Win32
  1321. ;LB_SELITEMRANGEEX = 0183h ;Win32
  1322. ;LB_RESETCONTENT = 0184h ;Win32
  1323. ;LB_SETSEL = 0185h ;Win32
  1324. ;LB_SETCURSEL = 0186h ;Win32
  1325. ;LB_GETSEL = 0187h ;Win32
  1326. ;LB_GETCURSEL = 0188h ;Win32
  1327. ;LB_GETTEXT = 0189h ;Win32
  1328. ;LB_GETTEXTLEN = 018Ah ;Win32
  1329. ;LB_GETCOUNT = 018Bh ;Win32
  1330. ;LB_SELECTSTRING = 018Ch ;Win32
  1331. ;LB_DIR = 018Dh ;Win32
  1332. ;LB_GETTOPINDEX = 018Eh ;Win32
  1333. ;LB_FINDSTRING = 018Fh ;Win32
  1334. ;LB_GETSELCOUNT = 0190h ;Win32
  1335. ;LB_GETSELITEMS = 0191h ;Win32
  1336. ;LB_SETTABSTOPS = 0192h ;Win32
  1337. ;LB_GETHORIZONTALEXTENT = 0193h ;Win32
  1338. ;LB_SETHORIZONTALEXTENT = 0194h ;Win32
  1339. ;LB_SETCOLUMNWIDTH = 0195h ;Win32
  1340. ;LB_ADDFILE = 0196h ;Win32
  1341. ;LB_SETTOPINDEX = 0197h ;Win32
  1342. ;LB_GETITEMRECT = 0198h ;Win32
  1343. ;LB_GETITEMDATA = 0199h ;Win32
  1344. ;LB_SETITEMDATA = 019Ah ;Win32
  1345. ;LB_SELITEMRANGE = 019Bh ;Win32
  1346. ;LB_SETANCHORINDEX = 019Ch ;Win32
  1347. ;LB_GETANCHORINDEX = 019Dh ;Win32
  1348. ;LB_SETCARETINDEX = 019Eh ;Win32
  1349. ;LB_GETCARETINDEX = 019Fh ;Win32
  1350. ;LB_SETITEMHEIGHT = 01A0h ;Win32
  1351. ;LB_GETITEMHEIGHT = 01A1h ;Win32
  1352. ;LB_FINDSTRINGEXACT = 01A2h ;Win32
  1353. ;LBCB_CARETON = 01A3h ;Win32
  1354. ;LBCB_CARETOFF = 01A4h ;Win32
  1355. ;LB_SETLOCALE = 01A5h ;Win32
  1356. ;LB_GETLOCALE = 01A6h ;Win32
  1357. ;LB_SETCOUNT = 01A7h ;Win32
  1358. ;MN_SETHMENU = 01E0h ;Win32
  1359. ;MN_GETHMENU = 01E1h ;Win32
  1360. ;MN_SIZEWINDOW = 01E2h ;Win32
  1361. ;MN_OPENHIERARCHY = 01E3h ;Win32
  1362. ;MN_CLOSEHIERARCHY = 01E4h ;Win32
  1363. ;MN_SELECTITEM = 01E5h ;Win32
  1364. ;MN_CANCELMENUS = 01E6h ;Win32
  1365. ;MN_SELECTFIRSTVALIDITEM = 01E7h ;Win32
  1366. ;MN_GETPPOPUPMENU = 01EAh ;Win32
  1367. ;MN_FINDMENUWINDOWFROMPOINT = 01EBh ;Win32
  1368. ;MN_SHOWPOPUPWINDOW = 01ECh ;Win32
  1369. ;MN_BUTTONDOWN = 01EDh ;Win32
  1370. ;MN_MOUSEMOVE = 01EEh ;Win32
  1371. ;MN_BUTTONUP = 01EFh ;Win32
  1372. ;MN_SETTIMERTOOPENHIERARCHY = 01F0 ;Win32
  1373. WM_MOUSEFIRST = 0200h
  1374. WM_MOUSEMOVE = 0200h
  1375. WM_LBUTTONDOWN = 0201h
  1376. WM_LBUTTONUP = 0202h
  1377. WM_LBUTTONDBLCLK = 0203h
  1378. WM_RBUTTONDOWN = 0204h
  1379. WM_RBUTTONUP = 0205h
  1380. WM_RBUTTONDBLCLK = 0206h
  1381. WM_MBUTTONDOWN = 0207h
  1382. WM_MBUTTONUP = 0208h
  1383. WM_MBUTTONDBLCLK = 0209h
  1384. WM_MOUSELAST = 0209h
  1385. WM_PARENTNOTIFY = 0210h
  1386. WM_MDICREATE = 0220h
  1387. WM_MDIDESTROY = 0221h
  1388. WM_MDIACTIVATE = 0222h
  1389. WM_MDIRESTORE = 0223h
  1390. WM_MDINEXT = 0224h
  1391. WM_MDIMAXIMIZE = 0225h
  1392. WM_MDITILE = 0226h
  1393. WM_MDICASCADE = 0227h
  1394. WM_MDIICONARRANGE = 0228h
  1395. WM_MDIGETACTIVE = 0229h
  1396. WM_MDISETMENU = 0230h
  1397. WM_DROPFILES = 0233h
  1398. ;WM_MDIREFRESHMENU = 0234h ;Win32
  1399. WM_HANGEULLAST = 029Fh ;Win32
  1400. WM_CUT = 0300h
  1401. WM_COPY = 0301h
  1402. WM_PASTE = 0302h
  1403. WM_CLEAR = 0303h
  1404. WM_UNDO = 0304h
  1405. WM_RENDERFORMAT = 0305h
  1406. WM_RENDERALLFORMATS = 0306h
  1407. WM_DESTROYCLIPBOARD = 0307h
  1408. WM_DRAWCLIPBOARD = 0308h
  1409. WM_PAINTCLIPBOARD = 0309h
  1410. WM_VSCROLLCLIPBOARD = 030Ah
  1411. WM_SIZECLIPBOARD = 030Bh
  1412. WM_ASKCBFORMATNAME = 030Ch
  1413. WM_CHANGECBCHAIN = 030Dh
  1414. WM_HSCROLLCLIPBOARD = 030Eh
  1415. WM_QUERYNEWPALETTE = 030Fh
  1416. WM_PALETTEISCHANGING = 0310h
  1417. WM_PALETTECHANGED = 0311h
  1418. ;WM_HOTKEY = 0312h ;Win32
  1419. ;WM_HOOKMSG = 0314h ;Win32
  1420. ;WM_EXITPROCESS = 0315h ;Win32
  1421. WM_PRINT = 0317h
  1422. WM_PRINTCLIENT = 0318h
  1423. WM_PENWINFIRST equ 0380h
  1424. WM_PENWINLAST equ 038Fh
  1425. WM_COALESCE_FIRST equ 0390h
  1426. WM_COALESCE_LAST equ 039Fh
  1427. ; private window messages start here
  1428. WM_USER = 0400H
  1429. ; private app messages start here
  1430. WM_APP = 8000H
  1431. ENDIF ; NOWM
  1432. ; WM_MOUSEACTIVATE Return Codes
  1433. MA_ACTIVATE = 1
  1434. MA_ACTIVATEANDEAT = 2
  1435. MA_NOACTIVATE = 3
  1436. ; Size message commands
  1437. SIZENORMAL = 0
  1438. SIZEICONIC = 1
  1439. SIZEFULLSCREEN = 2
  1440. SIZEZOOMSHOW = 3
  1441. SIZEZOOMHIDE = 4
  1442. ; ShowWindow() Commands
  1443. SW_HIDE = 0
  1444. SW_SHOWNORMAL = 1
  1445. SW_NORMAL = 1
  1446. SW_SHOWMINIMIZED = 2
  1447. SW_SHOWMAXIMIZED = 3
  1448. SW_MAXIMIZE = 3
  1449. SW_SHOWNOACTIVATE = 4
  1450. SW_SHOW = 5
  1451. SW_MINIMIZE = 6
  1452. SW_SHOWMINNOACTIVE = 7
  1453. SW_SHOWNA = 8
  1454. SW_RESTORE = 9
  1455. ; Old ShowWindow() Commands
  1456. HIDE_WINDOW = 0
  1457. SHOW_OPENWINDOW = 1
  1458. SHOW_ICONWINDOW = 2
  1459. SHOW_FULLSCREEN = 3
  1460. SHOW_OPENNOACTIVATE= 4
  1461. ; identifiers for the WM_SHOWWINDOW message
  1462. SW_PARENTCLOSING = 1
  1463. SW_OTHERZOOM = 2
  1464. SW_PARENTOPENING = 3
  1465. SW_OTHERUNZOOM = 4
  1466. ;
  1467. ; Key state masks for mouse messages
  1468. ;
  1469. MK_LBUTTON = 0001h
  1470. MK_RBUTTON = 0002h
  1471. MK_SHIFT = 0004h
  1472. MK_CONTROL = 0008h
  1473. MK_MBUTTON = 0010h
  1474. ;
  1475. ; Class styles
  1476. ;
  1477. CS_VREDRAW = 0001h
  1478. CS_HREDRAW = 0002h
  1479. CS_KEYCVTWINDOW = 0004H
  1480. CS_DBLCLKS = 0008h
  1481. ; 0010h reserved
  1482. CS_OWNDC = 0020h
  1483. CS_CLASSDC = 0040h
  1484. CS_PARENTDC = 0080h
  1485. CS_NOKEYCVT = 0100h
  1486. CS_SAVEBITS = 0800h
  1487. CS_NOCLOSE = 0200h
  1488. CS_BYTEALIGNCLIENT = 1000h
  1489. CS_BYTEALIGNWINDOW = 2000h
  1490. CS_GLOBALCLASS = 4000h ; Global window class
  1491. ;
  1492. ; Special CreateWindow position value
  1493. ;
  1494. CW_USEDEFAULT EQU 8000h
  1495. ;
  1496. ; Windows styles (the high words)
  1497. ;
  1498. WS_OVERLAPPED = 00000h
  1499. WS_ICONICPOPUP = 0C000h
  1500. WS_POPUP = 08000h
  1501. WS_CHILD = 04000h
  1502. WS_MINIMIZE = 02000h
  1503. WS_VISIBLE = 01000h
  1504. WS_DISABLED = 00800h
  1505. WS_CLIPSIBLINGS = 00400h
  1506. WS_CLIPCHILDREN = 00200h
  1507. WS_MAXIMIZE = 00100h
  1508. WS_CAPTION = 000C0h ; WS_BORDER | WS_DLGFRAME
  1509. WS_BORDER = 00080h
  1510. WS_DLGFRAME = 00040h
  1511. WS_VSCROLL = 00020h
  1512. WS_HSCROLL = 00010h
  1513. WS_SYSMENU = 00008h
  1514. WS_THICKFRAME = 00004h
  1515. WS_HREDRAW = 00002h
  1516. WS_VREDRAW = 00001h
  1517. WS_GROUP = 00002h
  1518. WS_TABSTOP = 00001h
  1519. WS_MINIMIZEBOX = 00002h
  1520. WS_MAXIMIZEBOX = 00001h
  1521. ; Common Window Styles
  1522. WS_OVERLAPPEDWINDOW = WS_OVERLAPPED + WS_CAPTION + WS_SYSMENU + WS_THICKFRAME + WS_MINIMIZEBOX + WS_MAXIMIZEBOX
  1523. WS_POPUPWINDOW = WS_POPUP + WS_BORDER + WS_SYSMENU
  1524. WS_CHILDWINDOW = WS_CHILD
  1525. WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW
  1526. WS_TILED = WS_OVERLAPPED
  1527. WS_ICONIC = WS_MINIMIZE
  1528. WS_SIZEBOX = WS_THICKFRAME
  1529. ; Extended Window Styles (low words)
  1530. WS_EX_DLGMODALFRAME = 0001
  1531. WS_EX_DRAGOBJECT = 0002
  1532. WS_EX_NOPARENTNOTIFY = 0004
  1533. WS_EX_TOPMOST = 0008
  1534. ;
  1535. ; predefined clipboard formats
  1536. ;
  1537. CF_TEXT = 1
  1538. CF_BITMAP = 2
  1539. CF_METAFILEPICT = 3
  1540. CF_SYLK = 4
  1541. CF_DIF = 5
  1542. CF_TIFF = 6
  1543. CF_OEMTEXT = 7
  1544. CF_DIB = 8
  1545. CF_PALETTE = 9
  1546. CF_PENDATA = 10
  1547. CF_RIFF = 11
  1548. CF_WAVE = 12
  1549. CF_OWNERDISPLAY = 80h ; owner display
  1550. CF_DSPTEXT = 81h ; display text
  1551. CF_DSPBITMAP = 82h ; display bitmap
  1552. CF_DSPMETAFILEPICT = 83h ; display metafile
  1553. ;
  1554. ; Private clipboard format range
  1555. ;
  1556. CF_PRIVATEFIRST = 200h ; Anything in this range doesn't
  1557. CF_PRIVATELAST = 2ffh ; get GlobalFree'd
  1558. CF_GDIOBJFIRST = 300h ; Anything in this range gets
  1559. CF_GDIOBJLAST = 3ffh ; DeleteObject'ed
  1560. MAKEINTRESOURCE MACRO a
  1561. mov ax,a
  1562. xor dx,dx
  1563. ENDM
  1564. ;
  1565. ; Predefined resource types
  1566. ;
  1567. RT_CURSOR = 1 ; must be passed through MAKEINTRESOURCE
  1568. RT_BITMAP = 2
  1569. RT_ICON = 3
  1570. RT_MENU = 4
  1571. RT_DIALOG = 5
  1572. RT_STRING = 6
  1573. RT_FONTDIR = 7
  1574. RT_FONT = 8
  1575. RT_ACCELERATOR = 9
  1576. RT_RCDATA = 10
  1577. ;** NOTE: if any new resource types are introduced above this point, then the
  1578. ;** value of DIFFERENCE must be changed.
  1579. ;** (RT_GROUP_CURSOR - RT_CURSOR) must always be equal to DIFFERENCE
  1580. ;** (RT_GROUP_ICON - RT_ICON) must always be equal to DIFFERENCE
  1581. DIFFERENCE = 11
  1582. RT_GROUP_CURSOR = RT_CURSOR + DIFFERENCE
  1583. RT_GROUP_ICON = RT_ICON + DIFFERENCE
  1584. IFNDEF NOMDI
  1585. MDICREATESTRUCT struc
  1586. szClass dd ?
  1587. szTitle dd ?
  1588. hOwner dw ?
  1589. x dw ?
  1590. y dw ?
  1591. cxc dw ?
  1592. cyc dw ?
  1593. style dd ?
  1594. MDICREATESTRUCT ends
  1595. CLIENTCREATESTRUCT struc
  1596. hWindowMenu dw ?
  1597. idFirstChild dw ?
  1598. CLIENTCREATESTRUCT ends
  1599. ENDIF
  1600. ; NOMDI
  1601. PALETTEENTRY struc
  1602. peRed db ?
  1603. peGreen db ?
  1604. peBlue db ?
  1605. peFlags db ?
  1606. PALETTEENTRY ends
  1607. ; Logical Palette
  1608. LOGPALETTE struc
  1609. palVersion dw ?
  1610. palNumEntries dw ?
  1611. palPalEntry db ? ; array of PALETTEENTRY
  1612. LOGPALETTE ends
  1613. ; DRAWITEMSTRUCT for ownerdraw
  1614. DRAWITEMSTRUCT struc
  1615. drCtlType dw ?
  1616. drCtlID dw ?
  1617. dritemID dw ?
  1618. dritemAction dw ?
  1619. dritemState dw ?
  1620. drhwndItem dw ?
  1621. drhDC dw ?
  1622. drrcItem DB size RECT dup(?)
  1623. dritemData dd ?
  1624. DRAWITEMSTRUCT ends
  1625. ; DELETEITEMSTRUCT for ownerdraw
  1626. DELETEITEMSTRUCT struc
  1627. deCtlType dw ?
  1628. deCtlID dw ?
  1629. deitemID dw ?
  1630. dehwndItem dw ?
  1631. deitemData dd ?
  1632. DELETEITEMSTRUCT ends
  1633. ; MEASUREITEMSTRUCT for ownerdraw
  1634. MEASUREITEMSTRUCT struc
  1635. meCtlType dw ?
  1636. meCtlID dw ?
  1637. meitemID dw ?
  1638. meitemWidth dw ?
  1639. meitemHeight dw ?
  1640. meitemData dd ?
  1641. MEASUREITEMSTRUCT ends
  1642. ; COMPAREITEMSTUCT for ownerdraw sorting
  1643. COMPAREITEMSTRUCT struc
  1644. coCtlType dw ?
  1645. coCtlID dw ?
  1646. cohwndItem dw ?
  1647. coitemID1 dw ?
  1648. coitemData1 dd ?
  1649. coitemID2 dw ?
  1650. coitemData2 dd ?
  1651. COMPAREITEMSTRUCT ends
  1652. ; Owner draw control types
  1653. ODT_MENU = 1
  1654. ODT_LISTBOX = 2
  1655. ODT_COMBOBOX = 3
  1656. ODT_BUTTON = 4
  1657. ; Owner draw actions
  1658. ODA_DRAWENTIRE = 1
  1659. ODA_SELECT = 2
  1660. ODA_FOCUS = 4
  1661. ; Owner draw state
  1662. ODS_SELECTED = 0001h
  1663. ODS_GRAYED = 0002h
  1664. ODS_DISABLED = 0004h
  1665. ODS_CHECKED = 0008h
  1666. ODS_FOCUS = 0010h
  1667. ; PeekMessage() Options
  1668. PM_NOREMOVE = 0000h
  1669. PM_REMOVE = 0001h
  1670. PM_NOYIELD = 0002h
  1671. ; SetWindowPos Flags
  1672. SWP_NOSIZE = 0001h
  1673. SWP_NOMOVE = 0002h
  1674. SWP_NOZORDER = 0004h
  1675. SWP_NOREDRAW = 0008h
  1676. SWP_NOACTIVATE = 0010h
  1677. SWP_DRAWFRAME = 0020h
  1678. SWP_SHOWWINDOW = 0040h
  1679. SWP_HIDEWINDOW = 0080h
  1680. SWP_NOCOPYBITS = 0100h
  1681. SWP_NOREPOSITION = 0200h
  1682. IFNDEF NOWINMESSAGES
  1683. ; Listbox messages
  1684. LB_ADDSTRING = (WM_USER+1)
  1685. LB_INSERTSTRING = (WM_USER+2)
  1686. LB_DELETESTRING = (WM_USER+3)
  1687. LB_RESETCONTENT = (WM_USER+5)
  1688. LB_SETSEL = (WM_USER+6)
  1689. LB_SETCURSEL = (WM_USER+7)
  1690. LB_GETSEL = (WM_USER+8)
  1691. LB_GETCURSEL = (WM_USER+9)
  1692. LB_GETTEXT = (WM_USER+10)
  1693. LB_GETTEXTLEN = (WM_USER+11)
  1694. LB_GETCOUNT = (WM_USER+12)
  1695. LB_SELECTSTRING = (WM_USER+13)
  1696. LB_DIR = (WM_USER+14)
  1697. LB_GETTOPINDEX = (WM_USER+15)
  1698. LB_FINDSTRING = (WM_USER+16)
  1699. LB_GETSELCOUNT = (WM_USER+17)
  1700. LB_GETSELITEMS = (WM_USER+18)
  1701. LB_SETTABSTOPS = (WM_USER+19)
  1702. LB_GETHORIZONTALEXTENT = (WM_USER+20)
  1703. LB_SETHORIZONTALEXTENT = (WM_USER+21)
  1704. LB_SETTOPINDEX = (WM_USER+24)
  1705. LB_GETITEMRECT = (WM_USER+25)
  1706. LB_GETITEMDATA = (WM_USER+26)
  1707. LB_SETITEMDATA = (WM_USER+27)
  1708. LB_SELITEMRANGE = (WM_USER+28)
  1709. LB_SETCARETINDEX = (WM_USER+31)
  1710. LB_GETCARETINDEX = (WM_USER+32)
  1711. IFNDEF NOWIN31
  1712. LB_SETITEMHEIGHT = (WM_USER+33)
  1713. LB_GETITEMHEIGHT = (WM_USER+34)
  1714. LB_FINDSTRINGEXACT = (WM_USER+35)
  1715. ENDIF
  1716. LB_SETLOCALE = (WM_USER+38) ; Win NT
  1717. LB_GETLOCALE = (WM_USER+39) ; Win NT
  1718. ;; LB_SETCOUNT = (WM_USER+40) ; Win NT
  1719. LB_INITSTORAGE = (WM_USER+41)
  1720. ENDIF
  1721. ; NOWINMESSAGES
  1722. ; Listbox Styles
  1723. LBS_NOTIFY = 0001h
  1724. LBS_SORT = 0002h
  1725. LBS_NOREDRAW = 0004h
  1726. LBS_MULTIPLESEL = 0008h
  1727. LBS_OWNERDRAWFIXED = 0010h
  1728. LBS_OWNERDRAWVARIABLE = 0020h
  1729. LBS_HASSTRINGS = 0040h
  1730. LBS_USETABSTOPS = 0080h
  1731. LBS_NOINTEGRALHEIGHT = 0100h
  1732. LBS_MULTICOLUMN = 0200h
  1733. LBS_WANTKEYBOARDINPUT = 0400h
  1734. LBS_EXTENDEDSEL = 0800h
  1735. LBS_STANDARD = LBS_NOTIFY + LBS_SORT + WS_VSCROLL + WS_BORDER
  1736. LBS_DISABLENOSCROLL = 1000h
  1737. ; Listbox Notification Codes
  1738. LBN_ERRSPACE = (-2)
  1739. LBN_SELCHANGE = 1
  1740. LBN_DBLCLK = 2
  1741. LBN_SELCANCEL = 3
  1742. LBN_SETFOCUS = 4
  1743. LBN_KILLFOCUS = 5
  1744. IFNDEF NOWINMESSAGES
  1745. ; Edit Control Messages
  1746. EM_GETSEL = (WM_USER+0)
  1747. EM_SETSEL = (WM_USER+1)
  1748. EM_GETRECT = (WM_USER+2)
  1749. EM_SETRECT = (WM_USER+3)
  1750. EM_SETRECTNP = (WM_USER+4)
  1751. EM_SCROLL = (WM_USER+5)
  1752. EM_LINESCROLL = (WM_USER+6)
  1753. EM_GETMODIFY = (WM_USER+8)
  1754. EM_SETMODIFY = (WM_USER+9)
  1755. EM_GETLINECOUNT = (WM_USER+10)
  1756. EM_LINEINDEX = (WM_USER+11)
  1757. EM_SETHANDLE = (WM_USER+12)
  1758. EM_GETHANDLE = (WM_USER+13)
  1759. EM_LINELENGTH = (WM_USER+17)
  1760. EM_REPLACESEL = (WM_USER+18)
  1761. EM_SETFONT = (WM_USER+19)
  1762. EM_GETLINE = (WM_USER+20)
  1763. EM_LIMITTEXT = (WM_USER+21)
  1764. EM_CANUNDO = (WM_USER+22)
  1765. EM_UNDO = (WM_USER+23)
  1766. EM_FMTLINES = (WM_USER+24)
  1767. EM_LINEFROMCHAR = (WM_USER+25)
  1768. EM_SETWORDBREAK = (WM_USER+26)
  1769. EM_SETTABSTOPS = (WM_USER+27)
  1770. EM_SETPASSWORDCHAR = (WM_USER+28)
  1771. EM_EMPTYUNDOBUFFER = (WM_USER+29)
  1772. IFNDEF NOWIN31
  1773. EM_GETFIRSTVISIBLELINE = (WM_USER+30)
  1774. EM_SETREADONLY = (WM_USER+31)
  1775. EM_SETWORDBREAKPROC = (WM_USER+32)
  1776. EM_GETWORDBREAKPROC = (WM_USER+33)
  1777. EM_GETPASSWORDCHAR = (WM_USER+34)
  1778. ENDIF
  1779. ENDIF
  1780. ; NOWINMESSAGES
  1781. ; Edit Control Styles (low word)
  1782. ES_LEFT = 0000h
  1783. ES_CENTER = 0001h
  1784. ES_RIGHT = 0002h
  1785. ES_MULTILINE = 0004h
  1786. ES_UPPERCASE = 0008h
  1787. ES_LOWERCASE = 0010h
  1788. ES_PASSWORD = 0020h
  1789. ES_AUTOVSCROLL = 0040h
  1790. ES_AUTOHSCROLL = 0080h
  1791. ES_NOHIDESEL = 0100h
  1792. ES_OEMCONVERT = 0400h
  1793. IFNDEF NOWIN31
  1794. ES_READONLY = 0800h
  1795. ES_WANTRETURN = 1000h
  1796. ENDIF
  1797. ; Edit Control Notification Codes
  1798. EN_SETFOCUS = 0100h
  1799. EN_KILLFOCUS = 0200h
  1800. EN_CHANGE = 0300h
  1801. EN_UPDATE = 0400h
  1802. EN_ERRSPACE = 0500h
  1803. EN_MAXTEXT = 0501h
  1804. EN_HSCROLL = 0601h
  1805. EN_VSCROLL = 0602h
  1806. IFNDEF NOWINMESSAGES
  1807. ; Button Control Messages
  1808. BM_GETCHECK = (WM_USER+0)
  1809. BM_SETCHECK = (WM_USER+1)
  1810. BM_GETSTATE = (WM_USER+2)
  1811. BM_SETSTATE = (WM_USER+3)
  1812. BM_SETSTYLE = (WM_USER+4)
  1813. ENDIF
  1814. ; NOWINMESSAGES
  1815. ; Button Control Styles (low word)
  1816. BS_PUSHBUTTON = 00h
  1817. BS_DEFPUSHBUTTON = 01h
  1818. BS_CHECKBOX = 02h
  1819. BS_AUTOCHECKBOX = 03h
  1820. BS_RADIOBUTTON = 04h
  1821. BS_3STATE = 05h
  1822. BS_AUTO3STATE = 06h
  1823. BS_GROUPBOX = 07h
  1824. BS_USERBUTTON = 08h
  1825. BS_AUTORADIOBUTTON = 09h
  1826. BS_OWNERDRAW = 0Bh
  1827. BS_LEFTTEXT = 20h
  1828. ; User Button Notification Codes
  1829. BN_CLICKED = 0
  1830. BN_PAINT = 1
  1831. BN_HILITE = 2
  1832. BN_UNHILITE = 3
  1833. BN_DISABLE = 4
  1834. BN_DOUBLECLICKED = 5
  1835. ; Dialog Styles (low words)
  1836. DS_ABSALIGN = 01h
  1837. DS_SYSMODAL = 02h
  1838. DS_LOCALEDIT = 20h ;/* Edit items get Local storage. */
  1839. DS_SETFONT = 40h ;/* User specified font for Dlg controls */
  1840. DS_MODALFRAME = 80h ;/* Can be combined with WS_CAPTION */
  1841. DS_NOIDLEMSG = 100h ;/* WM_ENTERIDLE message will not be sent */
  1842. IFNDEF NOWINMESSAGES
  1843. ; Dialog box messages
  1844. DM_GETDEFID = (WM_USER+0)
  1845. DM_SETDEFID = (WM_USER+1)
  1846. ENDIF ;NOWINMESSAGES
  1847. ; Dialog Codes
  1848. DLGC_WANTARROWS = 0001h ; /* Control wants arrow keys */
  1849. DLGC_WANTTAB = 0002h ; /* Control wants tab keys */
  1850. DLGC_WANTALLKEYS = 0004h ; /* Control wants all keys */
  1851. DLGC_WANTMESSAGE = 0004h ; /* Pass message to control */
  1852. DLGC_HASSETSEL = 0008h ; /* Understands EM_SETSEL message */
  1853. DLGC_DEFPUSHBUTTON = 0010h ; /* Default pushbutton */
  1854. DLGC_UNDEFPUSHBUTTON= 0020h ; /* Non-default pushbutton */
  1855. DLGC_RADIOBUTTON = 0040h ; /* Radio button */
  1856. DLGC_WANTCHARS = 0080h ; /* Want WM_CHAR messages */
  1857. DLGC_STATIC = 0100h ; /* Static item: don't include */
  1858. DLGC_BUTTON = 2000h ; /* Button item: can be checked */
  1859. ; Combo Box return Values
  1860. CB_OKAY = 0
  1861. CB_ERR = (-1)
  1862. CB_ERRSPACE = (-2)
  1863. ; Combo Box Notification Codes
  1864. CBN_ERRSPACE = (-1)
  1865. CBN_SELCHANGE = 1
  1866. CBN_DBLCLK = 2
  1867. CBN_SETFOCUS = 3
  1868. CBN_KILLFOCUS = 4
  1869. CBN_EDITCHANGE = 5
  1870. CBN_EDITUPDATE = 6
  1871. CBN_DROPDOWN = 7
  1872. ; Combo Box styles (low words)
  1873. CBS_SIMPLE = 0001h
  1874. CBS_DROPDOWN = 0002h
  1875. CBS_DROPDOWNLIST = 0003h
  1876. CBS_OWNERDRAWFIXED = 0010h
  1877. CBS_OWNERDRAWVARIABLE= 0020h
  1878. CBS_AUTOHSCROLL = 0040h
  1879. CBS_OEMCONVERT = 0080h
  1880. CBS_SORT = 0100h
  1881. CBS_HASSTRINGS = 0200h
  1882. CBS_NOINTEGRALHEIGHT = 0400h
  1883. IFNDEF NOWINMESSAGES
  1884. ; Combo Box messages
  1885. CB_GETEDITSEL = (WM_USER+0)
  1886. CB_LIMITTEXT = (WM_USER+1)
  1887. CB_SETEDITSEL = (WM_USER+2)
  1888. CB_ADDSTRING = (WM_USER+3)
  1889. CB_DELETESTRING = (WM_USER+4)
  1890. CB_DIR = (WM_USER+5)
  1891. CB_GETCOUNT = (WM_USER+6)
  1892. CB_GETCURSEL = (WM_USER+7)
  1893. CB_GETLBTEXT = (WM_USER+8)
  1894. CB_GETLBTEXTLEN = (WM_USER+9)
  1895. CB_INSERTSTRING = (WM_USER+10)
  1896. CB_RESETCONTENT = (WM_USER+11)
  1897. CB_FINDSTRING = (WM_USER+12)
  1898. CB_SELECTSTRING = (WM_USER+13)
  1899. CB_SETCURSEL = (WM_USER+14)
  1900. CB_SHOWDROPDOWN = (WM_USER+15)
  1901. CB_GETITEMDATA = (WM_USER+16)
  1902. CB_SETITEMDATA = (WM_USER+17)
  1903. IFNDEF NOWIN31
  1904. CB_GETDROPPEDCONTROLRECT = (WM_USER+18)
  1905. CB_SETITEMHEIGHT = (WM_USER+19)
  1906. CB_GETITEMHEIGHT = (WM_USER+20)
  1907. CB_SETEXTENDEDUI = (WM_USER+21)
  1908. CB_GETEXTENDEDUI = (WM_USER+22)
  1909. CB_GETDROPPEDSTATE = (WM_USER+23)
  1910. CB_FINDSTRINGEXACT = (WM_USER+24)
  1911. ENDIF
  1912. ENDIF ; NOWINMESSAGES
  1913. ; Static Control styles (low word)
  1914. SS_LEFT = 00h
  1915. SS_CENTER = 01h
  1916. SS_RIGHT = 02h
  1917. SS_ICON = 03h
  1918. SS_BLACKRECT = 04h
  1919. SS_GRAYRECT = 05h
  1920. SS_WHITERECT = 06h
  1921. SS_BLACKFRAME = 07h
  1922. SS_GRAYFRAME = 08h
  1923. SS_WHITEFRAME = 09h
  1924. SS_SIMPLE = 0Bh
  1925. SS_LEFTNOWORDWRAP = 0Ch
  1926. SS_NOPREFIX = 80h ; Don't do "&" character translation
  1927. IFNDEF NOWIN31
  1928. IFNDEF NOWINMESSAGES
  1929. ;Static Control Messages
  1930. STM_SETICON = (WM_USER+0)
  1931. STM_GETICON = (WM_USER+1)
  1932. ENDIF
  1933. ENDIF
  1934. ; Scroll Bar Styles (low word)
  1935. SBS_HORZ = 0000h
  1936. SBS_VERT = 0001h
  1937. SBS_TOPALIGN = 0002h
  1938. SBS_LEFTALIGN = 0002h
  1939. SBS_BOTTOMALIGN = 0004h
  1940. SBS_RIGHTALIGN = 0004h
  1941. SBS_SIZEBOXTOPLEFTALIGN = 0002h
  1942. SBS_SIZEBOXBOTTOMRIGHTALIGN = 0004h
  1943. SBS_SIZEBOX = 0008h
  1944. IFNDEF NOSYSMETRICS
  1945. ; GetSystemMetrics() codes
  1946. SM_CXSCREEN = 0
  1947. SM_CYSCREEN = 1
  1948. SM_CXVSCROLL = 2
  1949. SM_CYHSCROLL = 3
  1950. SM_CYCAPTION = 4
  1951. SM_CXBORDER = 5
  1952. SM_CYBORDER = 6
  1953. SM_CXDLGFRAME = 7
  1954. SM_CYDLGFRAME = 8
  1955. SM_CYVTHUMB = 9
  1956. SM_CXHTHUMB = 10
  1957. SM_CXICON = 11
  1958. SM_CYICON = 12
  1959. SM_CXCURSOR = 13
  1960. SM_CYCURSOR = 14
  1961. SM_CYMENU = 15
  1962. SM_CXFULLSCREEN = 16
  1963. SM_CYFULLSCREEN = 17
  1964. SM_CYKANJIWINDOW = 18
  1965. SM_MOUSEPRESENT = 19
  1966. SM_CYVSCROLL = 20
  1967. SM_CXHSCROLL = 21
  1968. SM_DEBUG = 22
  1969. SM_SWAPBUTTON = 23
  1970. SM_RESERVED1 = 24
  1971. SM_RESERVED2 = 25
  1972. SM_RESERVED3 = 26
  1973. SM_RESERVED4 = 27
  1974. SM_CXMIN = 28
  1975. SM_CYMIN = 29
  1976. SM_CXSIZE = 30
  1977. SM_CYSIZE = 31
  1978. SM_CXFRAME = 32
  1979. SM_CYFRAME = 33
  1980. SM_CXMINTRACK = 34
  1981. SM_CYMINTRACK = 35
  1982. IFNDEF NOWIN31
  1983. SM_CXDOUBLECLK = 36
  1984. SM_CYDOUBLECLK = 37
  1985. SM_CXICONSPACING = 38
  1986. SM_CYICONSPACING = 39
  1987. SM_MENUDROPALIGNMENT = 40
  1988. SM_PENWINDOWS = 41
  1989. SM_DBCSENABLED = 42
  1990. SM_CMOUSEBUTTONS = 43
  1991. SM_SECURE = 44
  1992. ENDIF
  1993. IFNDEF NOWIN40
  1994. SM_CXEDGE = 45
  1995. SM_CYEDGE = 46
  1996. SM_CXMINSPACING = 47
  1997. SM_CYMINSPACING = 48
  1998. SM_CXSMICON = 49
  1999. SM_CYSMICON = 50
  2000. SM_CYSMCAPTION = 51
  2001. SM_CXSMSIZE = 52
  2002. SM_CYSMSIZE = 53
  2003. SM_CXMENUSIZE = 54
  2004. SM_CYMENUSIZE = 55
  2005. SM_ARRANGE = 56
  2006. SM_USERTYPE = 57
  2007. SM_XWORKAREA = 58
  2008. SM_YWORKAREA = 59
  2009. SM_CXWORKAREA = 60
  2010. SM_CYWORKAREA = 61
  2011. SM_CYCAPTIONICON = 62
  2012. SM_CYSMCAPTIONICON = 63
  2013. SM_CXMINIMIZED = 64
  2014. SM_CYMINIMIZED = 65
  2015. SM_CXMAXTRACK = 66
  2016. SM_CYMAXTRACK = 67
  2017. SM_CXMAXIMIZED = 68
  2018. SM_CYMAXIMIZED = 69
  2019. SM_SHOWSOUNDS = 70
  2020. SM_KEYBOARDPREF = 71
  2021. SM_HIGHCONTRAST = 72
  2022. SM_SCREENREADER = 73
  2023. SM_CURSORSIZE = 74
  2024. SM_CLEANBOOT = 75
  2025. SM_CXDRAG = 76
  2026. SM_CYDRAG = 77
  2027. SM_NETWORK = 78
  2028. SM_CXMENUCHECK = 79
  2029. SM_CYMENUCHECK = 80
  2030. ENDIF
  2031. SM_MAX = 80
  2032. SM_CMETRICSMAX = 81
  2033. ENDIF ;NOSYSMETRICS
  2034. IFNDEF NOCOLOR
  2035. COLOR_SCROLLBAR = 0
  2036. COLOR_BACKGROUND = 1
  2037. COLOR_ACTIVECAPTION = 2
  2038. COLOR_INACTIVECAPTION = 3
  2039. COLOR_MENU = 4
  2040. COLOR_WINDOW = 5
  2041. COLOR_WINDOWFRAME = 6
  2042. COLOR_MENUTEXT = 7
  2043. COLOR_WINDOWTEXT = 8
  2044. COLOR_CAPTIONTEXT = 9
  2045. COLOR_ACTIVEBORDER = 10
  2046. COLOR_INACTIVEBORDER = 11
  2047. COLOR_APPWORKSPACE = 12
  2048. COLOR_HIGHLIGHT = 13
  2049. COLOR_HIGHLIGHTTEXT = 14
  2050. COLOR_BTNFACE = 15
  2051. COLOR_BTNSHADOW = 16
  2052. COLOR_GRAYTEXT = 17
  2053. COLOR_BTNTEXT = 18
  2054. IFNDEF NOWIN31
  2055. COLOR_INACTIVECAPTIONTEXT = 19
  2056. COLOR_BTNHILIGHT = 20
  2057. ENDIF
  2058. ENDIF ;NOCOLOR
  2059. ; Commands to pass WinHelp()
  2060. HELP_CONTEXT =0001h ;/* Display topic in ulTopic */
  2061. HELP_QUIT =0002h ;/* Terminate help */
  2062. HELP_INDEX =0003h ;/* Display index */
  2063. HELP_HELPONHELP =0004h ;/* Display help on using help */
  2064. HELP_SETINDEX =0005h ;/* Set the current Index for multi index help */
  2065. HELP_KEY =0101h ;/* Display topic for keyword in offabData */
  2066. IFNDEF NOCOMM
  2067. NOPARITY = 0
  2068. ODDPARITY = 1
  2069. EVENPARITY = 2
  2070. MARKPARITY = 3
  2071. SPACEPARITY = 4
  2072. ONESTOPBIT = 0
  2073. ONE5STOPBITS = 1
  2074. TWOSTOPBITS = 2
  2075. IGNORE = 0 ; /* Ignore signal */
  2076. INFINITE = 0FFFFh ; /* Infinite timeout */
  2077. ; Error Flags
  2078. CE_RXOVER = 0001h ; /* Receive Queue overflow */
  2079. CE_OVERRUN = 0002h ; /* Receive Overrun Error */
  2080. CE_RXPARITY = 0004h ; /* Receive Parity Error */
  2081. CE_FRAME = 0008h ; /* Receive Framing error */
  2082. CE_BREAK = 0010h ; /* Break Detected */
  2083. CE_CTSTO = 0020h ; /* CTS Timeout */
  2084. CE_DSRTO = 0040h ; /* DSR Timeout */
  2085. CE_RLSDTO = 0080h ; /* RLSD Timeout */
  2086. CE_TXFULL = 0100h ; /* TX Queue is full */
  2087. CE_PTO = 0200h ; /* LPTx Timeout */
  2088. CE_IOE = 0400h ; /* LPTx I/O Error */
  2089. CE_DNS = 0800h ; /* LPTx Device not selected */
  2090. CE_OOP = 1000h ; /* LPTx Out-Of-Paper */
  2091. CE_MODE = 8000h ; /* Requested mode unsupported */
  2092. IE_BADID = (-1) ; /* Invalid or unsupported id */
  2093. IE_OPEN = (-2) ; /* Device Already Open */
  2094. IE_NOPEN = (-3) ; /* Device Not Open */
  2095. IE_MEMORY = (-4) ; /* Unable to allocate queues */
  2096. IE_DEFAULT = (-5) ; /* Error in default parameters */
  2097. IE_HARDWARE = (-10) ; /* Hardware Not Present */
  2098. IE_BYTESIZE = (-11) ; /* Illegal Byte Size */
  2099. IE_BAUDRATE = (-12) ; /* Unsupported BaudRate */
  2100. ; Events
  2101. EV_RXCHAR = 0001h ; /* Any Character received */
  2102. EV_RXFLAG = 0002h ; /* Received certain character */
  2103. EV_TXEMPTY = 0004h ; /* Transmitt Queue Empty */
  2104. EV_CTS = 0008h ; /* CTS changed state */
  2105. EV_DSR = 0010h ; /* DSR changed state */
  2106. EV_RLSD = 0020h ; /* RLSD changed state */
  2107. EV_BREAK = 0040h ; /* BREAK received */
  2108. EV_ERR = 0080h ; /* Line status error occurred */
  2109. EV_RING = 0100h ; /* Ring signal detected */
  2110. EV_PERR = 0200h ; /* Printer error occured */
  2111. EV_CTSS = 0400h ; /* CTS state */
  2112. EV_DSRS = 0800h ; /* DSR state */
  2113. EV_RLSDS = 1000h ; /* RLSD state */
  2114. EV_RingTe = 2000h ; /* Ring Trailing Edge Indicator */
  2115. ; Escape Functions
  2116. SETXOFF = 1 ; /* Simulate XOFF received */
  2117. SETXON = 2 ; /* Simulate XON received */
  2118. SETRTS = 3 ; /* Set RTS high */
  2119. CLRRTS = 4 ; /* Set RTS low */
  2120. SETDTR = 5 ; /* Set DTR high */
  2121. CLRDTR = 6 ; /* Set DTR low */
  2122. RESETDEV = 7 ; /* Reset device if possible */
  2123. LPTx = 80h ; /* Set if ID is for LPT device */
  2124. IFNDEF NOWIN31
  2125. ; new escape functions
  2126. GETMAXLPT equ 8 ; Max supported LPT id
  2127. GETMAXCOM equ 9 ; Max supported COM id
  2128. GETBASEIRQ equ 10 ; Get port base & irq for a port
  2129. ; Comm Baud Rate indices
  2130. CBR_110 equ 0FF10h
  2131. CBR_300 equ 0FF11h
  2132. CBR_600 equ 0FF12h
  2133. CBR_1200 equ 0FF13h
  2134. CBR_2400 equ 0FF14h
  2135. CBR_4800 equ 0FF15h
  2136. CBR_9600 equ 0FF16h
  2137. CBR_14400 equ 0FF17h
  2138. CBR_19200 equ 0FF18h
  2139. ; 0FF19h (reserved)
  2140. ; 0FF1Ah (reserved)
  2141. CBR_38400 equ 0FF1Bh
  2142. ; 0FF1Ch (reserved)
  2143. ; 0FF1Dh (reserved)
  2144. ; 0FF1Eh (reserved)
  2145. CBR_56000 equ 0FF1Fh
  2146. ; 0FF20h (reserved)
  2147. ; 0FF21h (reserved)
  2148. ; 0FF22h (reserved)
  2149. CBR_128000 equ 0FF23h
  2150. ; 0FF24h (reserved)
  2151. ; 0FF25h (reserved)
  2152. ; 0FF26h (reserved)
  2153. CBR_256000 equ 0FF27h
  2154. ; notifications passed in low word of lParam on WM_COMMNOTIFY messages
  2155. CN_RECEIVE equ 1 ; bytes are available in the input queue
  2156. CN_TRANSMIT equ 2 ; fewer than wOutTrigger bytes still
  2157. ; remain in the output queue waiting
  2158. ; to be transmitted.
  2159. CN_EVENT equ 4 ; an enabled event has occurred
  2160. ENDIF
  2161. DCB struc
  2162. DCB_Id db ? ; /* Internal Device ID */
  2163. DCB_BaudRate dw ? ; /* Baudrate at which runing */
  2164. DCB_ByteSize db ? ; /* Number of bits/byte, 4-8 */
  2165. DCB_Parity db ? ; /* 0-4=None,Odd,Even,Mark,Space */
  2166. DCB_StopBits db ? ; /* 0,1,2 = 1, 1.5, 2 */
  2167. DCB_RlsTimeout dw ? ; /* Timeout for RLSD to be set */
  2168. DCB_CtsTimeout dw ? ; /* Timeout for CTS to be set */
  2169. DCB_DsrTimeout dw ? ; /* Timeout for DSR to be set */
  2170. DCB_BitMask1 db ?
  2171. ; BYTE fBinary: 1; /* Binary Mode (skip EOF check */
  2172. ; BYTE fRtsDisable:1; /* Don't assert RTS at init time */
  2173. ; BYTE fParity: 1; /* Enable parity checking */
  2174. ; BYTE fOutxCtsFlow:1; /* CTS handshaking on output */
  2175. ; BYTE fOutxDsrFlow:1; /* DSR handshaking on output */
  2176. ; BYTE fDummy: 2; /* Reserved */
  2177. ; BYTE fDtrDisable:1; /* Don't assert DTR at init time */
  2178. DCB_BitMask2 db ?
  2179. ; BYTE fOutX: 1; /* Enable output X-ON/X-OFF */
  2180. ; BYTE fInX: 1; /* Enable input X-ON/X-OFF */
  2181. ; BYTE fPeChar: 1; /* Enable Parity Err Replacement */
  2182. ; BYTE fNull: 1; /* Enable Null stripping */
  2183. ; BYTE fChEvt: 1; /* Enable Rx character event. */
  2184. ; BYTE fDtrflow: 1; /* DTR handshake on input */
  2185. ; BYTE fRtsflow: 1; /* RTS handshake on input */
  2186. ; BYTE fDummy2: 1;
  2187. DCB_XonChar db ? ; /* Tx and Rx X-ON character */
  2188. DCB_XoffChar db ? ; /* Tx and Rx X-OFF character */
  2189. DCB_XonLim dw ? ; /* Transmit X-ON threshold */
  2190. DCB_XoffLim dw ? ; /* Transmit X-OFF threshold */
  2191. DCB_PeChar db ? ; /* Parity error replacement char */
  2192. DCB_EofChar db ? ; /* End of Input character */
  2193. DCB_EvtChar db ? ; /* Recieved Event character */
  2194. DCB_TxDelay dw ? ; /* Amount of time between chars */
  2195. DCB ends
  2196. COMSTAT struc
  2197. COMS_BitMask1 db ?
  2198. ; BYTE fCtsHold: 1; /* Transmit is on CTS hold */
  2199. ; BYTE fDsrHold: 1; /* Transmit is on DSR hold */
  2200. ; BYTE fRlsdHold: 1; /* Transmit is on RLSD hold */
  2201. ; BYTE fXoffHold: 1; /* Received handshake */
  2202. ; BYTE fXoffSent: 1; /* Issued handshake */
  2203. ; BYTE fEof: 1; /* End of file character found */
  2204. ; BYTE fTxim: 1; /* Character being transmitted */
  2205. COMS_cbInQue dw ? ; /* count of characters in Rx Queue */
  2206. COMS_cbOutQue dw ? ; /* count of characters in Tx Queue */
  2207. COMSTAT ends
  2208. ENDIF ;NOCOM
  2209. ;
  2210. ; Installable Driver Support
  2211. ;
  2212. ; Driver Messages
  2213. DRV_LOAD = 0001h
  2214. DRV_ENABLE = 0002h
  2215. DRV_OPEN = 0003h
  2216. DRV_CLOSE = 0004h
  2217. DRV_DISABLE = 0005h
  2218. DRV_FREE = 0006h
  2219. DRV_CONFIGURE = 0007h
  2220. DRV_QUERYCONFIGURE = 0008h
  2221. DRV_INSTALL = 0009h
  2222. DRV_REMOVE = 000Ah
  2223. DRV_EXITSESSION = 000Bh
  2224. DRV_POWER = 000Fh
  2225. DRV_QUERYENDSESSION = 0010h
  2226. DRV_EXITSESSIONCANCELLED = 0011h
  2227. DRV_RESERVED = 0800h
  2228. DRV_USER = 4000h
  2229. ;LPARAM of DRV_CONFIGURE message and return values
  2230. DRVCONFIGINFO struc
  2231. DRVCNF_dwDCISize dw ?
  2232. DRVCNF_lpszDCISectionName dd ?
  2233. DRVCNF_lpszDCIAliasName dd ?
  2234. DRVCONFIGINFO ends
  2235. DRVCNF_CANCEL = 0000h
  2236. DRVCNF_OK = 0001h
  2237. DRVCNF_RESTART = 0002h
  2238. IFNDEF NOKERNEL
  2239. ;
  2240. ; Common Kernel errors
  2241. ;
  2242. ERR_GALLOC = 01030h ; GlobalAlloc Failed
  2243. ERR_GREALLOC = 01031h ; GlobalReAlloc Failed
  2244. ERR_GLOCK = 01032h ; GlobalLock Failed
  2245. ERR_LALLOC = 01033h ; LocalAlloc Failed
  2246. ERR_LREALLOC = 01034h ; LocalReAlloc Failed
  2247. ERR_LLOCK = 01035h ; LocalLock Failed
  2248. ERR_ALLOCRES = 01036h ; AllocResource Failed
  2249. ERR_LOCKRES = 01037h ; LockResource Failed
  2250. ERR_LOADMODULE = 01038h ; LoadModule failed
  2251. ;
  2252. ; Common User Errors
  2253. ;
  2254. ERR_CREATEDLG = 01045h ; /* Create Dlg failure due to LoadMenu failure */
  2255. ERR_CREATEDLG2 = 01046h ; /* Create Dlg failure due to CreateWindow Failure */
  2256. ERR_REGISTERCLASS = 01047h ; /* RegisterClass failure due to Class already registered */
  2257. ERR_DCBUSY = 01048h ; /* DC Cache is full */
  2258. ERR_CREATEWND = 01049h ; /* Create Wnd failed due to class not found */
  2259. ERR_STRUCEXTRA = 01050h ; /* Unallocated Extra space is used */
  2260. ERR_LOADSTR = 01051h ; /* LoadString() failed */
  2261. ERR_LOADMENU = 01052h ; /* LoadMenu Failed */
  2262. ERR_NESTEDBEGINPAINT = 01053h ; /* Nested BeginPaint() calls */
  2263. ERR_BADINDEX = 01054h ; /* Bad index to Get/Set Class/Window Word/Long */
  2264. ERR_CREATEMENU = 01055h ; /* Error creating menu */
  2265. ;
  2266. ; Common GDI Errors
  2267. ;
  2268. ERR_CREATEDC = 01070h ; /* CreateDC/CreateIC etc., failure */
  2269. ERR_CREATEMETA = 01071h ; /* CreateMetafile failure */
  2270. ERR_DELOBJSELECTED = 01072h ; /* Bitmap being deleted is selected into DC */
  2271. ERR_SELBITMAP = 01073h ; /* Bitmap being selected is already selected elsewhere */
  2272. ENDIF ;NOKERNEL