home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Graphics / Graphics.zip / os2apipm.zip / OS2API / OS2-PMSC.ADS < prev    next >
Text File  |  1996-07-20  |  56KB  |  1,267 lines

  1.  
  2. -- ╔═══════════════════════════════════════════════════════════════════╗
  3. -- ║       D E S I G N   E N G I N E R I N G              ║D║S║        ║
  4. -- ║            S O F T W A R E                           ╚═╩═╝        ║
  5. -- ║                                                                   ║
  6. -- ║        Package     Os2.PMsc                                       ║
  7. -- ║                                                                   ║
  8. -- ║        Author :  Leonid Dulman     1995 , 1996                    ║
  9. -- ║                                                                   ║
  10. -- ║             GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS            ║
  11. -- ║                                                                   ║
  12. -- ║               PM    Static Control                                ║
  13. -- ║                                                                   ║
  14. -- ╚═══════════════════════════════════════════════════════════════════╝
  15.  
  16.  
  17. with Interfaces.C;         use Interfaces.C;
  18. with Interfaces.C.Strings; use Interfaces.C.Strings;
  19.  
  20. package Os2.PMsc is
  21. pragma Preelaborate (PMsc);
  22. --
  23. --     Static Control Manager
  24. --
  25. --     Static control styles:
  26. --
  27. --   NOTE: the top 9 bits of the LOWORD of the window flStyle are used for
  28. --   DT_flags.  The lower 7 bits are for SS_styles.  This gives us up
  29. --   to 128 distinct static control types ( we currently use 11 of them).
  30. --
  31.  SS_TEXT           :constant Ulong:=16#0001#;
  32.  SS_GROUPBOX       :constant Ulong:=16#0002#;
  33.  SS_ICON           :constant Ulong:=16#0003#;
  34.  SS_BITMAP         :constant Ulong:=16#0004#;
  35.  SS_FGNDRECT       :constant Ulong:=16#0005#;
  36.  -- INCL_SAADEFS
  37.  SS_HALFTONERECT   :constant Ulong:=16#0006#;
  38.  SS_BKGNDRECT      :constant Ulong:=16#0007#;
  39.  SS_FGNDFRAME      :constant Ulong:=16#0008#;
  40.  SS_HALFTONEFRAME  :constant Ulong:=16#0009#;
  41.  SS_BKGNDFRAME     :constant Ulong:=16#000a#;
  42.  SS_SYSICON        :constant Ulong:=16#000b#;
  43.  SS_AUTOSIZE       :constant Ulong:=16#0040#;
  44.  
  45. --    Static control messages
  46.  
  47.  SM_SETHANDLE      :constant Ulong:=16#0100#;
  48.  SM_QUERYHANDLE    :constant Ulong:=16#0101#;
  49.  
  50. --     Button Controls Subsection
  51. --     Button control styles
  52.  
  53.  BS_PUSHBUTTON       :constant Ulong:=      0 ;
  54.  BS_CHECKBOX         :constant Ulong:=      1 ;
  55.  BS_AUTOCHECKBOX     :constant Ulong:=      2 ;
  56.  BS_RADIOBUTTON      :constant Ulong:=      3 ;
  57.  BS_AUTORADIOBUTTON  :constant Ulong:=      4 ;
  58.  BS_3STATE           :constant Ulong:=      5 ;
  59.  BS_AUTO3STATE       :constant Ulong:=      6 ;
  60.  BS_USERBUTTON       :constant Ulong:=      7 ;
  61.  BS_PRIMARYSTYLES    :constant Ulong:=16#000f#;
  62.  BS_BITMAP           :constant Ulong:=16#0040#;
  63.  BS_ICON             :constant Ulong:=16#0080#;
  64.  BS_HELP             :constant Ulong:=16#0100#;
  65.  BS_SYSCOMMAND       :constant Ulong:=16#0200#;
  66.  BS_DEFAULT          :constant Ulong:=16#0400#;
  67.  BS_NOPOINTERFOCUS   :constant Ulong:=16#0800#;
  68.  BS_NOBORDER         :constant Ulong:=16#1000#;
  69.  BS_NOCURSORSELECT   :constant Ulong:=16#2000#;
  70.  BS_AUTOSIZE         :constant Ulong:=16#4000#;
  71.  
  72. --    Binary resources may be bound into application executables or
  73. --    passed as a parameter when creating a window or dialog
  74. --    Currently they must be the same for both 16-bit and 32-bit
  75. --    so we pack the structures.
  76.  
  77. type BTNCDATA    is record   -- btncd
  78.   cb               :USHORT  ;
  79.   fsCheckState     :USHORT  ;
  80.   fsHiliteState    :USHORT  ;
  81.   hImage           :LHANDLE ;
  82. end record; -- BTNCDATA;
  83. type PBTNCDATA  is access all BTNCDATA;
  84.  
  85. --     User button structure ( passed in WM_CONTROL msg)
  86.  
  87. type USERBUTTON    is record    -- ubtn
  88.     hwn            :HWND    ;
  89.     hp             :HPS     ;
  90.     fsState        :ULONG   ;
  91.     fsStateOld     :ULONG   ;
  92. end record; -- USERBUTTON;
  93. type PUSERBUTTON  is access all USERBUTTON;
  94.  
  95. --     Button control messages
  96. --
  97.  BM_CLICK                   :constant Ulong:=16#0120#;
  98.  BM_QUERYCHECKINDEX         :constant Ulong:=16#0121#;
  99.  BM_QUERYHILITE             :constant Ulong:=16#0122#;
  100.  BM_SETHILITE               :constant Ulong:=16#0123#;
  101.  BM_QUERYCHECK              :constant Ulong:=16#0124#;
  102.  BM_SETCHECK                :constant Ulong:=16#0125#;
  103.  BM_SETDEFAULT              :constant Ulong:=16#0126#;
  104. --
  105. --     Button notification codes
  106. --
  107.  BN_CLICKED      :constant Ulong:=  1 ;
  108.  BN_DBLCLICKED   :constant Ulong:=  2 ;
  109.  BN_PAINT        :constant Ulong:=  3 ;
  110. --
  111. --     BN_PAINT button draw state codes ( must be in high byte)
  112. --
  113.  BDS_HILITED    :constant Ulong:=16#0100#;
  114.  BDS_DISABLED   :constant Ulong:=16#0200#;
  115.  BDS_DEFAULT    :constant Ulong:=16#0400#;
  116.  
  117. --     Entryfield controls Subsection
  118. --
  119. --     Entry field  styles
  120. --
  121.  ES_LEFT        :constant Ulong:=16#00000000#;
  122.  ES_CENTER      :constant Ulong:=16#00000001#;
  123.  ES_RIGHT       :constant Ulong:=16#00000002#;
  124.  ES_AUTOSCROLL  :constant Ulong:=16#00000004#;
  125.  ES_MARGIN      :constant Ulong:=16#00000008#;
  126.  ES_AUTOTAB     :constant Ulong:=16#00000010#;
  127.  ES_READONLY    :constant Ulong:=16#00000020#;
  128.  ES_COMMAND     :constant Ulong:=16#00000040#;
  129.  ES_UNREADABLE  :constant Ulong:=16#00000080#;
  130.  ES_AUTOSIZE    :constant Ulong:=16#00000200#;
  131.  ES_ANY         :constant Ulong:=16#00000000#;
  132.  ES_SBCS        :constant Ulong:=16#00001000#;
  133.  ES_DBCS        :constant Ulong:=16#00002000#;
  134.  ES_MIXED       :constant Ulong:=16#00003000#;
  135.  
  136. --     combo box styles
  137. --
  138.  CBS_SIMPLE        :constant Ulong:=16#0001#;
  139.  CBS_DROPDOWN      :constant Ulong:=16#0002#;
  140.  CBS_DROPDOWNLIST  :constant Ulong:=16#0004#;
  141. --
  142. --    Use this bit for drop down combo boxes that do not want to
  143. --    receive a CBN_ENTER on a single click in their list boxes.
  144. --    This is for compatibility with releases prior to OS/2 2.0 which
  145. --    did not send this message
  146. --
  147.  CBS_COMPATIBLE   :constant Ulong:=16#0008#;
  148.  
  149. --   The following edit and listbox styles may be used in conjunction
  150. --   with CBS_ styles
  151. --   ES_AUTOTAB ES_ANY ES_SBCS ES_DBCS ES_MIXED LS_HORZSCROL#;
  152.  
  153. --    IDs of combobox entry field and listbox.
  154. --
  155.  CBID_LIST         :constant Ulong:=16#029A#;
  156.  CBID_EDIT         :constant Ulong:=16#029B#;
  157.  CBM_SHOWLIST      :constant Ulong:=16#0170#;
  158.  CBM_HILITE        :constant Ulong:=16#0171#;
  159.  CBM_ISLISTSHOWING :constant Ulong:=16#0172#;
  160.  
  161.  CBN_EFCHANGE  :constant Ulong:=   1 ;
  162.  CBN_EFSCROLL  :constant Ulong:=   2 ;
  163.  CBN_MEMERROR  :constant Ulong:=   3 ;
  164.  CBN_LBSELECT  :constant Ulong:=   4 ;
  165.  CBN_LBSCROLL  :constant Ulong:=   5 ;
  166.  CBN_SHOWLIST  :constant Ulong:=   6 ;
  167.  CBN_ENTER     :constant Ulong:=   7 ;
  168.  
  169. --       Binary resources may be bound into application executables or
  170. --       passed as a parameter when creating a window or dialog
  171. --       Currently they must be the same for both 16-bit and 32-bit
  172. --       so we pack the structures.
  173.  
  174. type ENTRYFDATA  is record     -- efd
  175.       cb             :USHORT  ;
  176.       cchEditLimit   :USHORT  ;
  177.       ichMinSel      :USHORT  ;
  178.       ichMaxSel      :USHORT  ;
  179. end record; -- ENTRYFDATA;
  180. type PENTRYFDATA  is access all ENTRYFDATA;
  181.  
  182. --     Entry Field  messages
  183.  
  184.  EM_QUERYCHANGED            :constant Ulong:=16#0140#;
  185.  EM_QUERYSEL                :constant Ulong:=16#0141#;
  186.  EM_SETSEL                  :constant Ulong:=16#0142#;
  187.  EM_SETTEXTLIMIT            :constant Ulong:=16#0143#;
  188.  EM_CUT                     :constant Ulong:=16#0144#;
  189.  EM_COPY                    :constant Ulong:=16#0145#;
  190.  EM_CLEAR                   :constant Ulong:=16#0146#;
  191.  EM_PASTE                   :constant Ulong:=16#0147#;
  192.  EM_QUERYFIRSTCHAR          :constant Ulong:=16#0148#;
  193.  EM_SETFIRSTCHAR            :constant Ulong:=16#0149#;
  194.  EM_QUERYREADONLY           :constant Ulong:=16#014a#;
  195.  EM_SETREADONLY             :constant Ulong:=16#014b#;
  196.  EM_SETINSERTMODE           :constant Ulong:=16#014c#;
  197.  
  198. --     Entry Field notification messages
  199.  
  200.  EN_SETFOCUS                :constant Ulong:=16#0001#;
  201.  EN_KILLFOCUS               :constant Ulong:=16#0002#;
  202.  EN_CHANGE                  :constant Ulong:=16#0004#;
  203.  EN_SCROLL                  :constant Ulong:=16#0008#;
  204.  EN_MEMERROR                :constant Ulong:=16#0010#;
  205.  EN_OVERFLOW                :constant Ulong:=16#0020#;
  206.  EN_INSERTMODETOGGLE        :constant Ulong:=16#0040#;
  207.  
  208. --  Multiple Line Entrys
  209. --      MLE Window styles ( in addition to WS_* )
  210.  
  211.  MLS_WORDWRAP               :constant Ulong:=16#00000001#;
  212.  MLS_BORDER                 :constant Ulong:=16#00000002#;
  213.  MLS_VSCROLL                :constant Ulong:=16#00000004#;
  214.  MLS_HSCROLL                :constant Ulong:=16#00000008#;
  215.  MLS_READONLY               :constant Ulong:=16#00000010#;
  216.  MLS_IGNORETAB              :constant Ulong:=16#00000020#;
  217.  MLS_DISABLEUNDO            :constant Ulong:=16#00000040#;
  218.  
  219. --     MLE External Data Types
  220.  
  221. subtype IPT  is LONG   ;       -- insertion point
  222. subtype PIPT is PLONG  ;       -- insertion point
  223. subtype PIX  is LONG   ;       -- pixel
  224. subtype LINE is ULONG  ;       -- Line number
  225.  
  226. type  FORMATRECT  is record    -- MLEFRD
  227.    cxFormat   :LONG ;           -- format rectangle width
  228.    cyFormat   :LONG ;           -- format rectangle height
  229. end record; -- MLEFORMATRECT;
  230. type PMLEFORMATRECT  is access all FORMATRECT;
  231.  
  232. type  MLECTLDATA  is record    -- MLECTL
  233.   cbCtlData       :USHORT   ;  -- Length of the MLECTLDATA structure
  234.   afIEFormat      :USHORT   ;  -- import/export format
  235.   cchText         :ULONG    ;  -- text limit
  236.   iptAnchor       :IPT      ;  -- beginning of selection
  237.   iptCursor       :IPT      ;  -- ending of selection
  238.   cxFormat        :LONG     ;  -- format rectangle width
  239.   cyFormat        :LONG     ;  -- format rectangle height
  240.   afFormatFlags   :ULONG    ;  -- formatting rectangle flags
  241. end record; -- MLECTLDATA;
  242. type PMLECTLDATA  is access all MLECTLDATA;
  243.  
  244. --     afFormatFlags mask
  245.  
  246.  MLFFMTRECT_LIMITHORZ       :constant Ulong:=16#00000001#;
  247.  MLFFMTRECT_LIMITVERT       :constant Ulong:=16#00000002#;
  248.  MLFFMTRECT_MATCHWINDOW     :constant Ulong:=16#00000004#;
  249.  MLFFMTRECT_FORMATRECT      :constant Ulong:=16#00000007#;
  250.  
  251. --     afIEFormat - Import/Export Format flags
  252.  
  253.  MLFIE_CFTEXT         :constant Ulong:=      0 ;
  254.  MLFIE_NOTRANS        :constant Ulong:=      1 ;
  255.  MLFIE_WINFMT         :constant Ulong:=      2 ;
  256.  MLFIE_RTF            :constant Ulong:=      3 ;
  257.  
  258. --     MLN_OVERFLOW structure
  259.  
  260. type  MLEOVERFLOW  is record    -- overflow
  261.     afErrInd      :ULONG;     -- see mask below
  262.    nBytesOver     :LONG ;     -- number of bytes overflowed
  263.    pixHorzOver    :LONG ;     -- number of pixels horizontally overflow
  264.    pixVertOver    :LONG ;     -- number of pixels vertically overflowed
  265. end record; --  MLEOVERFLOW;
  266. type PMLEOVERFLOW  is access all MLEOVERFLOW;
  267.  
  268. --     afErrInd - error format rectangle flags
  269.  
  270.  MLFEFR_RESIZE              :constant Ulong:=16#00000001#;
  271.  MLFEFR_TABSTOP             :constant Ulong:=16#00000002#;
  272.  MLFEFR_FONT                :constant Ulong:=16#00000004#;
  273.  MLFEFR_TEXT                :constant Ulong:=16#00000008#;
  274.  MLFEFR_WORDWRAP            :constant Ulong:=16#00000010#;
  275.  MLFETL_TEXTBYTES           :constant Ulong:=16#00000020#;
  276.  
  277. --     MLN_MARGIN structure
  278.  
  279. type  MLEMARGSTRUCT  is record      -- margin
  280.   afMargins   :USHORT ;      -- margin indicator
  281.   usMouMsg    :USHORT ;      -- mouse message
  282.   iptNear     :IPT    ;      -- the geometrically nearest insertion point
  283. end record; -- MLEMARGSTRUCT;
  284. type PMLEMARGSTRUCT  is access all MLEMARGSTRUCT;
  285.  
  286. --     afFlags - margin notification indicators
  287.  
  288.  MLFMARGIN_LEFT             :constant Ulong:=16#0001#;
  289.  MLFMARGIN_BOTTOM           :constant Ulong:=16#0002#;
  290.  MLFMARGIN_RIGHT            :constant Ulong:=16#0003#;
  291.  MLFMARGIN_TOP              :constant Ulong:=16#0004#;
  292. --
  293. --     MLM_QUERYSELECTION flags
  294.  
  295.  MLFQS_MINMAXSEL   :constant Ulong:= 0 ;
  296.  MLFQS_MINSEL      :constant Ulong:= 1 ;
  297.  MLFQS_MAXSEL      :constant Ulong:= 2 ;
  298.  MLFQS_ANCHORSEL   :constant Ulong:= 3 ;
  299.  MLFQS_CURSORSEL   :constant Ulong:= 4 ;
  300. --
  301. --     MLN_CLPBDFAIL flags
  302. --
  303.  MLFCLPBD_TOOMUCHTEXT       :constant Ulong:=16#00000001#;
  304.  MLFCLPBD_ERROR             :constant Ulong:=16#00000002#;
  305.  
  306. --     MLM_SEARCH structure
  307.  
  308. type  SEARCH    is record   -- search
  309.    cb           :USHORT ;    -- size of search spec structure
  310.    pchFind      :PCHAR  ;    -- string to search for
  311.    pchReplace   :PCHAR  ;    -- string to replace with
  312.    cchFind      :SHORT  ;    -- length of pchFindString
  313.    cchReplace   :SHORT  ;    -- length of replace string
  314.    iptStart     :IPT    ;    -- point at which to start search
  315.                              -- (negative indicates cursor pt)
  316.                              -- becomes pt where string found
  317.    iptStop      :IPT    ;    -- point at which to stop search
  318.                              -- (negative indicates EOT)
  319.    cchFound     :USHORT ;    -- Length of found string at iptStart
  320. end record; -- SEARCH;
  321. type PSEARCH  is access all SEARCH;
  322.  
  323. --     MLM_SEARCH style flags
  324.  
  325.  MLFSEARCH_CASESENSITIVE    :constant Ulong:=16#00000001#;
  326.  MLFSEARCH_SELECTMATCH      :constant Ulong:=16#00000002#;
  327.  MLFSEARCH_CHANGEALL        :constant Ulong:=16#00000004#;
  328.  
  329. --     MLE messages - MLM from :constant Ulong:=16#01b0 to :constant Ulong:=16#01de; MLN from :constant Ulong:=16#0001 to :constant Ulong:=16#000f
  330. --
  331. --        formatting messages
  332.  MLM_SETTEXTLIMIT           :constant Ulong:=16#01b0#;
  333.  MLM_QUERYTEXTLIMIT         :constant Ulong:=16#01b1#;
  334.  MLM_SETFORMATRECT          :constant Ulong:=16#01b2#;
  335.  MLM_QUERYFORMATRECT        :constant Ulong:=16#01b3#;
  336.  MLM_SETWRAP                :constant Ulong:=16#01b4#;
  337.  MLM_QUERYWRAP              :constant Ulong:=16#01b5#;
  338.  MLM_SETTABSTOP             :constant Ulong:=16#01b6#;
  339.  MLM_QUERYTABSTOP           :constant Ulong:=16#01b7#;
  340.  MLM_SETREADONLY            :constant Ulong:=16#01b8#;
  341.  MLM_QUERYREADONLY          :constant Ulong:=16#01b9#;
  342.  
  343. --     -- text content manipulation and queries messages
  344.  MLM_QUERYCHANGED           :constant Ulong:=16#01ba#;
  345.  MLM_SETCHANGED             :constant Ulong:=16#01bb#;
  346.  MLM_QUERYLINECOUNT         :constant Ulong:=16#01bc#;
  347.  MLM_CHARFROMLINE           :constant Ulong:=16#01bd#;
  348.  MLM_LINEFROMCHAR           :constant Ulong:=16#01be#;
  349.  MLM_QUERYLINELENGTH        :constant Ulong:=16#01bf#;
  350.  MLM_QUERYTEXTLENGTH        :constant Ulong:=16#01c0#;
  351. --
  352. --        text import and export messages
  353.  MLM_FORMAT                 :constant Ulong:=16#01c1#;
  354.  MLM_SETIMPORTEXPORT        :constant Ulong:=16#01c2#;
  355.  MLM_IMPORT                 :constant Ulong:=16#01c3#;
  356.  MLM_EXPORT                 :constant Ulong:=16#01c4#;
  357.  MLM_DELETE                 :constant Ulong:=16#01c6#;
  358.  MLM_QUERYFORMATLINELENGTH  :constant Ulong:=16#01c7#;
  359.  MLM_QUERYFORMATTEXTLENGTH  :constant Ulong:=16#01c8#;
  360.  MLM_INSERT                 :constant Ulong:=16#01c9#;
  361. --
  362. --        selection messages
  363.  MLM_SETSEL         :constant Ulong:=16#01ca#;
  364.  MLM_QUERYSEL       :constant Ulong:=16#01cb#;
  365.  MLM_QUERYSELTEXT   :constant Ulong:=16#01cc#;
  366.  
  367. --        undo and redo messages
  368.  MLM_QUERYUNDO              :constant Ulong:=16#01cd#;
  369.  MLM_UNDO                   :constant Ulong:=16#01ce#;
  370.  MLM_RESETUNDO              :constant Ulong:=16#01cf#;
  371. --
  372. --        text attributes messages
  373.  MLM_QUERYFONT              :constant Ulong:=16#01d0#;
  374.  MLM_SETFONT                :constant Ulong:=16#01d1#;
  375.  MLM_SETTEXTCOLOR           :constant Ulong:=16#01d2#;
  376.  MLM_QUERYTEXTCOLOR         :constant Ulong:=16#01d3#;
  377.  MLM_SETBACKCOLOR           :constant Ulong:=16#01d4#;
  378.  MLM_QUERYBACKCOLOR         :constant Ulong:=16#01d5#;
  379.  
  380. --        scrolling messages
  381.  MLM_QUERYFIRSTCHAR         :constant Ulong:=16#01d6#;
  382.  MLM_SETFIRSTCHAR           :constant Ulong:=16#01d7#;
  383. --
  384. --        clipboard messages
  385.  MLM_CUT                    :constant Ulong:=16#01d8#;
  386.  MLM_COPY                   :constant Ulong:=16#01d9#;
  387.  MLM_PASTE                  :constant Ulong:=16#01da#;
  388.  MLM_CLEAR                  :constant Ulong:=16#01db#;
  389. --
  390. --        display manipulation messages
  391.  MLM_ENABLEREFRESH          :constant Ulong:=16#01dc#;
  392.  MLM_DISABLEREFRESH         :constant Ulong:=16#01dd#;
  393.  
  394. --        search message
  395.  MLM_SEARCH                 :constant Ulong:=16#01de#;
  396.  MLM_QUERYIMPORTEXPORT      :constant Ulong:=16#01df#;
  397. --
  398. --        notification messages
  399.  MLN_OVERFLOW               :constant Ulong:=16#0001#;
  400.  MLN_PIXHORZOVERFLOW        :constant Ulong:=16#0002#;
  401.  MLN_PIXVERTOVERFLOW        :constant Ulong:=16#0003#;
  402.  MLN_TEXTOVERFLOW           :constant Ulong:=16#0004#;
  403.  MLN_VSCROLL                :constant Ulong:=16#0005#;
  404.  MLN_HSCROLL                :constant Ulong:=16#0006#;
  405.  MLN_CHANGE                 :constant Ulong:=16#0007#;
  406.  MLN_SETFOCUS               :constant Ulong:=16#0008#;
  407.  MLN_KILLFOCUS              :constant Ulong:=16#0009#;
  408.  MLN_MARGIN                 :constant Ulong:=16#000a#;
  409.  MLN_SEARCHPAUSE            :constant Ulong:=16#000b#;
  410.  MLN_MEMERROR               :constant Ulong:=16#000c#;
  411.  MLN_UNDOOVERFLOW           :constant Ulong:=16#000d#;
  412.  MLN_CLPBDFAIL              :constant Ulong:=16#000f#;
  413.  
  414. --     Listboxes
  415. --
  416. --        List box styles
  417. --
  418.  LS_MULTIPLESEL             :constant Ulong:=16#00000001#;
  419.  LS_OWNERDRAW               :constant Ulong:=16#00000002#;
  420.  LS_NOADJUSTPOS             :constant Ulong:=16#00000004#;
  421.  LS_HORZSCROLL              :constant Ulong:=16#00000008#;
  422.  LS_EXTENDEDSEL             :constant Ulong:=16#00000010#;
  423.  
  424. --      List box notification messages
  425.  
  426.  LN_SELECT               :constant Ulong:=   1 ;
  427.  LN_SETFOCUS             :constant Ulong:=   2 ;
  428.  LN_KILLFOCUS            :constant Ulong:=   3 ;
  429.  LN_SCROLL               :constant Ulong:=   4 ;
  430.  LN_ENTER                :constant Ulong:=   5 ;
  431.  
  432. --        List box messages
  433.  
  434.  LM_QUERYITEMCOUNT          :constant Ulong:=16#0160#;
  435.  LM_INSERTITEM              :constant Ulong:=16#0161#;
  436.  LM_SETTOPINDEX             :constant Ulong:=16#0162#;
  437.  LM_DELETEITEM              :constant Ulong:=16#0163#;
  438.  LM_SELECTITEM              :constant Ulong:=16#0164#;
  439.  LM_QUERYSELECTION          :constant Ulong:=16#0165#;
  440.  LM_SETITEMTEXT             :constant Ulong:=16#0166#;
  441.  LM_QUERYITEMTEXTLENGTH     :constant Ulong:=16#0167#;
  442.  LM_QUERYITEMTEXT           :constant Ulong:=16#0168#;
  443.  LM_SETITEMHANDLE           :constant Ulong:=16#0169#;
  444.  LM_QUERYITEMHANDLE         :constant Ulong:=16#016a#;
  445.  LM_SEARCHSTRING            :constant Ulong:=16#016b#;
  446.  LM_SETITEMHEIGHT           :constant Ulong:=16#016c#;
  447.  LM_QUERYTOPINDEX           :constant Ulong:=16#016d#;
  448.  LM_DELETEALL               :constant Ulong:=16#016e#;
  449.  
  450. --        List box constants
  451. --
  452. --     #define LIT_CURSOR                 ( -4)
  453. --     #define LIT_ERROR                  ( -3)
  454. --     #define LIT_MEMERROR               ( -2)
  455. --     #define LIT_NONE                   ( -1)
  456. --     #define LIT_FIRST                  ( -1)
  457. --
  458. --     -- For LM_INSERTITEM msg
  459. --
  460. --     #define LIT_END                    ( -1)
  461. --     #define LIT_SORTASCENDING          ( -2)
  462. --     #define LIT_SORTDESCENDING         ( -3)
  463. --
  464. --     -- For LM_SEARCHSTRING msg
  465. --
  466.  LSS_SUBSTRING              :constant Ulong:=16#0001#;
  467.  LSS_PREFIX                 :constant Ulong:=16#0002#;
  468.  LSS_CASESENSITIVE          :constant Ulong:=16#0004#;
  469.  
  470. --        Useful macros
  471. --
  472. --     LONG/SHORT WinDeleteLboxItem(:HWND hwn Lbox;:LONG/SHORT index)
  473. --        deletes item index from the listbox.
  474. --        returns the number of items left.
  475. --
  476. --     #define WinDeleteLboxItem( hwn Lbox; index) \
  477. --     ( (:LONG)WinSendMsg( hwn Lbox; LM_DELETEITEM; MPFROMLONG( index)return \
  478. --     ( MPARAM)NULL))
  479. --
  480. --     LONG/SHORT WinInsertLboxItem(:HWND hwn Lbox;:LONG/SHORT index; PSZ psz)
  481. --        inserts psz into a listbox at index.  Index may be an LIT_ constant.
  482. --        returns the actual index where it was inserted.
  483. --
  484. --     #define WinInsertLboxItem( hwn Lbox; index; psz) \
  485. --     ( (:LONG)WinSendMsg( hwn Lbox; LM_INSERTITEM; MPFROMLONG( index)return \
  486. --     MPFROMP( psz)))
  487. --
  488. --
  489. --     LONG/SHORT WinQueryLboxCount(:HWND hwn Lbox)
  490. --        returns the number of items in the listbox.
  491. --
  492. --     *************************************************************************--
  493. --     #define WinQueryLboxCount( hwn Lbox) \
  494. --     ( (:LONG)WinSendMsg( hwn Lbox; LM_QUERYITEMCOUNT; ( MPARAM)NULL; \
  495. --     ( MPARAM)NULL))
  496. --
  497. --     LONG/SHORT WinQueryLboxItemText(:HWND hwn Lbox;:LONG/SHORT index; PSZ psz;:SHORT cchMax)
  498. --        fills psz with the text if item index.
  499. --        returns the text length copied.
  500. --
  501. --     #define WinQueryLboxItemText( hwn Lbox; index; psz; cchMax) \
  502. --     ( (:LONG)WinSendMsg( hwn Lbox; LM_QUERYITEMTEXT; \
  503. --     MPFROM2SHORT( ( index)return ( cchMax))return MPFROMP( psz)))
  504. --
  505. --     LONG/SHORT WinQueryLboxItemTextLength(:HWND hwn Lbox;:LONG/SHORT index)
  506. --        returns the length of item index.
  507. --
  508. --
  509. --     #define WinQueryLboxItemTextLength( hwn Lbox; index)         \
  510. --     ( (:SHORT)WinSendMsg( hwn Lbox; LM_QUERYITEMTEXTLENGTH;    \
  511. --     MPFROMSHORT( index)return ( MPARAM)NULL))
  512. --
  513. --     BOOL32 WinSetLboxItemText(:HWND hwn Lbox;:LONG/SHORT index; PSZ psz)
  514. --        sets the text of item index to psz.
  515. --        returns fSuccess.
  516. --
  517. --     #define WinSetLboxItemText( hwn Lbox; index; psz) \
  518. --     ( ( BOOL)WinSendMsg( hwn Lbox; LM_SETITEMTEXT; \
  519. --     MPFROMLONG( index)return MPFROMP( psz)))
  520. --
  521. --     LONG/SHORT WinQueryLboxSelectedItem(:HWND hwn Lbox)
  522. --        returns the item index selected. ( for single selection only)
  523. --
  524. --     #define WinQueryLboxSelectedItem( hwn Lbox) \
  525. --     ( (:LONG)WinSendMsg( hwn Lbox; LM_QUERYSELECTION; MPFROMLONG( LIT_FIRST)return \
  526. --     ( MPARAM)NULL))
  527.  
  528. --     --**--Menu Manager Subsection
  529. --     -- Menu control styles
  530. --
  531.  MS_ACTIONBAR           :constant Ulong:=16#00000001#;
  532.  MS_TITLEBUTTON         :constant Ulong:=16#00000002#;
  533.  MS_VERTICALFLIP        :constant Ulong:=16#00000004#;
  534.  MS_CONDITIONALCASCADE  :constant Ulong:=16#00000040#;
  535.  
  536. function WinLoadMenu(hwndFrame:HWND    ;
  537.                      hmod     :HMODULE ;
  538.                      idMenu   :ULONG   )return HWND;
  539. pragma Import(c,WinLoadMenu, Link_name=>"_WinLoadMenu");
  540.  
  541. --      Menu control messages
  542. --
  543.  MM_INSERTITEM              :constant Ulong:=16#0180#;
  544.  MM_DELETEITEM              :constant Ulong:=16#0181#;
  545.  MM_QUERYITEM               :constant Ulong:=16#0182#;
  546.  MM_SETITEM                 :constant Ulong:=16#0183#;
  547.  MM_QUERYITEMCOUNT          :constant Ulong:=16#0184#;
  548.  MM_STARTMENUMODE           :constant Ulong:=16#0185#;
  549.  MM_ENDMENUMODE             :constant Ulong:=16#0186#;
  550.  MM_REMOVEITEM              :constant Ulong:=16#0188#;
  551.  MM_SELECTITEM              :constant Ulong:=16#0189#;
  552.  MM_QUERYSELITEMID          :constant Ulong:=16#018a#;
  553.  MM_QUERYITEMTEXT           :constant Ulong:=16#018b#;
  554.  MM_QUERYITEMTEXTLENGTH     :constant Ulong:=16#018c#;
  555.  MM_SETITEMHANDLE           :constant Ulong:=16#018d#;
  556.  MM_SETITEMTEXT             :constant Ulong:=16#018e#;
  557.  MM_ITEMPOSITIONFROMID      :constant Ulong:=16#018f#;
  558.  MM_ITEMIDFROMPOSITION      :constant Ulong:=16#0190#;
  559.  MM_QUERYITEMATTR           :constant Ulong:=16#0191#;
  560.  MM_SETITEMATTR             :constant Ulong:=16#0192#;
  561.  MM_ISITEMVALID             :constant Ulong:=16#0193#;
  562.  MM_QUERYITEMRECT           :constant Ulong:=16#0194#;
  563.  MM_QUERYDEFAULTITEMID      :constant Ulong:=16#0431#;
  564.  MM_SETDEFAULTITEMID        :constant Ulong:=16#0432#;
  565. --     #define MTI_INCLUDED
  566.  
  567. type mti    is record   -- mti
  568.      afStyle     :USHORT ;      -- Style Flags
  569.      pad         :USHORT ;      -- pad for template
  570.      idItem      :USHORT ;      -- Item ID
  571.      c           :CHAR   ;      -- [2];
  572.      c2          :CHAR   ;
  573. end record; -- MTI;
  574.  
  575. type mt     is record   -- mt
  576.     len          :ULONG  ;     -- Length of template in bytes
  577.     codepage     :USHORT ;     -- Codepage
  578.     reserved     :USHORT ;     -- Reserved.
  579.     cMti         :USHORT ;     -- Count of template items.
  580.     rgMti        :MTI    ;     --   [1]; Array of template items.
  581. end record; -- MT;
  582. type LPMT is access all  MT ;
  583.  
  584. function WinCreateMenu(hwndParent:HWND  ;
  585.                        lpm       :PVOID )return HWND;
  586. pragma Import(c,WinCreateMenu, Link_name=>"_WinCreateMenu");
  587.  
  588. --     Owner Item Structure ( Also used for listboxes)
  589.  
  590. type OWNERITEM    is record  -- oi
  591.     hwn           :HWND    ;
  592.     hp            :HPS     ;
  593.     fsState       :ULONG   ;
  594.     fsAttribute   :ULONG   ;
  595.     fsStateOld    :ULONG   ;
  596.     fsAttributeOld:ULONG   ;
  597.     rclItem       :RECTL   ;
  598.     idItem        :LONG    ; -- This field contains idItem for menus; iItem for lb.
  599.     hItem         :ULONG   ;
  600. end record; -- OWNERITEM;
  601. type POWNERITEM  is access all OWNERITEM;
  602.  
  603. --      Menu item
  604. --
  605. --      Binary resources may be bound into application executables or
  606. --      passed as a parameter when creating a window or dialog
  607. --      Currently they must be the same for both 16-bit and 32-bit
  608. --      so we pack the structures.
  609.  
  610.     type MENUITEM is record     -- mi
  611.    iPosition     :SHORT   ;
  612.    afStyle       :USHORT  ;
  613.    afAttribute   :USHORT  ;
  614.    id            :USHORT  ;
  615.    hwndSubMenu   :HWND    ;
  616.    hItem         :ULONG   ;
  617. end record; -- MENUITEM;
  618. type PMENUITEM  is access all MENUITEM;
  619.  
  620. --     #define MIT_END                    ( -1)
  621. --     #define MIT_NONE                   ( -1)
  622. --     #define MIT_MEMERROR               ( -1)
  623. --     #define MIT_ERROR                  ( -1)
  624. --     #define MIT_FIRST                  ( -2)
  625. --     #define MIT_LAST                   ( -3)
  626. --     #define MID_NONE                   MIT_NONE
  627. --     #define MID_ERROR                  ( -1)
  628. --
  629. --     Menu item styles & attributes
  630. --
  631.  MIS_TEXT                   :constant Ulong:=16#0001#;
  632.  MIS_BITMAP                 :constant Ulong:=16#0002#;
  633.  MIS_SEPARATOR              :constant Ulong:=16#0004#;
  634.  MIS_OWNERDRAW              :constant Ulong:=16#0008#;
  635.  MIS_SUBMENU                :constant Ulong:=16#0010#;
  636.  MIS_MULTMENU               :constant Ulong:=16#0020#;    -- multiple choice submenu
  637.  MIS_SYSCOMMAND             :constant Ulong:=16#0040#;
  638.  MIS_HELP                   :constant Ulong:=16#0080#;
  639.  MIS_STATIC                 :constant Ulong:=16#0100#;
  640.  MIS_BUTTONSEPARATOR        :constant Ulong:=16#0200#;
  641.  MIS_BREAK                  :constant Ulong:=16#0400#;
  642.  MIS_BREAKSEPARATOR         :constant Ulong:=16#0800#;
  643.  MIS_GROUP                  :constant Ulong:=16#1000#;    -- multiple choice group start
  644. --        In multiple choice submenus a style of 'single' denotes the item is a
  645. --        radiobutton.  Absence of this style defaults the item to a checkbox.
  646.  MIS_SINGLE                 :constant Ulong:=16#2000#;
  647.  
  648.  MIA_NODISMISS              :constant Ulong:=16#0020#;
  649.  MIA_FRAMED                 :constant Ulong:=16#1000#;
  650.  MIA_CHECKED                :constant Ulong:=16#2000#;
  651.  MIA_DISABLED               :constant Ulong:=16#4000#;
  652.  MIA_HILITED                :constant Ulong:=16#8000#;
  653.  
  654. function WinPopupMenu(hwndParent:HWND ;
  655.                       hwndOwner :HWND ;
  656.                       hwndMenu  :HWND ;
  657.                       x         :LONG ;
  658.                       y         :LONG ;
  659.                       idItem    :LONG ;
  660.                       fs        :ULONG)return  BOOL32;
  661. pragma Import(c,WinPopupMenu, Link_name=>"_WinPopupMenu");
  662.  
  663. --     Values of fs in WinPopupMenu call
  664. --
  665. --     #define PU_POSITIONONITEM          :constant Ulong:=16#0001 -- Need idItem parameter
  666. --     #define PU_HCONSTRAIN              :constant Ulong:=16#0002 -- Keep menu on left and right edge
  667. --     #define PU_VCONSTRAIN              :constant Ulong:=16#0004 -- Keep menu on top and bottom edge
  668. --     #define PU_NONE                    :constant Ulong:=16#0000 -- If invoked by keyboard
  669. --     #define PU_MOUSEBUTTON1DOWN        :constant Ulong:=16#0008 -- If invoked by button 1
  670. --     #define PU_MOUSEBUTTON2DOWN        :constant Ulong:=16#0010 -- If invoked by button 2
  671. --     #define PU_MOUSEBUTTON3DOWN        :constant Ulong:=16#0018 -- If invoked by button 3
  672. --     #define PU_SELECTITEM              :constant Ulong:=16#0020 -- Set selected item ( use with kbd)
  673. --     #define PU_MOUSEBUTTON1            :constant Ulong:=16#0040 -- If button1 use allowed
  674. --     #define PU_MOUSEBUTTON2            :constant Ulong:=16#0080 -- If button2 use allowed
  675. --     #define PU_MOUSEBUTTON3            :constant Ulong:=16#0100 -- If button3 use allowed
  676. --     #define PU_KEYBOARD                :constant Ulong:=16#0200 -- If keyboard use allowed
  677. --
  678. --     -- Useful macros
  679. --
  680. --     BOOL32 WinCheckMenuItem(:HWND hwn Menu;:ULONG/USHORT id; BOOL32 fcheck)
  681. --        Sets the check state of menuitem #id to fcheck.
  682. --        returns fSuccess.
  683. --
  684. --     #define WinCheckMenuItem( hwn Menu; id; fcheck) \
  685. --     ( ( BOOL)WinSendMsg( hwn Menu; MM_SETITEMATTR; \
  686. --     MPFROM2SHORT( id; TRUE)return \
  687. --     MPFROM2SHORT( MIA_CHECKED; (:USHORT)( fcheck) ? MIA_CHECKED : 0)))
  688. --
  689. --     BOOL32 WinIsMenuItemChecked(:HWND hwn Menu;:USHORT/ULONG id)
  690. --        returns the check state of menuitem #id.
  691. --
  692. --     #define WinIsMenuItemChecked( hwn Menu; id) \
  693. --     ( ( BOOL)WinSendMsg( hwn Menu; MM_QUERYITEMATTR; \
  694. --     MPFROM2SHORT( id; TRUE)return \
  695. --     MPFROMLONG( MIA_CHECKED)))
  696. --
  697. --     BOOL32 WinEnableMenuItem(:HWND hwn Menu;:ULONG/USHORT id; BOOL32 fenable)
  698. --        sets the enable state of menuitem #id to fenable.
  699. --        returns fSuccess.
  700. --
  701. --     #define WinEnableMenuItem( hwn Menu; id; fEnable) \
  702. --     ( ( BOOL)WinSendMsg( hwn Menu; MM_SETITEMATTR; \
  703. --     MPFROM2SHORT( id; TRUE)return \
  704. --     MPFROM2SHORT( MIA_DISABLED; (:USHORT)( fEnable) ? 0 : MIA_DISABLED)))
  705. --
  706. --     BOOL32 WinIsMenuItemEnabled(:HWND hwn Menu;:USHORT/ULONG id)
  707. --        returns the enable state of menuitem #id.
  708. --
  709. --     #define WinIsMenuItemEnabled( hwn Menu; id)  \
  710. --     ( !( BOOL)WinSendMsg( hwn Menu; MM_QUERYITEMATTR; \
  711. --     MPFROM2SHORT( id; TRUE)return \
  712. --     MPFROMLONG( MIA_DISABLED)))
  713. --
  714. --     BOOL32 WinSetMenuItemText(:HWND hwn Menu;:ULONG/USHORT id; PSZ psz)
  715. --        sets the text of menuitem #id.
  716. --        returns fSuccess.
  717. --
  718. --     #define WinSetMenuItemText( hwn Menu; id; psz) \
  719. --     ( ( BOOL)WinSendMsg( hwn Menu; MM_SETITEMTEXT; \
  720. --     MPFROMLONG( id)return MPFROMP( psz)))
  721. --
  722. --     BOOL32 WinIsMenuItemValid(:HWND hwn Menu;:ULONG/USHORT id)
  723. --        Returns TRUE if the specified item is a valid choice.
  724. --
  725. --     #define WinIsMenuItemValid( hwn Menu; id) \
  726. --     ( ( BOOL)WinSendMsg( hwn Menu; MM_ISITEMVALID; \
  727. --     MPFROM2SHORT( id; TRUE)return MPFROMLONG( FALSE)))
  728.  
  729. --     Scroll Bar controls Subsection
  730. --
  731. --      Scroll Bar styles
  732. --
  733. --     #define SBS_HORZ                   0#;
  734. --     #define SBS_VERT                   1#;
  735. --     #define SBS_THUMBSIZE              2#;
  736. --     #define SBS_AUTOTRACK              4#;
  737. --     #define SBS_AUTOSIZE               :constant Ulong:=16#2000#;
  738. --
  739. --     -- Scroll Bar messages
  740. --
  741. --     #define SBM_SETSCROLLBAR           :constant Ulong:=16#01a0
  742. --     #define SBM_SETPOS                 :constant Ulong:=16#01a1
  743. --     #define SBM_QUERYPOS               :constant Ulong:=16#01a2
  744. --     #define SBM_QUERYRANGE             :constant Ulong:=16#01a3
  745. --     #define SBM_SETTHUMBSIZE           :constant Ulong:=16#01a6
  746. --
  747. --     -- Scroll Bar Commands
  748. --
  749. --     #define SB_LINEUP                  1
  750. --     #define SB_LINEDOWN                2
  751. --     #define SB_LINELEFT                1
  752. --     #define SB_LINERIGHT               2
  753. --     #define SB_PAGEUP                  3
  754. --     #define SB_PAGEDOWN                4
  755. --     #define SB_PAGELEFT                3
  756. --     #define SB_PAGERIGHT               4
  757. --     #define SB_SLIDERTRACK             5
  758. --     #define SB_SLIDERPOSITION          6
  759. --     #define SB_ENDSCROL#;      7
  760.  
  761. --         Binary resources may be bound into application executables or
  762. --         passed as a parameter when creating a window or dialog
  763. --         Currently they must be the same for both 16-bit and 32-bit
  764. --         so we pack the structures.
  765.  
  766. type SBCDATA  is record    -- sbcd
  767.      cb         :USHORT  ;
  768.      sHilite    :USHORT :=0 ;   -- reserved; should be set to zero
  769.      posFirst   :SHORT   ;
  770.      posLast    :SHORT   ;
  771.      posThumb   :SHORT   ;
  772.      cVisible   :SHORT   ;
  773.      cTotal     :SHORT   ;
  774. end record; -- SBCDATA;
  775. type PSBCDATA  is access all SBCDATA;
  776.  
  777. --     Frame Manager Common subsection
  778. --
  779. --      Binary resources may be bound into application executables or
  780. --      passed as a parameter when creating a window or dialog
  781. --      Currently they must be the same for both 16-bit and 32-bit
  782. --      so we pack the structures.
  783.  
  784. type FRAMECDATA  is record    -- fcdata
  785.     cb              :USHORT  ;
  786.     flCreateFlags   :ULONG   ;
  787.     hmodResources   :USHORT  ;
  788.     idResources     :USHORT  ;
  789. end record; -- FRAMECDATA;
  790. type PFRAMECDATA  is access all FRAMECDATA;
  791.  
  792. --      Frame window styles
  793. --      All unused FCF_xxx bits are reserved
  794.  
  795.  FCF_TITLEBAR       :constant ULONG:=16#00000001#;
  796.  FCF_SYSMENU        :constant ULONG:=16#00000002#;
  797.  FCF_MENU           :constant ULONG:=16#00000004#;
  798.  FCF_SIZEBORDER     :constant ULONG:=16#00000008#;
  799.  FCF_MINBUTTON      :constant ULONG:=16#00000010#;
  800.  FCF_MAXBUTTON      :constant ULONG:=16#00000020#;
  801.  FCF_MINMAX         :constant ULONG:=16#00000030#; -- minmax means BOTH buttons
  802.  FCF_VERTSCROLL     :constant ULONG:=16#00000040#;
  803.  FCF_HORZSCROLL     :constant ULONG:=16#00000080#;
  804.  FCF_DLGBORDER      :constant ULONG:=16#00000100#;
  805.  FCF_BORDER         :constant ULONG:=16#00000200#;
  806.  FCF_SHELLPOSITION  :constant ULONG:=16#00000400#;
  807.  FCF_TASKLIST       :constant ULONG:=16#00000800#;
  808.  FCF_NOBYTEALIGN    :constant ULONG:=16#00001000#;
  809.  FCF_NOMOVEWITHOWNER:constant ULONG:=16#00002000#;
  810.  FCF_ICON           :constant ULONG:=16#00004000#;
  811.  FCF_ACCELTABLE     :constant ULONG:=16#00008000#;
  812.  FCF_SYSMODAL       :constant ULONG:=16#00010000#;
  813.  FCF_SCREENALIGN    :constant ULONG:=16#00020000#;
  814.  FCF_MOUSEALIGN     :constant ULONG:=16#00040000#;
  815.  FCF_HIDEBUTTON     :constant ULONG:=16#01000000#;
  816.  FCF_HIDEMAX        :constant ULONG:=16#01000020#; -- hidemax means BOTH buttons
  817.  FCF_DBE_APPSTAT    :constant ULONG:=16#80000000#;
  818.  FCF_AUTOICON       :constant ULONG:=16#40000000#;
  819.  FCF_STANDARD       :constant ULONG:=16#0000CC3F#;
  820. --
  821. --     -- FCF_TITLEBAR | FCF_SYSMENU | FCF_MENU | FCF_SIZEBORDER | FCF_MINMAX |
  822. --     FCF_ICON | FCF_ACCELTABLE | FCF_SHELLPOSITION | FCF_TASKLIST
  823. --
  824.  FS_ICON                    :constant Ulong:=16#00000001#;
  825.  FS_ACCELTABLE              :constant Ulong:=16#00000002#;
  826.  FS_SHELLPOSITION           :constant Ulong:=16#00000004#;
  827.  FS_TASKLIST                :constant Ulong:=16#00000008#;
  828.  FS_NOBYTEALIGN             :constant Ulong:=16#00000010#;
  829.  FS_NOMOVEWITHOWNER         :constant Ulong:=16#00000020#;
  830.  FS_SYSMODAL                :constant Ulong:=16#00000040#;
  831.  FS_DLGBORDER               :constant Ulong:=16#00000080#;
  832.  FS_BORDER                  :constant Ulong:=16#00000100#;
  833.  FS_SCREENALIGN             :constant Ulong:=16#00000200#;
  834.  FS_MOUSEALIGN              :constant Ulong:=16#00000400#;
  835.  FS_SIZEBORDER              :constant Ulong:=16#00000800#;
  836.  FS_AUTOICON                :constant Ulong:=16#00001000#;
  837.  FS_DBE_APPSTAT             :constant Ulong:=16#00008000#;
  838.  FS_STANDARD                :constant Ulong:=16#0000000F#;
  839. --
  840. --     -- FS_ICON | FS_ACCELTABLE | FS_SHELLPOSITION | FS_TASKLIST
  841. --
  842. --     -- Frame Window Flags accessed via WinSet/QueryWindowUShort( QWS_FLAGS)
  843. --
  844.  FF_FLASHWINDOW             :constant Ulong:=16#0001#;
  845.  FF_ACTIVE                  :constant Ulong:=16#0002#;
  846.  FF_FLASHHILITE             :constant Ulong:=16#0004#;
  847.  FF_OWNERHIDDEN             :constant Ulong:=16#0008#;
  848.  FF_DLGDISMISSED            :constant Ulong:=16#0010#;
  849.  FF_OWNERDISABLED           :constant Ulong:=16#0020#;
  850.  FF_SELECTED                :constant Ulong:=16#0040#;
  851.  FF_NOACTIVATESWP           :constant Ulong:=16#0080#;
  852.  
  853. function WinCreateStdWindow(hwndParent    :HWND    ;
  854.                             flStyle       :ULONG   ;
  855.                             pflCreateFlags:PULONG  ;
  856.                             pszClientClass:PSZ     ;
  857.                             pszTitle      :PSz     ;
  858.                             styleClient   :ULONG   ;
  859.                             hmod          :HMODULE ;
  860.                             idResources   :ULONG   ;
  861.                             phwndClient   :PHWND   )return HWND ;
  862. pragma Import(c,WinCreateStdWindow, Link_name=>"_WinCreateStdWindow");
  863.  
  864. function WinFlashWindow(hwndFrame:HWND   ;
  865.                         fFlash   :BOOL32 )return BOOL32 ;
  866. pragma Import(c,WinFlashWindow, Link_name=>"_WinFlashWindow");
  867.  
  868. --     Frame window related messages
  869. --
  870.  WM_FLASHWINDOW             :constant Ulong:=16#0040#;
  871.  WM_FORMATFRAME             :constant Ulong:=16#0041#;
  872.  WM_UPDATEFRAME             :constant Ulong:=16#0042#;
  873.  WM_FOCUSCHANGE             :constant Ulong:=16#0043#;
  874.  WM_SETBORDERSIZE           :constant Ulong:=16#0044#;
  875.  WM_TRACKFRAME              :constant Ulong:=16#0045#;
  876.  WM_MINMAXFRAME             :constant Ulong:=16#0046#;
  877.  WM_SETICON                 :constant Ulong:=16#0047#;
  878.  WM_QUERYICON               :constant Ulong:=16#0048#;
  879.  WM_SETACCELTABLE           :constant Ulong:=16#0049#;
  880.  WM_QUERYACCELTABLE         :constant Ulong:=16#004a#;
  881.  WM_TRANSLATEACCEL          :constant Ulong:=16#004b#;
  882.  WM_QUERYTRACKINFO          :constant Ulong:=16#004c#;
  883.  WM_QUERYBORDERSIZE         :constant Ulong:=16#004d#;
  884.  WM_NEXTMENU                :constant Ulong:=16#004e#;
  885.  WM_ERASEBACKGROUND         :constant Ulong:=16#004f#;
  886.  WM_QUERYFRAMEINFO          :constant Ulong:=16#0050#;
  887.  WM_QUERYFOCUSCHAIN         :constant Ulong:=16#0051#;
  888.  WM_OWNERPOSCHANGE          :constant Ulong:=16#0052#;
  889.  WM_CALCFRAMERECT           :constant Ulong:=16#0053#;
  890. --     -- Note 16#0054# is reserved
  891.  WM_WINDOWPOSCHANGED        :constant Ulong:=16#0055#;
  892.  WM_ADJUSTFRAMEPOS          :constant Ulong:=16#0056#;
  893.  WM_QUERYFRAMECTLCOUNT      :constant Ulong:=16#0059#;
  894. --        -- Note  16#005A# is reserved
  895.  WM_QUERYHELPINFO        :constant Ulong:=16#005B#;
  896.  WM_SETHELPINFO          :constant Ulong:=16#005C#;
  897.  WM_ERROR                :constant Ulong:=16#005D#;
  898.  WM_REALIZEPALETTE       :constant Ulong:=16#005E#;
  899.  
  900. --        WM_QUERYFRAMEINFO constants
  901.  
  902.  FI_FRAME                :constant Ulong:=16#00000001#;
  903.  FI_OWNERHIDE            :constant Ulong:=16#00000002#;
  904.  FI_ACTIVATEOK           :constant Ulong:=16#00000004#;
  905.  FI_NOMOVEWITHOWNER      :constant Ulong:=16#00000008#;
  906.  
  907. function WinCreateFrameControls(hwndFrame:HWND        ;
  908.                                 pfcdata  :PFRAMECDATA ;
  909.                                 pszTitle :PSZ         )return BOOL32 ;
  910. pragma Import(c,WinCreateFrameControls, Link_name=>"_WinCreateFrameControls");
  911.  
  912. function WinCalcFrameRect(hwndFrame:HWND   ;
  913.                           prcl     :PRECTL ;
  914.                           fClient  :BOOL32 )return BOOL32 ;
  915. pragma Import(c,WinCalcFrameRect, Link_name=>"_WinCalcFrameRect");
  916.  
  917. function WinGetMinPosition(hwn :HWND    ;
  918.                            psw :PSWP    ;
  919.                            pptl:PPOINTL )return BOOL32 ;
  920. pragma Import(c,WinGetMinPosition, Link_name=>"_WinGetMinPosition");
  921.  
  922. function WinGetMaxPosition(hwn :HWND ;
  923.                            psw :PSWP )return BOOL32 ;
  924. pragma Import(c,WinGetMaxPosition, Link_name=>"_WinGetMaxPosition");
  925.  
  926. subtype  HSAVEWP is LHANDLE ;      -- hsvwp
  927.  
  928. function WinSaveWindowPos(hsvwp:HSAVEWP ;
  929.                           psw  :PSWP    ;
  930.                           cswp :ULONG   )return BOOL32;
  931. pragma Import(c,WinSaveWindowPos, Link_name=>"_WinSaveWindowPos");
  932.  
  933. --     -- Frame control IDs
  934. --
  935.  FID_SYSMENU                :constant Ulong:=16#8002#;
  936.  FID_TITLEBAR               :constant Ulong:=16#8003#;
  937.  FID_MINMAX                 :constant Ulong:=16#8004#;
  938.  FID_MENU                   :constant Ulong:=16#8005#;
  939.  FID_VERTSCROLL             :constant Ulong:=16#8006#;
  940.  FID_HORZSCROLL             :constant Ulong:=16#8007#;
  941.  FID_CLIENT                 :constant Ulong:=16#8008#;
  942. --     -- Note :constant Ulong:=16#8009 is reserved
  943.  FID_DBE_APPSTAT            :constant Ulong:=16#8010#;
  944.  FID_DBE_KBDSTAT            :constant Ulong:=16#8011#;
  945.  FID_DBE_PECIC              :constant Ulong:=16#8012#;
  946.  FID_DBE_KKPOPUP            :constant Ulong:=16#8013#;
  947. --
  948. --     -- Standard WM_SYSCOMMAND command values
  949. --
  950.  SC_SIZE                    :constant Ulong:=16#8000#;
  951.  SC_MOVE                    :constant Ulong:=16#8001#;
  952.  SC_MINIMIZE                :constant Ulong:=16#8002#;
  953.  SC_MAXIMIZE                :constant Ulong:=16#8003#;
  954.  SC_CLOSE                   :constant Ulong:=16#8004#;
  955.  SC_NEXT                    :constant Ulong:=16#8005#;
  956.  SC_APPMENU                 :constant Ulong:=16#8006#;
  957.  SC_SYSMENU                 :constant Ulong:=16#8007#;
  958.  SC_RESTORE                 :constant Ulong:=16#8008#;
  959.  SC_NEXTFRAME               :constant Ulong:=16#8009#;
  960.  SC_NEXTWINDOW              :constant Ulong:=16#8010#;
  961.  SC_TASKMANAGER             :constant Ulong:=16#8011#;
  962.  SC_HELPKEYS                :constant Ulong:=16#8012#;
  963.  SC_HELPINDEX               :constant Ulong:=16#8013#;
  964.  SC_HELPEXTENDED            :constant Ulong:=16#8014#;
  965.  SC_SWITCHPANELIDS          :constant Ulong:=16#8015#;
  966.  SC_DBE_FIRST               :constant Ulong:=16#8018#;
  967.  SC_DBE_LAST                :constant Ulong:=16#801F#;
  968.  SC_BEGINDRAG               :constant Ulong:=16#8020#;
  969.  SC_ENDDRAG                 :constant Ulong:=16#8021#;
  970.  SC_SELECT                  :constant Ulong:=16#8022#;
  971.  SC_OPEN                    :constant Ulong:=16#8023#;
  972.  SC_CONTEXTMENU             :constant Ulong:=16#8024#;
  973.  SC_CONTEXTHELP             :constant Ulong:=16#8025#;
  974.  SC_TEXTEDIT                :constant Ulong:=16#8026#;
  975.  SC_BEGINSELECT             :constant Ulong:=16#8027#;
  976.  SC_ENDSELECT               :constant Ulong:=16#8028#;
  977.  SC_WINDOW                  :constant Ulong:=16#8029#;
  978.  SC_HIDE                    :constant Ulong:=16#802a#;
  979. --
  980. --       Frame controls
  981. --
  982. --     ----Title bar controls
  983. --     -- Title bar control messages
  984. --
  985. --     #define TBM_SETHILITE              :constant Ulong:=16#01e3
  986. --     #define TBM_QUERYHILITE            :constant Ulong:=16#01e4
  987.  
  988. --     Rectangle routines
  989.  
  990. function WinCopyRect(ha     :HAB    ;
  991.                      prclDst:PRECTL ;
  992.                      prclSrc:PRECTL )return BOOL32;
  993. pragma Import(c,WinCopyRect, Link_name=>"_WinCopyRect");
  994.  
  995. function WinSetRect(ha     :HAB    ;
  996.                     prcl   :PRECTL ;
  997.                     xLeft  :LONG   ;
  998.                     yBottom:LONG   ;
  999.                     xRight :LONG   ;
  1000.                     yTop   :LONG   )return BOOL32;
  1001. pragma Import(c,WinSetRect, Link_name=>"_WinSetRect");
  1002.  
  1003. function WinIsRectEmpty(ha  :HAB    ;
  1004.                         prcl:PRECTL )return BOOL32;
  1005. pragma Import(c,WinIsRectEmpty, Link_name=>"_WinIsRectEmpty");
  1006.  
  1007. function WinEqualRect(ha   :HAB    ;
  1008.                       prcl1:PRECTL ;
  1009.                       prcl2:PRECTL )return BOOL32;
  1010. pragma Import(c,WinEqualRect, Link_name=>"_WinEqualRect");
  1011.  
  1012. function WinSetRectEmpty(ha  :HAB    ;
  1013.                          prcl:PRECTL )return BOOL32;
  1014. pragma Import(c,WinSetRectEmpty, Link_name=>"_WinSetRectEmpty");
  1015.  
  1016. function WinOffsetRect(ha  :HAB    ;
  1017.                        prcl:PRECTL ;
  1018.                        cx  :LONG   ;
  1019.                        cy  :LONG   )return BOOL32;
  1020. pragma Import(c,WinOffsetRect, Link_name=>"_WinOffsetRect");
  1021.  
  1022. function WinInflateRect(ha  :HAB    ;
  1023.                         prcl:PRECTL ;
  1024.                         cx  :LONG   ;
  1025.                         cy  :LONG   )return BOOL32;
  1026. pragma Import(c,WinInflateRect, Link_name=>"_WinInflateRect");
  1027.  
  1028. function WinPtInRect(ha  :HAB     ;
  1029.                      prcl:PRECTL  ;
  1030.                      pptl:PPOINTL )return BOOL32;
  1031. pragma Import(c,WinPtInRect, Link_name=>"_WinPtInRect");
  1032.  
  1033. function WinIntersectRect(ha      :HAB    ;
  1034.                           prclDst :PRECTL ;
  1035.                           prclSrc1:PRECTL ;
  1036.                           prclSrc2:PRECTL )return BOOL32;
  1037. pragma Import(c,WinIntersectRect, Link_name=>"_WinIntersectRect");
  1038.  
  1039. function WinUnionRect(ha      :HAB    ;
  1040.                       prclDst :PRECTL ;
  1041.                       prclSrc1:PRECTL ;
  1042.                       prclSrc2:PRECTL )return BOOL32;
  1043. pragma Import(c,WinUnionRect, Link_name=>"_WinUnionRect");
  1044.  
  1045. function WinSubtractRect(ha      :HAB    ;
  1046.                          prclDst :PRECTL ;
  1047.                          prclSrc1:PRECTL ;
  1048.                          prclSrc2:PRECTL )return BOOL32;
  1049. pragma Import(c,WinSubtractRect, Link_name=>"_WinSubtractRect");
  1050.  
  1051. function WinMakeRect(ha  :HAB    ;
  1052.                      pwrc:PRECTL )return BOOL32;
  1053. pragma Import(c,WinMakeRect, Link_name=>"_WinMakeRect");
  1054.  
  1055. function WinMakePoints(ha  :HAB     ;
  1056.                        pwpt:PPOINTL ;
  1057.                        cwpt:ULONG   )return BOOL32;
  1058. pragma Import(c,WinMakePoints, Link_name=>"_WinMakePoints");
  1059.  
  1060. --          System values
  1061. --
  1062. function WinQuerySysValue(hwndDesktop:HWND ;
  1063.                           iSysValue  :LONG )return LONG;
  1064. pragma Import(c,WinQuerySysValue, Link_name=>"_WinQuerySysValue");
  1065.  
  1066. function WinSetSysValue(hwndDesktop:HWND ;
  1067.                         iSysValue  :LONG ;
  1068.                         lValue     :LONG )return BOOL32 ;
  1069. pragma Import(c,WinSetSysValue, Link_name=>"_WinSetSysValue");
  1070.  
  1071.  SV_SWAPBUTTON           :constant Ulong:=    0  ;
  1072.  SV_DBLCLKTIME           :constant Ulong:=    1  ;
  1073.  SV_CXDBLCLK             :constant Ulong:=    2  ;
  1074.  SV_CYDBLCLK             :constant Ulong:=    3  ;
  1075.  SV_CXSIZEBORDER         :constant Ulong:=    4  ;
  1076.  SV_CYSIZEBORDER         :constant Ulong:=    5  ;
  1077.  SV_ALARM                :constant Ulong:=    6  ;
  1078.  SV_RESERVEDFIRST1       :constant Ulong:=    7  ;
  1079.  SV_RESERVEDLAST1        :constant Ulong:=    8  ;
  1080.  SV_CURSORRATE           :constant Ulong:=    9  ;
  1081.  SV_FIRSTSCROLLRATE      :constant Ulong:=    10 ;
  1082.  SV_SCROLLRATE           :constant Ulong:=    11 ;
  1083.  SV_NUMBEREDLISTS        :constant Ulong:=    12 ;
  1084.  SV_WARNINGFREQ          :constant Ulong:=    13 ;
  1085.  SV_NOTEFREQ             :constant Ulong:=    14 ;
  1086.  SV_ERRORFREQ            :constant Ulong:=    15 ;
  1087.  SV_WARNINGDURATION      :constant Ulong:=    16 ;
  1088.  SV_NOTEDURATION         :constant Ulong:=    17 ;
  1089.  SV_ERRORDURATION        :constant Ulong:=    18 ;
  1090.  SV_RESERVEDFIRST        :constant Ulong:=    19 ;
  1091.  SV_RESERVEDLAST         :constant Ulong:=    19 ;
  1092.  SV_CXSCREEN             :constant Ulong:=    20 ;
  1093.  SV_CYSCREEN             :constant Ulong:=    21 ;
  1094.  SV_CXVSCROLL            :constant Ulong:=    22 ;
  1095.  SV_CYHSCROLL            :constant Ulong:=    23 ;
  1096.  SV_CYVSCROLLARROW       :constant Ulong:=    24 ;
  1097.  SV_CXHSCROLLARROW       :constant Ulong:=    25 ;
  1098.  SV_CXBORDER             :constant Ulong:=    26 ;
  1099.  SV_CYBORDER             :constant Ulong:=    27 ;
  1100.  SV_CXDLGFRAME           :constant Ulong:=    28 ;
  1101.  SV_CYDLGFRAME           :constant Ulong:=    29 ;
  1102.  SV_CYTITLEBAR           :constant Ulong:=    30 ;
  1103.  SV_CYVSLIDER            :constant Ulong:=    31 ;
  1104.  SV_CXHSLIDER            :constant Ulong:=    32 ;
  1105.  SV_CXMINMAXBUTTON       :constant Ulong:=    33 ;
  1106.  SV_CYMINMAXBUTTON       :constant Ulong:=    34 ;
  1107.  SV_CYMENU               :constant Ulong:=    35 ;
  1108.  SV_CXFULLSCREEN         :constant Ulong:=    36 ;
  1109.  SV_CYFULLSCREEN         :constant Ulong:=    37 ;
  1110.  SV_CXICON               :constant Ulong:=    38 ;
  1111.  SV_CYICON               :constant Ulong:=    39 ;
  1112.  SV_CXPOINTER            :constant Ulong:=    40 ;
  1113.  SV_CYPOINTER            :constant Ulong:=    41 ;
  1114.  SV_DEBUG                :constant Ulong:=    42 ;
  1115.  SV_CMOUSEBUTTONS        :constant Ulong:=    43 ;
  1116.  SV_CPOINTERBUTTONS      :constant Ulong:=    43 ;
  1117.  SV_POINTERLEVEL         :constant Ulong:=    44 ;
  1118.  SV_CURSORLEVEL          :constant Ulong:=    45 ;
  1119.  SV_TRACKRECTLEVEL       :constant Ulong:=    46 ;
  1120.  SV_CTIMERS              :constant Ulong:=    47 ;
  1121.  SV_MOUSEPRESENT         :constant Ulong:=    48 ;
  1122.  SV_CXBYTEALIGN          :constant Ulong:=    49 ;
  1123.  SV_CXALIGN              :constant Ulong:=    49 ;
  1124.  SV_CYBYTEALIGN          :constant Ulong:=    50 ;
  1125.  SV_CYALIGN              :constant Ulong:=    50 ;
  1126.  
  1127. --   The following value enables any greater value to be set by WinSetSysVlaue.
  1128. --   Values of 51-55 are spare for extra non-settable system values
  1129. --   This is to enable the setting of SV_EXTRAKEYBEEP by applications.
  1130. --
  1131.  SV_NOTRESERVED         :constant Ulong:=     56 ;
  1132.  SV_EXTRAKEYBEEP        :constant Ulong:=     57 ;
  1133.  
  1134. --   The following system value controls whether PM controls the keyboard
  1135. --   lights for light key keystrokes ( else applications will)
  1136.  
  1137.  SV_SETLIGHTS           :constant Ulong:=     58 ;
  1138.  SV_INSERTMODE          :constant Ulong:=     59 ;
  1139.  SV_MENUROLLDOWNDELAY   :constant Ulong:=     64 ;
  1140.  SV_MENUROLLUPDELAY     :constant Ulong:=     65 ;
  1141.  SV_ALTMNEMONIC         :constant Ulong:=     66 ;
  1142.  SV_TASKLISTMOUSEACCESS :constant Ulong:=     67 ;
  1143.  SV_CXICONTEXTWIDTH     :constant Ulong:=     68 ;
  1144.  SV_CICONTEXTLINES      :constant Ulong:=     69 ;
  1145.  SV_CHORDTIME           :constant Ulong:=     70 ;
  1146.  SV_CXCHORD             :constant Ulong:=     71 ;
  1147.  SV_CYCHORD             :constant Ulong:=     72 ;
  1148.  SV_CXMOTIONSTART       :constant Ulong:=     73 ;
  1149.  SV_CYMOTIONSTART       :constant Ulong:=     74 ;
  1150.  SV_BEGINDRAG           :constant Ulong:=     75 ;
  1151.  SV_ENDDRAG             :constant Ulong:=     76 ;
  1152.  SV_SINGLESELECT        :constant Ulong:=     77 ;
  1153.  SV_OPEN                :constant Ulong:=     78 ;
  1154.  SV_CONTEXTMENU         :constant Ulong:=     79 ;
  1155.  SV_CONTEXTHELP         :constant Ulong:=     80 ;
  1156.  SV_TEXTEDIT            :constant Ulong:=     81 ;
  1157.  SV_BEGINSELECT         :constant Ulong:=     82 ;
  1158.  SV_ENDSELECT           :constant Ulong:=     83 ;
  1159.  SV_BEGINDRAGKB         :constant Ulong:=     84 ;
  1160.  SV_ENDDRAGKB           :constant Ulong:=     85 ;
  1161.  SV_SELECTKB            :constant Ulong:=     86 ;
  1162.  SV_OPENKB              :constant Ulong:=     87 ;
  1163.  SV_CONTEXTMENUKB       :constant Ulong:=     88 ;
  1164.  SV_CONTEXTHELPKB       :constant Ulong:=     89 ;
  1165.  SV_TEXTEDITKB          :constant Ulong:=     90 ;
  1166.  SV_BEGINSELECTKB       :constant Ulong:=     91 ;
  1167.  SV_ENDSELECTKB         :constant Ulong:=     92 ;
  1168.  SV_ANIMATION           :constant Ulong:=     93 ;
  1169.  SV_ANIMATIONSPEED      :constant Ulong:=     94 ;
  1170.  SV_MONOICONS           :constant Ulong:=     95 ;
  1171.  SV_KBDALTERED          :constant Ulong:=     96 ;
  1172.  SV_PRINTSCREEN         :constant Ulong:=     97 ;
  1173.  SV_CSYSVALUES          :constant Ulong:=     98 ;
  1174.  
  1175. --     Presentation parameter structures.
  1176.  
  1177. type PARAM  is record    -- param
  1178.    id  :ULONG  ;
  1179.    cb  :ULONG  ;
  1180.    ab  :BYTE   ;    --[1];
  1181. end record; -- PARAM;
  1182. type PPARAM  is access all PARAM;
  1183. type NPPARAM  is access all PARAM;
  1184.  
  1185. type PRESPARAMS  is record    -- pres
  1186.    cb      :ULONG ;
  1187.    aparam  :PARAM ;     -- [1];
  1188. end record; -- PRESPARAMS;
  1189. type PPRESPARAMS  is access all PRESPARAMS;
  1190. type NPPRESPARAMS  is access all PRESPARAMS;
  1191.  
  1192. --     --Presentation parameter APIs
  1193.  
  1194.  function WinSetPresParam(hwn    :HWND  ;
  1195.                           id     :ULONG ;
  1196.                           cbParam:ULONG ;
  1197.                           pbParam:PVOID )return BOOL32 ;
  1198. pragma Import(c,WinSetPresParam, Link_name=>"_WinSetPresParam");
  1199.  
  1200. function WinQueryPresParam(hwn  :HWND   ;
  1201.                            id1  :ULONG  ;
  1202.                            id2  :ULONG  ;
  1203.                            pulId:PULONG ;
  1204.                            cbBuf:ULONG  ;
  1205.                            pbBuf:PVOID  ;
  1206.                            fs   :ULONG  )return ULONG;
  1207. pragma Import(c,WinQueryPresParam, Link_name=>"_WinQueryPresParam");
  1208.  
  1209. function WinRemovePresParam(hwn :HWND  ;
  1210.                             id  :ULONG )return BOOL32 ;
  1211. pragma Import(c,WinRemovePresParam, Link_name=>"_WinRemovePresParam");
  1212.  
  1213. --     Presentation parameter types.
  1214.  
  1215.  PP_FOREGROUNDCOLOR                      :constant Ulong:=16#1#;
  1216.  PP_FOREGROUNDCOLORINDEX                 :constant Ulong:=16#2#;
  1217.  PP_BACKGROUNDCOLOR                      :constant Ulong:=16#3#;
  1218.  PP_BACKGROUNDCOLORINDEX                 :constant Ulong:=16#4#;
  1219.  PP_HILITEFOREGROUNDCOLOR                :constant Ulong:=16#5#;
  1220.  PP_HILITEFOREGROUNDCOLORINDEX           :constant Ulong:=16#6#;
  1221.  PP_HILITEBACKGROUNDCOLOR                :constant Ulong:=16#7#;
  1222.  PP_HILITEBACKGROUNDCOLORINDEX           :constant Ulong:=16#8#;
  1223.  PP_DISABLEDFOREGROUNDCOLOR              :constant Ulong:=16#9#;
  1224.  PP_DISABLEDFOREGROUNDCOLORINDEX         :constant Ulong:=16#10#;
  1225.  PP_DISABLEDBACKGROUNDCOLOR              :constant Ulong:=16#11#;
  1226.  PP_DISABLEDBACKGROUNDCOLORINDEX         :constant Ulong:=16#12#;
  1227.  PP_BORDERCOLOR                          :constant Ulong:=16#13#;
  1228.  PP_BORDERCOLORINDEX                     :constant Ulong:=16#14#;
  1229.  PP_FONTNAMESIZE                         :constant Ulong:=16#15#;
  1230.  PP_FONTHANDLE                           :constant Ulong:=16#16#;
  1231.  PP_RESERVED                             :constant Ulong:=16#17#;
  1232.  PP_ACTIVECOLOR                          :constant Ulong:=16#18#;
  1233.  PP_ACTIVECOLORINDEX                     :constant Ulong:=16#19#;
  1234.  PP_INACTIVECOLOR                        :constant Ulong:=16#20#;
  1235.  PP_INACTIVECOLORINDEX                   :constant Ulong:=16#21#;
  1236.  PP_ACTIVETEXTFGNDCOLOR                  :constant Ulong:=16#22#;
  1237.  PP_ACTIVETEXTFGNDCOLORINDEX             :constant Ulong:=16#23#;
  1238.  PP_ACTIVETEXTBGNDCOLOR                  :constant Ulong:=16#24#;
  1239.  PP_ACTIVETEXTBGNDCOLORINDEX             :constant Ulong:=16#25#;
  1240.  PP_INACTIVETEXTFGNDCOLOR                :constant Ulong:=16#26#;
  1241.  PP_INACTIVETEXTFGNDCOLORINDEX           :constant Ulong:=16#27#;
  1242.  PP_INACTIVETEXTBGNDCOLOR                :constant Ulong:=16#28#;
  1243.  PP_INACTIVETEXTBGNDCOLORINDEX           :constant Ulong:=16#29#;
  1244.  PP_SHADOW                               :constant Ulong:=16#30#;
  1245.  PP_MENUFOREGROUNDCOLOR                  :constant Ulong:=16#31#;
  1246.  PP_MENUFOREGROUNDCOLORINDEX             :constant Ulong:=16#32#;
  1247.  PP_MENUBACKGROUNDCOLOR                  :constant Ulong:=16#33#;
  1248.  PP_MENUBACKGROUNDCOLORINDEX             :constant Ulong:=16#34#;
  1249.  PP_MENUHILITEFGNDCOLOR                  :constant Ulong:=16#35#;
  1250.  PP_MENUHILITEFGNDCOLORINDEX             :constant Ulong:=16#36#;
  1251.  PP_MENUHILITEBGNDCOLOR                  :constant Ulong:=16#37#;
  1252.  PP_MENUHILITEBGNDCOLORINDEX             :constant Ulong:=16#38#;
  1253.  PP_MENUDISABLEDFGNDCOLOR                :constant Ulong:=16#39#;
  1254.  PP_MENUDISABLEDFGNDCOLORINDEX           :constant Ulong:=16#40#;
  1255.  PP_MENUDISABLEDBGNDCOLOR                :constant Ulong:=16#41#;
  1256.  PP_MENUDISABLEDBGNDCOLORINDEX           :constant Ulong:=16#42#;
  1257.  PP_USER                                 :constant Ulong:=16#8000#;
  1258.  
  1259. --     Flags for WinQueryPresParams( )
  1260.  
  1261.  QPF_NOINHERIT        :constant Ulong:=16#0001#; -- Don't inherit
  1262.  QPF_ID1COLORINDEX    :constant Ulong:=16#0002#; -- Convert id1 color index into RGB
  1263.  QPF_ID2COLORINDEX    :constant Ulong:=16#0004#; -- Convert id2 color index into RGB
  1264.  QPF_PURERGBCOLOR     :constant Ulong:=16#0008#; -- Return pure RGB colors
  1265.  QPF_VALIDFLAGS       :constant Ulong:=16#000F#; -- Valid WinQueryPresParams( ) flags.
  1266. end Os2.PMsc;
  1267.