home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 May / VPR9705A.ISO / VPR_DATA / PROGRAM / CBTRIAL / SETUP / DATA.Z / WINDOWS.INC < prev    next >
Text File  |  1997-02-14  |  67KB  |  2,351 lines

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