Source code of Windows XP (NT5)
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.

2418 lines
64 KiB

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