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.

2343 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. GMEM_FIXED = 0000h
  506. GMEM_MOVEABLE = 0002h
  507. GMEM_NOCOMPACT = 0010h
  508. GMEM_NODISCARD = 0020h
  509. GMEM_ZEROINIT = 0040h
  510. GMEM_MODIFY = 0080h
  511. GMEM_DISCARDABLE= 0100h
  512. GMEM_NOT_BANKED = 1000h
  513. GMEM_DDESHARE = 2000h
  514. GMEM_SHARE = 2000h
  515. GMEM_NOTIFY = 4000h
  516. GMEM_LOWER = GMEM_NOT_BANKED
  517. GHND = GMEM_MOVEABLE+GMEM_ZEROINIT
  518. GPTR = GMEM_FIXED+GMEM_ZEROINIT
  519. ; Flags returned by GlobalFlags (in addition to GMEM_DISCARDABLE)
  520. GMEM_DISCARDED = 4000h
  521. GMEM_LOCKCOUNT = 00FFh
  522. ; Flags returned by GetWinFlags
  523. WF_PMODE = 0001h
  524. WF_CPU286 = 0002h
  525. WF_CPU386 = 0004h
  526. WF_CPU486 = 0008h
  527. WF_STANDARD = 0010h
  528. WF_WIN286 = 0010h
  529. WF_ENHANCED = 0020h
  530. WF_WIN386 = 0020h
  531. WF_CPU086 = 0040h
  532. WF_CPU186 = 0080h
  533. WF_LARGEFRAME = 0100h
  534. WF_SMALLFRAME = 0200h
  535. WF_80x87 = 0400h
  536. WF_PAGING = 0800h
  537. WF_WLO = 8000h
  538. ; WEP fSystemExit flag values
  539. WEP_SYSTEM_EXIT = 1
  540. WEP_FREE_DLL = 0
  541. ; Virtual Keys, Standard Set
  542. IFNDEF NOVK
  543. VK_LBUTTON = 01H
  544. VK_RBUTTON = 02H
  545. VK_CANCEL = 03H
  546. VK_BACK = 08H
  547. VK_TAB = 09H
  548. VK_CLEAR = 0cH
  549. VK_RETURN = 0dH
  550. VK_SHIFT = 10H
  551. VK_CONTROL = 11H
  552. VK_MENU = 12H
  553. VK_PAUSE = 13H
  554. VK_CAPITAL = 14H
  555. VK_ESCAPE = 1bH
  556. VK_SPACE = 20H
  557. VK_PRIOR = 21H
  558. VK_NEXT = 22H
  559. VK_END = 23H
  560. VK_HOME = 24H
  561. VK_LEFT = 25H
  562. VK_UP = 26H
  563. VK_RIGHT = 27H
  564. VK_DOWN = 28H
  565. ; VK_A thru VK_Z are the same as their ASCII equivalents: 'A' thru 'Z'
  566. ; VK_0 thru VK_9 are the same as their ASCII equivalents: '0' thru '0'
  567. VK_PRINT = 2aH
  568. VK_EXECUTE = 2bH
  569. VK_SNAPSHOT = 2ch ; Printscreen key..
  570. VK_INSERT = 2dH
  571. VK_DELETE = 2eH
  572. VK_HELP = 2fH
  573. VK_NUMPAD0 = 60H
  574. VK_NUMPAD1 = 61H
  575. VK_NUMPAD2 = 62H
  576. VK_NUMPAD3 = 63H
  577. VK_NUMPAD4 = 64H
  578. VK_NUMPAD5 = 65H
  579. VK_NUMPAD6 = 66H
  580. VK_NUMPAD7 = 67H
  581. VK_NUMPAD8 = 68H
  582. VK_NUMPAD9 = 69H
  583. VK_MULTIPLY = 6AH
  584. VK_ADD = 6BH
  585. VK_SEPARATER = 6CH
  586. VK_SUBTRACT = 6DH
  587. VK_DECIMAL = 6EH
  588. VK_DIVIDE = 6FH
  589. VK_F1 = 70H
  590. VK_F2 = 71H
  591. VK_F3 = 72H
  592. VK_F4 = 73H
  593. VK_F5 = 74H
  594. VK_F6 = 75H
  595. VK_F7 = 76H
  596. VK_F8 = 77H
  597. VK_F9 = 78H
  598. VK_F10 = 79H
  599. VK_F11 = 7aH
  600. VK_F12 = 7bH
  601. VK_F13 = 7cH
  602. VK_F14 = 7dH
  603. VK_F15 = 7eH
  604. VK_F16 = 7fH
  605. VK_F17 = 80H
  606. VK_F18 = 81H
  607. VK_F19 = 82H
  608. VK_F20 = 83H
  609. VK_F21 = 84H
  610. VK_F22 = 85H
  611. VK_F23 = 86H
  612. VK_F24 = 87H
  613. VK_NUMLOCK = 90H
  614. VK_SCROLL = 91H
  615. ENDIF
  616. IFNDEF NOWH
  617. ; SetWindowsHook() codes
  618. WH_MSGFILTER = (-1)
  619. WH_JOURNALRECORD = 0
  620. WH_JOURNALPLAYBACK = 1
  621. WH_KEYBOARD = 2
  622. WH_GETMESSAGE = 3
  623. WH_CALLWNDPROC = 4
  624. IFNDEF NOWIN31
  625. WH_CBT = 5
  626. WH_SYSMSGFILTER = 6
  627. WH_MOUSE = 7
  628. WH_HARDWARE = 8
  629. WH_DEBUG = 9
  630. ENDIF
  631. ;
  632. ; Hook Codes
  633. HC_GETLPLPFN = (-3)
  634. HC_LPLPFNNEXT = (-2)
  635. HC_LPFNNEXT = (-1)
  636. HC_ACTION = 0
  637. HC_GETNEXT = 1
  638. HC_SKIP = 2
  639. HC_NOREM = 3
  640. HC_NOREMOVE = 3
  641. HC_SYSMODALON = 4
  642. HC_SYSMODALOFF = 5
  643. ;
  644. ; CBT Hook Codes
  645. HCBT_MOVESIZE = 0
  646. HCBT_MINMAX = 1
  647. HCBT_QS = 2
  648. HCBT_CREATEWND = 3
  649. HCBT_DESTROYWND = 4
  650. HCBT_ACTIVATE = 5
  651. HCBT_CLICKSKIPPED = 6
  652. HCBT_KEYSKIPPED = 7
  653. HCBT_SYSCOMMAND = 8
  654. HCBT_SETFOCUS = 9
  655. ;
  656. ; WH_MSGFILTER Filter Proc Codes
  657. MSGF_DIALOGBOX = 0
  658. MSGF_MENU = 2
  659. MSGF_MOVE = 3
  660. MSGF_SIZE = 4
  661. MSGF_SCROLLBAR = 5
  662. MSGF_NEXTWINDOW = 6
  663. ;
  664. ; Window Manager Hook Codes
  665. WC_INIT = 1
  666. WC_SWP = 2
  667. WC_DEFWINDOWPROC = 3
  668. WC_MINMAX = 4
  669. WC_MOVE = 5
  670. WC_SIZE = 6
  671. WC_DRAWCAPTION = 7
  672. ;
  673. ; Message Structure used in Journaling
  674. EVENTMSG struc
  675. message dw ?
  676. paramL dw ?
  677. paramH dw ?
  678. time dd ?
  679. EVENTMSG ends
  680. ENDIF ;NOWH
  681. ; Window field offsets for GetWindowLong() and GetWindowWord()
  682. GWL_WNDPROC = (-4)
  683. GWW_HINSTANCE = (-6)
  684. GWW_HWNDPARENT = (-8)
  685. GWW_ID = (-12)
  686. GWL_STYLE = (-16)
  687. GWL_EXSTYLE = (-20)
  688. ; GetWindow() Constants
  689. GW_HWNDFIRST = 0
  690. GW_HWNDLAST = 1
  691. GW_HWNDNEXT = 2
  692. GW_HWNDPREV = 3
  693. GW_OWNER = 4
  694. GW_CHILD = 5
  695. ; Class field offsets for GetClassLong() and GetClassWord()
  696. GCL_MENUNAME = (-8)
  697. GCW_HBRBACKGROUND = (-10)
  698. GCW_HCURSOR = (-12)
  699. GCW_HICON = (-14)
  700. GCW_HMODULE = (-16)
  701. GCW_CBWNDEXTRA = (-18)
  702. GCW_CBCLSEXTRA = (-20)
  703. GCL_WNDPROC = (-24)
  704. GCW_STYLE = (-26)
  705. ; WinWhere() Area Codes
  706. HTERROR = (-2)
  707. HTTRANSPARENT = (-1)
  708. HTNOWHERE = 0
  709. HTCLIENT = 1
  710. HTCAPTION = 2
  711. HTSYSMENU = 3
  712. HTGROWBOX = 4
  713. HTSIZE = HTGROWBOX
  714. HTMENU = 5
  715. HTHSCROLL = 6
  716. HTVSCROLL = 7
  717. HTREDUCE = 8
  718. HTZOOM = 9
  719. HTLEFT = 10
  720. HTRIGHT = 11
  721. HTTOP = 12
  722. HTTOPLEFT = 13
  723. HTTOPRIGHT = 14
  724. HTBOTTOM = 15
  725. HTBOTTOMLEFT = 16
  726. HTBOTTOMRIGHT = 17
  727. HTSIZEFIRST = HTLEFT
  728. HTSIZELAST = HTBOTTOMRIGHT
  729. ;*************************************************************************
  730. ;
  731. ; Misc structures & constants
  732. ;
  733. ;*************************************************************************
  734. IFNDEF NOMST
  735. POINT struc
  736. ptX dw ?
  737. ptY dw ?
  738. POINT ends
  739. LOGPEN struc
  740. lopnStyle dw ?
  741. lopnWidth db (SIZE POINT) DUP(?)
  742. lopnColor dd ?
  743. LOGPEN ends
  744. BITMAP STRUC
  745. bmType DW ?
  746. bmWidth DW ?
  747. bmHeight DW ?
  748. bmWidthBytes DW ?
  749. bmPlanes DB ?
  750. bmBitsPixel DB ?
  751. bmBits DD ?
  752. BITMAP ENDS
  753. RGBTRIPLE struc
  754. rgbBlue db ?
  755. rgbGreen db ?
  756. rgbRed db ?
  757. RGBTRIPLE ends
  758. RGBQUAD struc
  759. rgbqBlue db ?
  760. rgbqGreen db ?
  761. rgbqRed db ?
  762. rgbqReserved db ?
  763. RGBQUAD ends
  764. ; structures for defining DIBs
  765. BITMAPCOREHEADER struc
  766. bcSize dd ?
  767. bcWidth dw ?
  768. bcHeight dw ?
  769. bcPlanes dw ?
  770. bcBitCount dw ?
  771. BITMAPCOREHEADER ends
  772. BITMAPINFOHEADER struc
  773. biSize dd ?
  774. biWidth dd ?
  775. biHeight dd ?
  776. biPlanes dw ?
  777. biBitCount dw ?
  778. biCompression dd ?
  779. biSizeImage dd ?
  780. biXPelsPerMeter dd ?
  781. biYPelsPerMeter dd ?
  782. biClrUsed dd ?
  783. biClrImportant dd ?
  784. BITMAPINFOHEADER ends
  785. BITMAPINFO struc
  786. bmiHeader db (SIZE BITMAPINFOHEADER) DUP (?)
  787. bmiColors db ? ; array of RGBQUADs
  788. BITMAPINFO ends
  789. BITMAPCOREINFO struc
  790. bmciHeader db (SIZE BITMAPCOREHEADER) DUP (?)
  791. bmciColors db ? ; array of RGBTRIPLEs
  792. BITMAPCOREINFO ends
  793. BITMAPFILEHEADER struc
  794. bfType dw ?
  795. bfSize dd ?
  796. bfReserved1 dw ?
  797. bfReserved2 dw ?
  798. bfOffBits dd ?
  799. BITMAPFILEHEADER ends
  800. WNDSTRUC struc
  801. WSwndStyle dd ?
  802. WSwndID dw ?
  803. WSwndText dw ?
  804. WSwndParent dw ?
  805. WSwndInstance dw ?
  806. WSwndClassProc dd ?
  807. WNDSTRUC ends
  808. ;
  809. ; Message structure
  810. ;
  811. MSGSTRUCT struc
  812. msHWND dw ?
  813. msMESSAGE dw ?
  814. msWPARAM dw ?
  815. msLPARAM dd ?
  816. msTIME dd ?
  817. msPT dd ?
  818. MSGSTRUCT ends
  819. NEWPARMS struc
  820. nprmHwnd dw ?
  821. nprmCmd db ?
  822. NEWPARMS ends
  823. ENDIF
  824. PAINTSTRUCT STRUC
  825. PShdc DW ?
  826. PSfErase DW ?
  827. PSrcPaint DB size RECT dup(?)
  828. PSfRestore DW ?
  829. PSfIncUpdate DW ?
  830. PSrgbReserved DB 16 dup(?)
  831. PAINTSTRUCT ENDS
  832. CREATESTRUCT struc
  833. cs_lpCreateParams dd ?
  834. cs_hInstance dw ?
  835. cs_hMenu dw ?
  836. cs_hwndParent dw ?
  837. cs_cy dw ?
  838. cs_cx dw ?
  839. cs_y dw ?
  840. cs_x dw ?
  841. cs_style dd ?
  842. cs_lpszName dd ?
  843. cs_lpszClass dd ?
  844. cs_dwExStyle dd ?
  845. CREATESTRUCT ends
  846. ;
  847. ; PostError constants
  848. ;
  849. WARNING = 0 ; command codes
  850. MINOR_ERROR = 1
  851. FATAL_ERROR = 2
  852. IGNORE = 0 ; response codes
  853. RETRY = 1
  854. ABORT = 2
  855. ;
  856. ; GDI-related constants & commands
  857. ;
  858. ERRORREGION = 0
  859. NULLREGION = 1
  860. SIMPLEREGION = 2
  861. COMPLEXREGION = 3
  862. IFNDEF NORASTOPS
  863. ;
  864. ; Binary raster ops
  865. ;
  866. R2_BLACK = 1
  867. R2_NOTMERGEPEN = 2
  868. R2_MASKNOTPEN = 3
  869. R2_NOTCOPYPEN = 4
  870. R2_MASKPENNOT = 5
  871. R2_NOT = 6
  872. R2_XORPEN = 7
  873. R2_NOTMASKPEN = 8
  874. R2_MASKPEN = 9
  875. R2_NOTXORPEN = 10
  876. R2_NOP = 11
  877. R2_MERGENOTPEN = 12
  878. R2_COPYPEN = 13
  879. R2_MERGEPENNOT = 14
  880. R2_MERGEPEN = 15
  881. R2_WHITE = 16
  882. ;
  883. ; Ternary raster ops
  884. ;
  885. SRCCOPY_L = 0020h ;dest=source
  886. SRCCOPY_H = 00CCh
  887. SRCPAINT_L = 0086h ;dest=source OR dest
  888. SRCPAINT_H = 00EEh
  889. SRCAND_L = 00C6h ;dest=source AND dest
  890. SRCAND_H = 0088h
  891. SRCINVERT_L = 0046h ;dest= source XOR dest
  892. SRCINVERT_H = 0066h
  893. SRCERASE_L = 0328h ;dest= source AND (not dest )
  894. SRCERASE_H = 0044h
  895. NOTSRCCOPY_L = 0008h ;dest= (not source)
  896. NOTSRCCOPY_H = 0033h
  897. NOTSRCERASE_L = 00A6h ;dest= (not source) AND (not dest)
  898. NOTSRCERASE_H = 0011h
  899. MERGECOPY_L = 00CAh ;dest= (source AND pattern)
  900. MERGECOPY_H = 00C0h
  901. MERGEPAINT_L = 0226h ;dest= (source AND pattern) OR dest
  902. MERGEPAINT_H = 00BBh
  903. PATCOPY_L = 0021h ;dest= pattern
  904. PATCOPY_H = 00F0h
  905. PATPAINT_L = 0A09h ;DPSnoo
  906. PATPAINT_H = 00FBh
  907. PATINVERT_L = 0049h ;dest= pattern XOR dest
  908. PATINVERT_H = 005Ah
  909. DSTINVERT_L = 0009h ;dest= (not dest)
  910. DSTINVERT_H = 0055h
  911. BLACKNESS_L = 0042h ;dest= BLACK
  912. BLACKNESS_H = 0000h
  913. WHITENESS_L = 0062h ;dest= WHITE
  914. WHITENESS_H = 00FFh
  915. ;
  916. ; StretchBlt modes
  917. ;
  918. BLACKONWHITE = 1
  919. WHITEONBLACK = 2
  920. COLORONCOLOR = 3
  921. ;
  922. ; New StretchBlt modes
  923. ;
  924. STRETCH_ANDSCANS = 1
  925. STRETCH_ORSCANS = 2
  926. STRETCH_DELETESCANS = 3
  927. ;
  928. ; PolyFill modes
  929. ;
  930. ALTERNATE = 1
  931. WINDING = 2
  932. ENDIF
  933. ;
  934. ; Text Alignment Options
  935. ;
  936. TA_NOUPDATECP = 0
  937. TA_UPDATECP = 1
  938. TA_LEFT = 0
  939. TA_RIGHT = 2
  940. TA_CENTER = 6
  941. TA_TOP = 0
  942. TA_BOTTOM = 8
  943. TA_BASELINE = 24
  944. ETO_GRAYED = 1
  945. ETO_OPAQUE = 2
  946. ETO_CLIPPED = 4
  947. ASPECT_FILTERING = 1
  948. ifndef NOMETAFILE
  949. ; Metafile Functions */
  950. META_SETBKCOLOR = 0201h
  951. META_SETBKMODE = 0102h
  952. META_SETMAPMODE = 0103h
  953. META_SETROP2 = 0104h
  954. META_SETRELABS = 0105h
  955. META_SETPOLYFILLMODE = 0106h
  956. META_SETSTRETCHBLTMODE = 0107h
  957. META_SETTEXTCHAREXTRA = 0108h
  958. META_SETTEXTCOLOR = 0209h
  959. META_SETTEXTJUSTIFICATION = 020Ah
  960. META_SETWINDOWORG = 020Bh
  961. META_SETWINDOWEXT = 020Ch
  962. META_SETVIEWPORTORG = 020Dh
  963. META_SETVIEWPORTEXT = 020Eh
  964. META_OFFSETWINDOWORG = 020Fh
  965. META_SCALEWINDOWEXT = 0400h
  966. META_OFFSETVIEWPORTORG = 0211h
  967. META_SCALEVIEWPORTEXT = 0412h
  968. META_LINETO = 0213h
  969. META_MOVETO = 0214h
  970. META_EXCLUDECLIPRECT = 0415h
  971. META_INTERSECTCLIPRECT = 0416h
  972. META_ARC = 0817h
  973. META_ELLIPSE = 0418h
  974. META_FLOODFILL = 0419h
  975. META_PIE = 081Ah
  976. META_RECTANGLE = 041Bh
  977. META_ROUNDRECT = 061Ch
  978. META_PATBLT = 061Dh
  979. META_SAVEDC = 001Eh
  980. META_SETPIXEL = 041Fh
  981. META_OFFSETCLIPRGN = 0220h
  982. META_TEXTOUT = 0521h
  983. META_BITBLT = 0922h
  984. META_STRETCHBLT = 0B23h
  985. META_POLYGON = 0324h
  986. META_POLYLINE = 0325h
  987. META_ESCAPE = 0626h
  988. META_RESTOREDC = 0127h
  989. META_FILLREGION = 0228h
  990. META_FRAMEREGION = 0429h
  991. META_INVERTREGION = 012Ah
  992. META_PAINTREGION = 012Bh
  993. META_SELECTCLIPREGION = 012Ch
  994. META_SELECTOBJECT = 012Dh
  995. META_SETTEXTALIGN = 012Eh
  996. META_DRAWTEXT = 062Fh
  997. META_CHORD = 0830h
  998. META_SETMAPPERFLAGS = 0231h
  999. META_EXTTEXTOUT = 0a32h
  1000. META_SETDIBTODEV = 0d33h
  1001. META_SELECTPALETTE = 0234h
  1002. META_REALIZEPALETTE = 0035h
  1003. META_ANIMATEPALETTE = 0436h
  1004. META_SETPALENTRIES = 0037h
  1005. META_POLYPOLYGON = 0538h
  1006. META_RESIZEPALETTE = 0139h
  1007. META_DIBBITBLT = 0940h
  1008. META_DIBSTRETCHBLT = 0b41h
  1009. META_DIBCREATEPATTERNBRUSH = 0142h
  1010. META_STRETCHDIB = 0f43h
  1011. META_DELETEOBJECT = 01f0h
  1012. META_CREATEPALETTE = 00f7h
  1013. META_CREATEBRUSH = 00F8h
  1014. META_CREATEPATTERNBRUSH = 01F9h
  1015. META_CREATEPENINDIRECT = 02FAh
  1016. META_CREATEFONTINDIRECT = 02FBh
  1017. META_CREATEBRUSHINDIRECT = 02FCh
  1018. META_CREATEBITMAPINDIRECT = 02FDh
  1019. META_CREATEBITMAP = 06FEh
  1020. META_CREATEREGION = 06FFh
  1021. ; /* Clipboard Metafile Picture Structure */
  1022. HANDLETABLE struc
  1023. ht_objectHandle dw ?
  1024. HANDLETABLE ends
  1025. METARECORD struc
  1026. mr_rdSize dd ?
  1027. mr_rdFunction dw ?
  1028. mr_rdParm dw ?
  1029. METARECORD ends
  1030. METAFILEPICT struc
  1031. mfp_mm dw ?
  1032. mfp_xExt dw ?
  1033. mfp_yExt dw ?
  1034. mfp_hMF dw ?
  1035. METAFILEPICT ends
  1036. METAHEADER struc
  1037. mtType dw ?
  1038. mtHeaderSize dw ?
  1039. mtVersion dw ?
  1040. mtSize dd ?
  1041. mtNoObjects dw ?
  1042. mtMaxRecord dd ?
  1043. mtNoParameters dw ?
  1044. METAHEADER ends
  1045. endif ; NOMETAFILE
  1046. ; GDI Escapes
  1047. NEWFRAME = 1
  1048. ABORTDOC = 2
  1049. NEXTBAND = 3
  1050. SETCOLORTABLE = 4
  1051. GETCOLORTABLE = 5
  1052. FLUSHOUTPUT = 6
  1053. DRAFTMODE = 7
  1054. QUERYESCSUPPORT = 8
  1055. SETABORTPROC = 9
  1056. STARTDOC = 10
  1057. ;; This value conflicts with a std WIN386 MACRO definition
  1058. ;;ENDDOC = 11
  1059. GETPHYSPAGESIZE = 12
  1060. GETPRINTINGOFFSET = 13
  1061. GETSCALINGFACTOR = 14
  1062. MFCOMMENT = 15
  1063. GETPENWIDTH = 16
  1064. SETCOPYCOUNT = 17
  1065. SELECTPAPERSOURCE = 18
  1066. DEVICEDATA = 19
  1067. PASSTHROUGH = 19
  1068. GETTECHNOLGY = 20
  1069. GETTECHNOLOGY = 20
  1070. SETENDCAP = 21
  1071. SETLINEJOIN = 22
  1072. SETMITERLIMIT = 23
  1073. BANDINFO = 24
  1074. DRAWPATTERNRECT = 25
  1075. GETVECTORPENSIZE = 26
  1076. GETVECTORBRUSHSIZE = 27
  1077. ENABLEDUPLEX = 28
  1078. ENABLEMANUALFEED = 29
  1079. GETSETPAPERBINS = 29
  1080. GETSETPRINTORIENT = 30
  1081. ENUMPAPERBINS = 31
  1082. GETEXTENDEDTEXTMETRICS = 256
  1083. GETEXTENTTABLE = 257
  1084. GETPAIRKERNTABLE = 258
  1085. GETTRACKKERNTABLE = 259
  1086. EXTTEXTOUT = 512
  1087. ENABLERELATIVEWIDTHS = 768
  1088. ENABLEPAIRKERNING = 769
  1089. SETKERNTRACK = 770
  1090. SETALLJUSTVALUES = 771
  1091. SETCHARSET = 772
  1092. GETSETSCREENPARAMS = 3072
  1093. STRETCHBLT = 2048
  1094. ; Spooler Error Codes
  1095. SP_NOTREPORTED = 4000h
  1096. SP_ERROR = (-1)
  1097. SP_APPABORT = (-2)
  1098. SP_USERABORT = (-3)
  1099. SP_OUTOFDISK = (-4)
  1100. SP_OUTOFMEMORY = (-5)
  1101. PR_JOBSTATUS = 0000
  1102. ; Object Definitions for EnumObjects()
  1103. OBJ_PEN = 1
  1104. OBJ_BRUSH = 2
  1105. ;
  1106. ; Menu flags for Change/Check/Enable MenuItem
  1107. ;
  1108. MF_INSERT = 0000h
  1109. MF_CHANGE = 0080h
  1110. MF_APPEND = 0100h
  1111. MF_DELETE = 0200h
  1112. MF_REMOVE = 1000h
  1113. MF_BYCOMMAND = 0000h
  1114. MF_BYPOSITION = 0400h
  1115. MF_SEPARATOR = 0800h
  1116. MF_ENABLED = 0000h
  1117. MF_GRAYED = 0001h
  1118. MF_DISABLED = 0002h
  1119. MF_UNCHECKED = 0000h
  1120. MF_CHECKED = 0008h
  1121. MF_USECHECKBITMAPS= 0200h
  1122. MF_STRING = 0000h
  1123. MF_BITMAP = 0004h
  1124. MF_OWNERDRAW = 0100h
  1125. MF_POPUP = 0010h
  1126. MF_MENUBARBREAK = 0020h
  1127. MF_MENUBREAK = 0040h
  1128. MF_UNHILITE = 0000h
  1129. MF_HILITE = 0080h
  1130. MF_SYSMENU = 2000h
  1131. MF_HELP = 4000h
  1132. MF_MOUSESELECT = 8000h
  1133. ;
  1134. ; System Menu Command Values
  1135. ;
  1136. SC_SIZE = 0F000h
  1137. SC_MOVE = 0F010h
  1138. SC_MINIMIZE = 0F020h
  1139. SC_MAXIMIZE = 0F030h
  1140. SC_NEXTWINDOW = 0F040h
  1141. SC_PREVWINDOW = 0F050h
  1142. SC_CLOSE = 0F060h
  1143. SC_VSCROLL = 0F070h
  1144. SC_HSCROLL = 0F080h
  1145. SC_MOUSEMENU = 0F090h
  1146. SC_KEYMENU = 0F100h
  1147. SC_ARRANGE = 0F110h
  1148. SC_RESTORE = 0F120h
  1149. SC_TASKLIST = 0F130h
  1150. SC_SCREENSAVE = 0F140h
  1151. SC_HOTKEY = 0F150h
  1152. SC_ICON = SC_MINIMIZE
  1153. SC_ZOOM = SC_MAXIMIZE
  1154. ;
  1155. ; Window State Messages
  1156. ;
  1157. IFNDEF NOWM
  1158. WM_STATE = 0000H
  1159. WM_NULL = 0000h
  1160. WM_CREATE = 0001h
  1161. WM_DESTROY = 0002h
  1162. WM_MOVE = 0003h
  1163. WM_SIZE = 0005h
  1164. WM_ACTIVATE = 0006h
  1165. WM_SETFOCUS = 0007h
  1166. WM_KILLFOCUS = 0008h
  1167. WM_ENABLE = 000Ah
  1168. WM_SETREDRAW = 000Bh
  1169. WM_SETTEXT = 000Ch
  1170. WM_GETTEXT = 000Dh
  1171. WM_GETTEXTLENGTH = 000Eh
  1172. WM_PAINT = 000Fh
  1173. WM_CLOSE = 0010h
  1174. WM_QUERYENDSESSION = 0011h
  1175. WM_QUIT = 0012h
  1176. WM_QUERYOPEN = 0013h
  1177. WM_ERASEBKGND = 0014h
  1178. WM_SYSCOLORCHANGE = 0015h
  1179. WM_ENDSESSION = 0016h
  1180. WM_SYSTEMERROR = 0017h
  1181. WM_SHOWWINDOW = 0018h
  1182. WM_CTLCOLOR = 0019h
  1183. WM_WININICHANGE = 001Ah
  1184. WM_DEVMODECHANGE = 001Bh
  1185. WM_ACTIVATEAPP = 001Ch
  1186. WM_FONTCHANGE = 001Dh
  1187. WM_TIMECHANGE = 001Eh
  1188. WM_CANCELMODE = 001Fh
  1189. WM_SETCURSOR = 0020h
  1190. WM_MOUSEACTIVATE = 0021h
  1191. WM_CHILDACTIVATE = 0022h
  1192. WM_QUEUESYNC = 0023h
  1193. WM_GETMINMAXINFO = 0024h
  1194. WM_PAINTICON = 0026h
  1195. WM_ICONERASEBKGND = 0027h
  1196. WM_NEXTDLGCTL = 0028h
  1197. WM_SPOOLERSTATUS = 002Ah
  1198. WM_DRAWITEM = 002Bh
  1199. WM_MEASUREITEM = 002Ch
  1200. WM_DELETEITEM = 002Dh
  1201. WM_VKEYTOITEM = 002Eh
  1202. WM_CHARTOITEM = 002Fh
  1203. WM_SETFONT = 0030h
  1204. WM_GETFONT = 0031h
  1205. WM_QUERYDRAGICON = 0037h
  1206. WM_COMPAREITEM = 0039h
  1207. WM_COMPACTING = 0041h
  1208. IFNDEF NOWIN31
  1209. WM_COMMNOTIFY = 0044h
  1210. WM_WINDOWPOSCHANGING= 0046h
  1211. WM_WINDOWPOSCHANGED = 0047h
  1212. WM_POWER = 0048h
  1213. ENDIF
  1214. WM_NCCREATE = 0081h
  1215. WM_NCDESTROY = 0082h
  1216. WM_NCCALCSIZE = 0083h
  1217. WM_NCHITTEST = 0084h
  1218. WM_NCPAINT = 0085h
  1219. WM_NCACTIVATE = 0086h
  1220. WM_GETDLGCODE = 0087h
  1221. WM_NCMOUSEMOVE = 00A0h
  1222. WM_NCLBUTTONDOWN = 00A1h
  1223. WM_NCLBUTTONUP = 00A2h
  1224. WM_NCLBUTTONDBLCLK = 00A3h
  1225. WM_NCRBUTTONDOWN = 00A4h
  1226. WM_NCRBUTTONUP = 00A5h
  1227. WM_NCRBUTTONDBLCLK = 00A6h
  1228. WM_NCMBUTTONDOWN = 00A7h
  1229. WM_NCMBUTTONUP = 00A8h
  1230. WM_NCMBUTTONDBLCLK = 00A9h
  1231. WM_KEYFIRST = 0100h
  1232. WM_KEYDOWN = 0100h
  1233. WM_KEYUP = 0101h
  1234. WM_CHAR = 0102h
  1235. WM_DEADCHAR = 0103h
  1236. WM_SYSKEYDOWN = 0104h
  1237. WM_SYSKEYUP = 0105h
  1238. WM_SYSCHAR = 0106h
  1239. WM_SYSDEADCHAR = 0107h
  1240. WM_KEYLAST = 0108h
  1241. WM_INITDIALOG = 0110h
  1242. WM_COMMAND = 0111h
  1243. WM_SYSCOMMAND = 0112h
  1244. WM_TIMER = 0113h
  1245. WM_HSCROLL = 0114h
  1246. WM_VSCROLL = 0115h
  1247. WM_INITMENU = 0116h
  1248. WM_INITMENUPOPUP = 0117h
  1249. WM_MENUSELECT = 011Fh
  1250. WM_MENUCHAR = 0120h
  1251. WM_ENTERIDLE = 0121h
  1252. WM_MOUSEFIRST = 0200h
  1253. WM_MOUSEMOVE = 0200h
  1254. WM_LBUTTONDOWN = 0201h
  1255. WM_LBUTTONUP = 0202h
  1256. WM_LBUTTONDBLCLK = 0203h
  1257. WM_RBUTTONDOWN = 0204h
  1258. WM_RBUTTONUP = 0205h
  1259. WM_RBUTTONDBLCLK = 0206h
  1260. WM_MBUTTONDOWN = 0207h
  1261. WM_MBUTTONUP = 0208h
  1262. WM_MBUTTONDBLCLK = 0209h
  1263. WM_MOUSELAST = 0209h
  1264. WM_PARENTNOTIFY = 0210h
  1265. WM_MDICREATE = 0220h
  1266. WM_MDIDESTROY = 0221h
  1267. WM_MDIACTIVATE = 0222h
  1268. WM_MDIRESTORE = 0223h
  1269. WM_MDINEXT = 0224h
  1270. WM_MDIMAXIMIZE = 0225h
  1271. WM_MDITILE = 0226h
  1272. WM_MDICASCADE = 0227h
  1273. WM_MDIICONARRANGE = 0228h
  1274. WM_MDIGETACTIVE = 0229h
  1275. WM_MDISETMENU = 0230h
  1276. WM_DROPFILES = 0233h
  1277. WM_CUT = 0300h
  1278. WM_COPY = 0301h
  1279. WM_PASTE = 0302h
  1280. WM_CLEAR = 0303h
  1281. WM_UNDO = 0304h
  1282. WM_RENDERFORMAT = 0305h
  1283. WM_RENDERALLFORMATS = 0306h
  1284. WM_DESTROYCLIPBOARD = 0307h
  1285. WM_DRAWCLIPBOARD = 0308h
  1286. WM_PAINTCLIPBOARD = 0309h
  1287. WM_VSCROLLCLIPBOARD = 030Ah
  1288. WM_SIZECLIPBOARD = 030Bh
  1289. WM_ASKCBFORMATNAME = 030Ch
  1290. WM_CHANGECBCHAIN = 030Dh
  1291. WM_HSCROLLCLIPBOARD = 030Eh
  1292. WM_QUERYNEWPALETTE = 030Fh
  1293. WM_PALETTEISCHANGING = 0310h
  1294. WM_PALETTECHANGED = 0311h
  1295. IFNDEF NOWIN31
  1296. WM_PENWINFIRST equ 0380h
  1297. WM_PENWINLAST equ 038Fh
  1298. WM_COALESCE_FIRST equ 0390h
  1299. WM_COALESCE_LAST equ 039Fh
  1300. ENDIF
  1301. ; private window messages start here
  1302. WM_USER = 0400H
  1303. ENDIF ; NOWM
  1304. ; WM_MOUSEACTIVATE Return Codes
  1305. MA_ACTIVATE = 1
  1306. MA_ACTIVATEANDEAT = 2
  1307. MA_NOACTIVATE = 3
  1308. ; Size message commands
  1309. SIZENORMAL = 0
  1310. SIZEICONIC = 1
  1311. SIZEFULLSCREEN = 2
  1312. SIZEZOOMSHOW = 3
  1313. SIZEZOOMHIDE = 4
  1314. ; ShowWindow() Commands
  1315. SW_HIDE = 0
  1316. SW_SHOWNORMAL = 1
  1317. SW_NORMAL = 1
  1318. SW_SHOWMINIMIZED = 2
  1319. SW_SHOWMAXIMIZED = 3
  1320. SW_MAXIMIZE = 3
  1321. SW_SHOWNOACTIVATE = 4
  1322. SW_SHOW = 5
  1323. SW_MINIMIZE = 6
  1324. SW_SHOWMINNOACTIVE = 7
  1325. SW_SHOWNA = 8
  1326. SW_RESTORE = 9
  1327. ; Old ShowWindow() Commands
  1328. HIDE_WINDOW = 0
  1329. SHOW_OPENWINDOW = 1
  1330. SHOW_ICONWINDOW = 2
  1331. SHOW_FULLSCREEN = 3
  1332. SHOW_OPENNOACTIVATE= 4
  1333. ; identifiers for the WM_SHOWWINDOW message
  1334. SW_PARENTCLOSING = 1
  1335. SW_OTHERZOOM = 2
  1336. SW_PARENTOPENING = 3
  1337. SW_OTHERUNZOOM = 4
  1338. ;
  1339. ; Key state masks for mouse messages
  1340. ;
  1341. MK_LBUTTON = 0001h
  1342. MK_RBUTTON = 0002h
  1343. MK_SHIFT = 0004h
  1344. MK_CONTROL = 0008h
  1345. MK_MBUTTON = 0010h
  1346. ;
  1347. ; Class styles
  1348. ;
  1349. CS_VREDRAW = 0001h
  1350. CS_HREDRAW = 0002h
  1351. CS_KEYCVTWINDOW = 0004H
  1352. CS_DBLCLKS = 0008h
  1353. ; 0010h reserved
  1354. CS_OWNDC = 0020h
  1355. CS_CLASSDC = 0040h
  1356. CS_PARENTDC = 0080h
  1357. CS_NOKEYCVT = 0100h
  1358. CS_SAVEBITS = 0800h
  1359. CS_NOCLOSE = 0200h
  1360. CS_BYTEALIGNCLIENT = 1000h
  1361. CS_BYTEALIGNWINDOW = 2000h
  1362. CS_GLOBALCLASS = 4000h ; Global window class
  1363. ;
  1364. ; Special CreateWindow position value
  1365. ;
  1366. CW_USEDEFAULT EQU 8000h
  1367. ;
  1368. ; Windows styles (the high words)
  1369. ;
  1370. WS_OVERLAPPED = 00000h
  1371. WS_ICONICPOPUP = 0C000h
  1372. WS_POPUP = 08000h
  1373. WS_CHILD = 04000h
  1374. WS_MINIMIZE = 02000h
  1375. WS_VISIBLE = 01000h
  1376. WS_DISABLED = 00800h
  1377. WS_CLIPSIBLINGS = 00400h
  1378. WS_CLIPCHILDREN = 00200h
  1379. WS_MAXIMIZE = 00100h
  1380. WS_CAPTION = 000C0h ; WS_BORDER | WS_DLGFRAME
  1381. WS_BORDER = 00080h
  1382. WS_DLGFRAME = 00040h
  1383. WS_VSCROLL = 00020h
  1384. WS_HSCROLL = 00010h
  1385. WS_SYSMENU = 00008h
  1386. WS_THICKFRAME = 00004h
  1387. WS_HREDRAW = 00002h
  1388. WS_VREDRAW = 00001h
  1389. WS_GROUP = 00002h
  1390. WS_TABSTOP = 00001h
  1391. WS_MINIMIZEBOX = 00002h
  1392. WS_MAXIMIZEBOX = 00001h
  1393. ; Common Window Styles
  1394. WS_OVERLAPPEDWINDOW = WS_OVERLAPPED + WS_CAPTION + WS_SYSMENU + WS_THICKFRAME + WS_MINIMIZEBOX + WS_MAXIMIZEBOX
  1395. WS_POPUPWINDOW = WS_POPUP + WS_BORDER + WS_SYSMENU
  1396. WS_CHILDWINDOW = WS_CHILD
  1397. WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW
  1398. WS_TILED = WS_OVERLAPPED
  1399. WS_ICONIC = WS_MINIMIZE
  1400. WS_SIZEBOX = WS_THICKFRAME
  1401. ; Extended Window Styles (low words)
  1402. WS_EX_DLGMODALFRAME = 0001
  1403. WS_EX_DRAGOBJECT = 0002
  1404. WS_EX_NOPARENTNOTIFY = 0004
  1405. WS_EX_TOPMOST = 0008
  1406. ;
  1407. ; predefined clipboard formats
  1408. ;
  1409. CF_TEXT = 1
  1410. CF_BITMAP = 2
  1411. CF_METAFILEPICT = 3
  1412. CF_SYLK = 4
  1413. CF_DIF = 5
  1414. CF_TIFF = 6
  1415. CF_OEMTEXT = 7
  1416. CF_DIB = 8
  1417. CF_PALETTE = 9
  1418. CF_PENDATA = 10
  1419. CF_RIFF = 11
  1420. CF_WAVE = 12
  1421. CF_OWNERDISPLAY = 80h ; owner display
  1422. CF_DSPTEXT = 81h ; display text
  1423. CF_DSPBITMAP = 82h ; display bitmap
  1424. CF_DSPMETAFILEPICT = 83h ; display metafile
  1425. ;
  1426. ; Private clipboard format range
  1427. ;
  1428. CF_PRIVATEFIRST = 200h ; Anything in this range doesn't
  1429. CF_PRIVATELAST = 2ffh ; get GlobalFree'd
  1430. CF_GDIOBJFIRST = 300h ; Anything in this range gets
  1431. CF_GDIOBJLAST = 3ffh ; DeleteObject'ed
  1432. MAKEINTRESOURCE MACRO a
  1433. mov ax,a
  1434. xor dx,dx
  1435. ENDM
  1436. ;
  1437. ; Predefined resource types
  1438. ;
  1439. RT_CURSOR = 1 ; must be passed through MAKEINTRESOURCE
  1440. RT_BITMAP = 2
  1441. RT_ICON = 3
  1442. RT_MENU = 4
  1443. RT_DIALOG = 5
  1444. RT_STRING = 6
  1445. RT_FONTDIR = 7
  1446. RT_FONT = 8
  1447. RT_ACCELERATOR = 9
  1448. RT_RCDATA = 10
  1449. ;** NOTE: if any new resource types are introduced above this point, then the
  1450. ;** value of DIFFERENCE must be changed.
  1451. ;** (RT_GROUP_CURSOR - RT_CURSOR) must always be equal to DIFFERENCE
  1452. ;** (RT_GROUP_ICON - RT_ICON) must always be equal to DIFFERENCE
  1453. DIFFERENCE = 11
  1454. RT_GROUP_CURSOR = RT_CURSOR + DIFFERENCE
  1455. RT_GROUP_ICON = RT_ICON + DIFFERENCE
  1456. IFNDEF NOMDI
  1457. MDICREATESTRUCT struc
  1458. szClass dd ?
  1459. szTitle dd ?
  1460. hOwner dw ?
  1461. x dw ?
  1462. y dw ?
  1463. cxc dw ?
  1464. cyc dw ?
  1465. style dd ?
  1466. MDICREATESTRUCT ends
  1467. CLIENTCREATESTRUCT struc
  1468. hWindowMenu dw ?
  1469. idFirstChild dw ?
  1470. CLIENTCREATESTRUCT ends
  1471. ENDIF
  1472. ; NOMDI
  1473. PALETTEENTRY struc
  1474. peRed db ?
  1475. peGreen db ?
  1476. peBlue db ?
  1477. peFlags db ?
  1478. PALETTEENTRY ends
  1479. ; Logical Palette
  1480. LOGPALETTE struc
  1481. palVersion dw ?
  1482. palNumEntries dw ?
  1483. palPalEntry db ? ; array of PALETTEENTRY
  1484. LOGPALETTE ends
  1485. ; DRAWITEMSTRUCT for ownerdraw
  1486. DRAWITEMSTRUCT struc
  1487. drCtlType dw ?
  1488. drCtlID dw ?
  1489. dritemID dw ?
  1490. dritemAction dw ?
  1491. dritemState dw ?
  1492. drhwndItem dw ?
  1493. drhDC dw ?
  1494. drrcItem DB size RECT dup(?)
  1495. dritemData dd ?
  1496. DRAWITEMSTRUCT ends
  1497. ; DELETEITEMSTRUCT for ownerdraw
  1498. DELETEITEMSTRUCT struc
  1499. deCtlType dw ?
  1500. deCtlID dw ?
  1501. deitemID dw ?
  1502. dehwndItem dw ?
  1503. deitemData dd ?
  1504. DELETEITEMSTRUCT ends
  1505. ; MEASUREITEMSTRUCT for ownerdraw
  1506. MEASUREITEMSTRUCT struc
  1507. meCtlType dw ?
  1508. meCtlID dw ?
  1509. meitemID dw ?
  1510. meitemWidth dw ?
  1511. meitemHeight dw ?
  1512. meitemData dd ?
  1513. MEASUREITEMSTRUCT ends
  1514. ; COMPAREITEMSTUCT for ownerdraw sorting
  1515. COMPAREITEMSTRUCT struc
  1516. coCtlType dw ?
  1517. coCtlID dw ?
  1518. cohwndItem dw ?
  1519. coitemID1 dw ?
  1520. coitemData1 dd ?
  1521. coitemID2 dw ?
  1522. coitemData2 dd ?
  1523. COMPAREITEMSTRUCT ends
  1524. ; Owner draw control types
  1525. ODT_MENU = 1
  1526. ODT_LISTBOX = 2
  1527. ODT_COMBOBOX = 3
  1528. ODT_BUTTON = 4
  1529. ; Owner draw actions
  1530. ODA_DRAWENTIRE = 1
  1531. ODA_SELECT = 2
  1532. ODA_FOCUS = 4
  1533. ; Owner draw state
  1534. ODS_SELECTED = 0001h
  1535. ODS_GRAYED = 0002h
  1536. ODS_DISABLED = 0004h
  1537. ODS_CHECKED = 0008h
  1538. ODS_FOCUS = 0010h
  1539. ; PeekMessage() Options
  1540. PM_NOREMOVE = 0000h
  1541. PM_REMOVE = 0001h
  1542. PM_NOYIELD = 0002h
  1543. ; SetWindowPos Flags
  1544. SWP_NOSIZE = 0001h
  1545. SWP_NOMOVE = 0002h
  1546. SWP_NOZORDER = 0004h
  1547. SWP_NOREDRAW = 0008h
  1548. SWP_NOACTIVATE = 0010h
  1549. SWP_DRAWFRAME = 0020h
  1550. SWP_SHOWWINDOW = 0040h
  1551. SWP_HIDEWINDOW = 0080h
  1552. SWP_NOCOPYBITS = 0100h
  1553. SWP_NOREPOSITION = 0200h
  1554. IFNDEF NOWINMESSAGES
  1555. ; Listbox messages
  1556. LB_ADDSTRING = (WM_USER+1)
  1557. LB_INSERTSTRING = (WM_USER+2)
  1558. LB_DELETESTRING = (WM_USER+3)
  1559. LB_RESETCONTENT = (WM_USER+5)
  1560. LB_SETSEL = (WM_USER+6)
  1561. LB_SETCURSEL = (WM_USER+7)
  1562. LB_GETSEL = (WM_USER+8)
  1563. LB_GETCURSEL = (WM_USER+9)
  1564. LB_GETTEXT = (WM_USER+10)
  1565. LB_GETTEXTLEN = (WM_USER+11)
  1566. LB_GETCOUNT = (WM_USER+12)
  1567. LB_SELECTSTRING = (WM_USER+13)
  1568. LB_DIR = (WM_USER+14)
  1569. LB_GETTOPINDEX = (WM_USER+15)
  1570. LB_FINDSTRING = (WM_USER+16)
  1571. LB_GETSELCOUNT = (WM_USER+17)
  1572. LB_GETSELITEMS = (WM_USER+18)
  1573. LB_SETTABSTOPS = (WM_USER+19)
  1574. LB_GETHORIZONTALEXTENT = (WM_USER+20)
  1575. LB_SETHORIZONTALEXTENT = (WM_USER+21)
  1576. LB_SETTOPINDEX = (WM_USER+24)
  1577. LB_GETITEMRECT = (WM_USER+25)
  1578. LB_GETITEMDATA = (WM_USER+26)
  1579. LB_SETITEMDATA = (WM_USER+27)
  1580. LB_SELITEMRANGE = (WM_USER+28)
  1581. LB_SETCARETINDEX = (WM_USER+31)
  1582. LB_GETCARETINDEX = (WM_USER+32)
  1583. IFNDEF NOWIN31
  1584. LB_SETITEMHEIGHT = (WM_USER+33)
  1585. LB_GETITEMHEIGHT = (WM_USER+34)
  1586. LB_FINDSTRINGEXACT = (WM_USER+35)
  1587. ENDIF
  1588. ENDIF
  1589. ; NOWINMESSAGES
  1590. ; Listbox Styles
  1591. LBS_NOTIFY = 0001h
  1592. LBS_SORT = 0002h
  1593. LBS_NOREDRAW = 0004h
  1594. LBS_MULTIPLESEL = 0008h
  1595. LBS_OWNERDRAWFIXED = 0010h
  1596. LBS_OWNERDRAWVARIABLE = 0020h
  1597. LBS_HASSTRINGS = 0040h
  1598. LBS_USETABSTOPS = 0080h
  1599. LBS_NOINTEGRALHEIGHT = 0100h
  1600. LBS_MULTICOLUMN = 0200h
  1601. LBS_WANTKEYBOARDINPUT = 0400h
  1602. LBS_EXTENDEDSEL = 0800h
  1603. LBS_STANDARD = LBS_NOTIFY + LBS_SORT + WS_VSCROLL + WS_BORDER
  1604. LBS_DISABLENOSCROLL = 1000h
  1605. ; Listbox Notification Codes
  1606. LBN_ERRSPACE = (-2)
  1607. LBN_SELCHANGE = 1
  1608. LBN_DBLCLK = 2
  1609. LBN_SELCANCEL = 3
  1610. LBN_SETFOCUS = 4
  1611. LBN_KILLFOCUS = 5
  1612. IFNDEF NOWINMESSAGES
  1613. ; Edit Control Messages
  1614. EM_GETSEL = (WM_USER+0)
  1615. EM_SETSEL = (WM_USER+1)
  1616. EM_GETRECT = (WM_USER+2)
  1617. EM_SETRECT = (WM_USER+3)
  1618. EM_SETRECTNP = (WM_USER+4)
  1619. EM_SCROLL = (WM_USER+5)
  1620. EM_LINESCROLL = (WM_USER+6)
  1621. EM_GETMODIFY = (WM_USER+8)
  1622. EM_SETMODIFY = (WM_USER+9)
  1623. EM_GETLINECOUNT = (WM_USER+10)
  1624. EM_LINEINDEX = (WM_USER+11)
  1625. EM_SETHANDLE = (WM_USER+12)
  1626. EM_GETHANDLE = (WM_USER+13)
  1627. EM_LINELENGTH = (WM_USER+17)
  1628. EM_REPLACESEL = (WM_USER+18)
  1629. EM_SETFONT = (WM_USER+19)
  1630. EM_GETLINE = (WM_USER+20)
  1631. EM_LIMITTEXT = (WM_USER+21)
  1632. EM_CANUNDO = (WM_USER+22)
  1633. EM_UNDO = (WM_USER+23)
  1634. EM_FMTLINES = (WM_USER+24)
  1635. EM_LINEFROMCHAR = (WM_USER+25)
  1636. EM_SETWORDBREAK = (WM_USER+26)
  1637. EM_SETTABSTOPS = (WM_USER+27)
  1638. EM_SETPASSWORDCHAR = (WM_USER+28)
  1639. EM_EMPTYUNDOBUFFER = (WM_USER+29)
  1640. IFNDEF NOWIN31
  1641. EM_GETFIRSTVISIBLELINE = (WM_USER+30)
  1642. EM_SETREADONLY = (WM_USER+31)
  1643. EM_SETWORDBREAKPROC = (WM_USER+32)
  1644. EM_GETWORDBREAKPROC = (WM_USER+33)
  1645. EM_GETPASSWORDCHAR = (WM_USER+34)
  1646. ENDIF
  1647. ENDIF
  1648. ; NOWINMESSAGES
  1649. ; Edit Control Styles (low word)
  1650. ES_LEFT = 0000h
  1651. ES_CENTER = 0001h
  1652. ES_RIGHT = 0002h
  1653. ES_MULTILINE = 0004h
  1654. ES_UPPERCASE = 0008h
  1655. ES_LOWERCASE = 0010h
  1656. ES_PASSWORD = 0020h
  1657. ES_AUTOVSCROLL = 0040h
  1658. ES_AUTOHSCROLL = 0080h
  1659. ES_NOHIDESEL = 0100h
  1660. ES_OEMCONVERT = 0400h
  1661. IFNDEF NOWIN31
  1662. ES_READONLY = 0800h
  1663. ES_WANTRETURN = 1000h
  1664. ENDIF
  1665. ; Edit Control Notification Codes
  1666. EN_SETFOCUS = 0100h
  1667. EN_KILLFOCUS = 0200h
  1668. EN_CHANGE = 0300h
  1669. EN_UPDATE = 0400h
  1670. EN_ERRSPACE = 0500h
  1671. EN_MAXTEXT = 0501h
  1672. EN_HSCROLL = 0601h
  1673. EN_VSCROLL = 0602h
  1674. IFNDEF NOWINMESSAGES
  1675. ; Button Control Messages
  1676. BM_GETCHECK = (WM_USER+0)
  1677. BM_SETCHECK = (WM_USER+1)
  1678. BM_GETSTATE = (WM_USER+2)
  1679. BM_SETSTATE = (WM_USER+3)
  1680. BM_SETSTYLE = (WM_USER+4)
  1681. ENDIF
  1682. ; NOWINMESSAGES
  1683. ; Button Control Styles (low word)
  1684. BS_PUSHBUTTON = 00h
  1685. BS_DEFPUSHBUTTON = 01h
  1686. BS_CHECKBOX = 02h
  1687. BS_AUTOCHECKBOX = 03h
  1688. BS_RADIOBUTTON = 04h
  1689. BS_3STATE = 05h
  1690. BS_AUTO3STATE = 06h
  1691. BS_GROUPBOX = 07h
  1692. BS_USERBUTTON = 08h
  1693. BS_AUTORADIOBUTTON = 09h
  1694. BS_OWNERDRAW = 0Bh
  1695. BS_LEFTTEXT = 20h
  1696. ; User Button Notification Codes
  1697. BN_CLICKED = 0
  1698. BN_PAINT = 1
  1699. BN_HILITE = 2
  1700. BN_UNHILITE = 3
  1701. BN_DISABLE = 4
  1702. BN_DOUBLECLICKED = 5
  1703. ; Dialog Styles (low words)
  1704. DS_ABSALIGN = 01h
  1705. DS_SYSMODAL = 02h
  1706. DS_LOCALEDIT = 20h ;/* Edit items get Local storage. */
  1707. DS_SETFONT = 40h ;/* User specified font for Dlg controls */
  1708. DS_MODALFRAME = 80h ;/* Can be combined with WS_CAPTION */
  1709. DS_NOIDLEMSG = 100h ;/* WM_ENTERIDLE message will not be sent */
  1710. IFNDEF NOWINMESSAGES
  1711. ; Dialog box messages
  1712. DM_GETDEFID = (WM_USER+0)
  1713. DM_SETDEFID = (WM_USER+1)
  1714. ENDIF ;NOWINMESSAGES
  1715. ; Dialog Codes
  1716. DLGC_WANTARROWS = 0001h ; /* Control wants arrow keys */
  1717. DLGC_WANTTAB = 0002h ; /* Control wants tab keys */
  1718. DLGC_WANTALLKEYS = 0004h ; /* Control wants all keys */
  1719. DLGC_WANTMESSAGE = 0004h ; /* Pass message to control */
  1720. DLGC_HASSETSEL = 0008h ; /* Understands EM_SETSEL message */
  1721. DLGC_DEFPUSHBUTTON = 0010h ; /* Default pushbutton */
  1722. DLGC_UNDEFPUSHBUTTON= 0020h ; /* Non-default pushbutton */
  1723. DLGC_RADIOBUTTON = 0040h ; /* Radio button */
  1724. DLGC_WANTCHARS = 0080h ; /* Want WM_CHAR messages */
  1725. DLGC_STATIC = 0100h ; /* Static item: don't include */
  1726. DLGC_BUTTON = 2000h ; /* Button item: can be checked */
  1727. ; Combo Box return Values
  1728. CB_OKAY = 0
  1729. CB_ERR = (-1)
  1730. CB_ERRSPACE = (-2)
  1731. ; Combo Box Notification Codes
  1732. CBN_ERRSPACE = (-1)
  1733. CBN_SELCHANGE = 1
  1734. CBN_DBLCLK = 2
  1735. CBN_SETFOCUS = 3
  1736. CBN_KILLFOCUS = 4
  1737. CBN_EDITCHANGE = 5
  1738. CBN_EDITUPDATE = 6
  1739. CBN_DROPDOWN = 7
  1740. ; Combo Box styles (low words)
  1741. CBS_SIMPLE = 0001h
  1742. CBS_DROPDOWN = 0002h
  1743. CBS_DROPDOWNLIST = 0003h
  1744. CBS_OWNERDRAWFIXED = 0010h
  1745. CBS_OWNERDRAWVARIABLE= 0020h
  1746. CBS_AUTOHSCROLL = 0040h
  1747. CBS_OEMCONVERT = 0080h
  1748. CBS_SORT = 0100h
  1749. CBS_HASSTRINGS = 0200h
  1750. CBS_NOINTEGRALHEIGHT = 0400h
  1751. IFNDEF NOWINMESSAGES
  1752. ; Combo Box messages
  1753. CB_GETEDITSEL = (WM_USER+0)
  1754. CB_LIMITTEXT = (WM_USER+1)
  1755. CB_SETEDITSEL = (WM_USER+2)
  1756. CB_ADDSTRING = (WM_USER+3)
  1757. CB_DELETESTRING = (WM_USER+4)
  1758. CB_DIR = (WM_USER+5)
  1759. CB_GETCOUNT = (WM_USER+6)
  1760. CB_GETCURSEL = (WM_USER+7)
  1761. CB_GETLBTEXT = (WM_USER+8)
  1762. CB_GETLBTEXTLEN = (WM_USER+9)
  1763. CB_INSERTSTRING = (WM_USER+10)
  1764. CB_RESETCONTENT = (WM_USER+11)
  1765. CB_FINDSTRING = (WM_USER+12)
  1766. CB_SELECTSTRING = (WM_USER+13)
  1767. CB_SETCURSEL = (WM_USER+14)
  1768. CB_SHOWDROPDOWN = (WM_USER+15)
  1769. CB_GETITEMDATA = (WM_USER+16)
  1770. CB_SETITEMDATA = (WM_USER+17)
  1771. IFNDEF NOWIN31
  1772. CB_GETDROPPEDCONTROLRECT = (WM_USER+18)
  1773. CB_SETITEMHEIGHT = (WM_USER+19)
  1774. CB_GETITEMHEIGHT = (WM_USER+20)
  1775. CB_SETEXTENDEDUI = (WM_USER+21)
  1776. CB_GETEXTENDEDUI = (WM_USER+22)
  1777. CB_GETDROPPEDSTATE = (WM_USER+23)
  1778. CB_FINDSTRINGEXACT = (WM_USER+24)
  1779. ENDIF
  1780. ENDIF ; NOWINMESSAGES
  1781. ; Static Control styles (low word)
  1782. SS_LEFT = 00h
  1783. SS_CENTER = 01h
  1784. SS_RIGHT = 02h
  1785. SS_ICON = 03h
  1786. SS_BLACKRECT = 04h
  1787. SS_GRAYRECT = 05h
  1788. SS_WHITERECT = 06h
  1789. SS_BLACKFRAME = 07h
  1790. SS_GRAYFRAME = 08h
  1791. SS_WHITEFRAME = 09h
  1792. SS_SIMPLE = 0Bh
  1793. SS_LEFTNOWORDWRAP = 0Ch
  1794. SS_NOPREFIX = 80h ; Don't do "&" character translation
  1795. IFNDEF NOWIN31
  1796. IFNDEF NOWINMESSAGES
  1797. ;Static Control Messages
  1798. STM_SETICON = (WM_USER+0)
  1799. STM_GETICON = (WM_USER+1)
  1800. ENDIF
  1801. ENDIF
  1802. ; Scroll Bar Styles (low word)
  1803. SBS_HORZ = 0000h
  1804. SBS_VERT = 0001h
  1805. SBS_TOPALIGN = 0002h
  1806. SBS_LEFTALIGN = 0002h
  1807. SBS_BOTTOMALIGN = 0004h
  1808. SBS_RIGHTALIGN = 0004h
  1809. SBS_SIZEBOXTOPLEFTALIGN = 0002h
  1810. SBS_SIZEBOXBOTTOMRIGHTALIGN = 0004h
  1811. SBS_SIZEBOX = 0008h
  1812. IFNDEF NOSYSMETRICS
  1813. ; GetSystemMetrics() codes
  1814. SM_CXSCREEN = 0
  1815. SM_CYSCREEN = 1
  1816. SM_CXVSCROLL = 2
  1817. SM_CYHSCROLL = 3
  1818. SM_CYCAPTION = 4
  1819. SM_CXBORDER = 5
  1820. SM_CYBORDER = 6
  1821. SM_CXDLGFRAME = 7
  1822. SM_CYDLGFRAME = 8
  1823. SM_CYVTHUMB = 9
  1824. SM_CXHTHUMB = 10
  1825. SM_CXICON = 11
  1826. SM_CYICON = 12
  1827. SM_CXCURSOR = 13
  1828. SM_CYCURSOR = 14
  1829. SM_CYMENU = 15
  1830. SM_CXFULLSCREEN = 16
  1831. SM_CYFULLSCREEN = 17
  1832. SM_CYKANJIWINDOW = 18
  1833. SM_MOUSEPRESENT = 19
  1834. SM_CYVSCROLL = 20
  1835. SM_CXHSCROLL = 21
  1836. SM_DEBUG = 22
  1837. SM_SWAPBUTTON = 23
  1838. SM_RESERVED1 = 24
  1839. SM_RESERVED2 = 25
  1840. SM_RESERVED3 = 26
  1841. SM_RESERVED4 = 27
  1842. SM_CXMIN = 28
  1843. SM_CYMIN = 29
  1844. SM_CXSIZE = 30
  1845. SM_CYSIZE = 31
  1846. SM_CXFRAME = 32
  1847. SM_CYFRAME = 33
  1848. SM_CXMINTRACK = 34
  1849. SM_CYMINTRACK = 35
  1850. IFNDEF NOWIN31
  1851. SM_CXDOUBLECLK = 36
  1852. SM_CYDOUBLECLK = 37
  1853. SM_CXICONSPACING = 38
  1854. SM_CYICONSPACING = 39
  1855. SM_MENUDROPALIGNMENT = 40
  1856. SM_PENWINDOWS = 41
  1857. SM_DBCSENABLED = 42
  1858. ENDIF
  1859. SM_CMETRICSMAX = 43
  1860. ENDIF ;NOSYSMETRICS
  1861. IFNDEF NOCOLOR
  1862. COLOR_SCROLLBAR = 0
  1863. COLOR_BACKGROUND = 1
  1864. COLOR_ACTIVECAPTION = 2
  1865. COLOR_INACTIVECAPTION = 3
  1866. COLOR_MENU = 4
  1867. COLOR_WINDOW = 5
  1868. COLOR_WINDOWFRAME = 6
  1869. COLOR_MENUTEXT = 7
  1870. COLOR_WINDOWTEXT = 8
  1871. COLOR_CAPTIONTEXT = 9
  1872. COLOR_ACTIVEBORDER = 10
  1873. COLOR_INACTIVEBORDER = 11
  1874. COLOR_APPWORKSPACE = 12
  1875. COLOR_HIGHLIGHT = 13
  1876. COLOR_HIGHLIGHTTEXT = 14
  1877. COLOR_BTNFACE = 15
  1878. COLOR_BTNSHADOW = 16
  1879. COLOR_GRAYTEXT = 17
  1880. COLOR_BTNTEXT = 18
  1881. IFNDEF NOWIN31
  1882. COLOR_INACTIVECAPTIONTEXT = 19
  1883. COLOR_BTNHILIGHT = 20
  1884. ENDIF
  1885. ENDIF ;NOCOLOR
  1886. ; Commands to pass WinHelp()
  1887. HELP_CONTEXT =0001h ;/* Display topic in ulTopic */
  1888. HELP_QUIT =0002h ;/* Terminate help */
  1889. HELP_INDEX =0003h ;/* Display index */
  1890. HELP_HELPONHELP =0004h ;/* Display help on using help */
  1891. HELP_SETINDEX =0005h ;/* Set the current Index for multi index help */
  1892. HELP_KEY =0101h ;/* Display topic for keyword in offabData */
  1893. IFNDEF NOCOMM
  1894. NOPARITY = 0
  1895. ODDPARITY = 1
  1896. EVENPARITY = 2
  1897. MARKPARITY = 3
  1898. SPACEPARITY = 4
  1899. ONESTOPBIT = 0
  1900. ONE5STOPBITS = 1
  1901. TWOSTOPBITS = 2
  1902. IGNORE = 0 ; /* Ignore signal */
  1903. INFINITE = 0FFFFh ; /* Infinite timeout */
  1904. ; Error Flags
  1905. CE_RXOVER = 0001h ; /* Receive Queue overflow */
  1906. CE_OVERRUN = 0002h ; /* Receive Overrun Error */
  1907. CE_RXPARITY = 0004h ; /* Receive Parity Error */
  1908. CE_FRAME = 0008h ; /* Receive Framing error */
  1909. CE_BREAK = 0010h ; /* Break Detected */
  1910. CE_CTSTO = 0020h ; /* CTS Timeout */
  1911. CE_DSRTO = 0040h ; /* DSR Timeout */
  1912. CE_RLSDTO = 0080h ; /* RLSD Timeout */
  1913. CE_TXFULL = 0100h ; /* TX Queue is full */
  1914. CE_PTO = 0200h ; /* LPTx Timeout */
  1915. CE_IOE = 0400h ; /* LPTx I/O Error */
  1916. CE_DNS = 0800h ; /* LPTx Device not selected */
  1917. CE_OOP = 1000h ; /* LPTx Out-Of-Paper */
  1918. CE_MODE = 8000h ; /* Requested mode unsupported */
  1919. IE_BADID = (-1) ; /* Invalid or unsupported id */
  1920. IE_OPEN = (-2) ; /* Device Already Open */
  1921. IE_NOPEN = (-3) ; /* Device Not Open */
  1922. IE_MEMORY = (-4) ; /* Unable to allocate queues */
  1923. IE_DEFAULT = (-5) ; /* Error in default parameters */
  1924. IE_HARDWARE = (-10) ; /* Hardware Not Present */
  1925. IE_BYTESIZE = (-11) ; /* Illegal Byte Size */
  1926. IE_BAUDRATE = (-12) ; /* Unsupported BaudRate */
  1927. ; Events
  1928. EV_RXCHAR = 0001h ; /* Any Character received */
  1929. EV_RXFLAG = 0002h ; /* Received certain character */
  1930. EV_TXEMPTY = 0004h ; /* Transmitt Queue Empty */
  1931. EV_CTS = 0008h ; /* CTS changed state */
  1932. EV_DSR = 0010h ; /* DSR changed state */
  1933. EV_RLSD = 0020h ; /* RLSD changed state */
  1934. EV_BREAK = 0040h ; /* BREAK received */
  1935. EV_ERR = 0080h ; /* Line status error occurred */
  1936. EV_RING = 0100h ; /* Ring signal detected */
  1937. EV_PERR = 0200h ; /* Printer error occured */
  1938. EV_CTSS = 0400h ; /* CTS state */
  1939. EV_DSRS = 0800h ; /* DSR state */
  1940. EV_RLSDS = 1000h ; /* RLSD state */
  1941. EV_RingTe = 2000h ; /* Ring Trailing Edge Indicator */
  1942. ; Escape Functions
  1943. SETXOFF = 1 ; /* Simulate XOFF received */
  1944. SETXON = 2 ; /* Simulate XON received */
  1945. SETRTS = 3 ; /* Set RTS high */
  1946. CLRRTS = 4 ; /* Set RTS low */
  1947. SETDTR = 5 ; /* Set DTR high */
  1948. CLRDTR = 6 ; /* Set DTR low */
  1949. RESETDEV = 7 ; /* Reset device if possible */
  1950. LPTx = 80h ; /* Set if ID is for LPT device */
  1951. IFNDEF NOWIN31
  1952. ; new escape functions
  1953. GETMAXLPT equ 8 ; Max supported LPT id
  1954. GETMAXCOM equ 9 ; Max supported COM id
  1955. GETBASEIRQ equ 10 ; Get port base & irq for a port
  1956. ; Comm Baud Rate indices
  1957. CBR_110 equ 0FF10h
  1958. CBR_300 equ 0FF11h
  1959. CBR_600 equ 0FF12h
  1960. CBR_1200 equ 0FF13h
  1961. CBR_2400 equ 0FF14h
  1962. CBR_4800 equ 0FF15h
  1963. CBR_9600 equ 0FF16h
  1964. CBR_14400 equ 0FF17h
  1965. CBR_19200 equ 0FF18h
  1966. ; 0FF19h (reserved)
  1967. ; 0FF1Ah (reserved)
  1968. CBR_38400 equ 0FF1Bh
  1969. ; 0FF1Ch (reserved)
  1970. ; 0FF1Dh (reserved)
  1971. ; 0FF1Eh (reserved)
  1972. CBR_56000 equ 0FF1Fh
  1973. ; 0FF20h (reserved)
  1974. ; 0FF21h (reserved)
  1975. ; 0FF22h (reserved)
  1976. CBR_128000 equ 0FF23h
  1977. ; 0FF24h (reserved)
  1978. ; 0FF25h (reserved)
  1979. ; 0FF26h (reserved)
  1980. CBR_256000 equ 0FF27h
  1981. ; notifications passed in low word of lParam on WM_COMMNOTIFY messages
  1982. CN_RECEIVE equ 1 ; bytes are available in the input queue
  1983. CN_TRANSMIT equ 2 ; fewer than wOutTrigger bytes still
  1984. ; remain in the output queue waiting
  1985. ; to be transmitted.
  1986. CN_EVENT equ 4 ; an enabled event has occurred
  1987. ENDIF
  1988. DCB struc
  1989. DCB_Id db ? ; /* Internal Device ID */
  1990. DCB_BaudRate dw ? ; /* Baudrate at which runing */
  1991. DCB_ByteSize db ? ; /* Number of bits/byte, 4-8 */
  1992. DCB_Parity db ? ; /* 0-4=None,Odd,Even,Mark,Space */
  1993. DCB_StopBits db ? ; /* 0,1,2 = 1, 1.5, 2 */
  1994. DCB_RlsTimeout dw ? ; /* Timeout for RLSD to be set */
  1995. DCB_CtsTimeout dw ? ; /* Timeout for CTS to be set */
  1996. DCB_DsrTimeout dw ? ; /* Timeout for DSR to be set */
  1997. DCB_BitMask1 db ?
  1998. ; BYTE fBinary: 1; /* Binary Mode (skip EOF check */
  1999. ; BYTE fRtsDisable:1; /* Don't assert RTS at init time */
  2000. ; BYTE fParity: 1; /* Enable parity checking */
  2001. ; BYTE fOutxCtsFlow:1; /* CTS handshaking on output */
  2002. ; BYTE fOutxDsrFlow:1; /* DSR handshaking on output */
  2003. ; BYTE fDummy: 2; /* Reserved */
  2004. ; BYTE fDtrDisable:1; /* Don't assert DTR at init time */
  2005. DCB_BitMask2 db ?
  2006. ; BYTE fOutX: 1; /* Enable output X-ON/X-OFF */
  2007. ; BYTE fInX: 1; /* Enable input X-ON/X-OFF */
  2008. ; BYTE fPeChar: 1; /* Enable Parity Err Replacement */
  2009. ; BYTE fNull: 1; /* Enable Null stripping */
  2010. ; BYTE fChEvt: 1; /* Enable Rx character event. */
  2011. ; BYTE fDtrflow: 1; /* DTR handshake on input */
  2012. ; BYTE fRtsflow: 1; /* RTS handshake on input */
  2013. ; BYTE fDummy2: 1;
  2014. DCB_XonChar db ? ; /* Tx and Rx X-ON character */
  2015. DCB_XoffChar db ? ; /* Tx and Rx X-OFF character */
  2016. DCB_XonLim dw ? ; /* Transmit X-ON threshold */
  2017. DCB_XoffLim dw ? ; /* Transmit X-OFF threshold */
  2018. DCB_PeChar db ? ; /* Parity error replacement char */
  2019. DCB_EofChar db ? ; /* End of Input character */
  2020. DCB_EvtChar db ? ; /* Recieved Event character */
  2021. DCB_TxDelay dw ? ; /* Amount of time between chars */
  2022. DCB ends
  2023. COMSTAT struc
  2024. COMS_BitMask1 db ?
  2025. ; BYTE fCtsHold: 1; /* Transmit is on CTS hold */
  2026. ; BYTE fDsrHold: 1; /* Transmit is on DSR hold */
  2027. ; BYTE fRlsdHold: 1; /* Transmit is on RLSD hold */
  2028. ; BYTE fXoffHold: 1; /* Received handshake */
  2029. ; BYTE fXoffSent: 1; /* Issued handshake */
  2030. ; BYTE fEof: 1; /* End of file character found */
  2031. ; BYTE fTxim: 1; /* Character being transmitted */
  2032. COMS_cbInQue dw ? ; /* count of characters in Rx Queue */
  2033. COMS_cbOutQue dw ? ; /* count of characters in Tx Queue */
  2034. COMSTAT ends
  2035. ENDIF ;NOCOM
  2036. ;
  2037. ; Installable Driver Support
  2038. ;
  2039. ; Driver Messages
  2040. DRV_LOAD = 0001h
  2041. DRV_ENABLE = 0002h
  2042. DRV_OPEN = 0003h
  2043. DRV_CLOSE = 0004h
  2044. DRV_DISABLE = 0005h
  2045. DRV_FREE = 0006h
  2046. DRV_CONFIGURE = 0007h
  2047. DRV_QUERYCONFIGURE = 0008h
  2048. DRV_INSTALL = 0009h
  2049. DRV_REMOVE = 000Ah
  2050. DRV_EXITSESSION = 000Bh
  2051. DRV_POWER = 000Fh
  2052. DRV_RESERVED = 0800h
  2053. DRV_USER = 4000h
  2054. ;LPARAM of DRV_CONFIGURE message and return values
  2055. DRVCONFIGINFO struc
  2056. DRVCNF_dwDCISize dw ?
  2057. DRVCNF_lpszDCISectionName dd ?
  2058. DRVCNF_lpszDCIAliasName dd ?
  2059. DRVCONFIGINFO ends
  2060. DRVCNF_CANCEL = 0000h
  2061. DRVCNF_OK = 0001h
  2062. DRVCNF_RESTART = 0002h
  2063. IFNDEF NOKERNEL
  2064. ;
  2065. ; Common Kernel errors
  2066. ;
  2067. ERR_GALLOC = 01030h ; GlobalAlloc Failed
  2068. ERR_GREALLOC = 01031h ; GlobalReAlloc Failed
  2069. ERR_GLOCK = 01032h ; GlobalLock Failed
  2070. ERR_LALLOC = 01033h ; LocalAlloc Failed
  2071. ERR_LREALLOC = 01034h ; LocalReAlloc Failed
  2072. ERR_LLOCK = 01035h ; LocalLock Failed
  2073. ERR_ALLOCRES = 01036h ; AllocResource Failed
  2074. ERR_LOCKRES = 01037h ; LockResource Failed
  2075. ERR_LOADMODULE = 01038h ; LoadModule failed
  2076. ;
  2077. ; Common User Errors
  2078. ;
  2079. ERR_CREATEDLG = 01045h ; /* Create Dlg failure due to LoadMenu failure */
  2080. ERR_CREATEDLG2 = 01046h ; /* Create Dlg failure due to CreateWindow Failure */
  2081. ERR_REGISTERCLASS = 01047h ; /* RegisterClass failure due to Class already registered */
  2082. ERR_DCBUSY = 01048h ; /* DC Cache is full */
  2083. ERR_CREATEWND = 01049h ; /* Create Wnd failed due to class not found */
  2084. ERR_STRUCEXTRA = 01050h ; /* Unallocated Extra space is used */
  2085. ERR_LOADSTR = 01051h ; /* LoadString() failed */
  2086. ERR_LOADMENU = 01052h ; /* LoadMenu Failed */
  2087. ERR_NESTEDBEGINPAINT = 01053h ; /* Nested BeginPaint() calls */
  2088. ERR_BADINDEX = 01054h ; /* Bad index to Get/Set Class/Window Word/Long */
  2089. ERR_CREATEMENU = 01055h ; /* Error creating menu */
  2090. ;
  2091. ; Common GDI Errors
  2092. ;
  2093. ERR_CREATEDC = 01070h ; /* CreateDC/CreateIC etc., failure */
  2094. ERR_CREATEMETA = 01071h ; /* CreateMetafile failure */
  2095. ERR_DELOBJSELECTED = 01072h ; /* Bitmap being deleted is selected into DC */
  2096. ERR_SELBITMAP = 01073h ; /* Bitmap being selected is already selected elsewhere */
  2097. ENDIF ;NOKERNEL