-- CONSTANTS FOR MYAPI32 --
-- Definitionen der WM_ Messages
-- convertiert aus den BCC55 includes
-- 29.07.2007


without warning
function or_all(sequence s)
-- or together all elements of a sequence
    atom result
    
    result = 0
    for i = 1 to length(s) do
        result = or_bits(result, s[i])
    end for
    return result
end function

-- for AddFontResourceEx
global constant FR_PRIVATE=16
global constant FR_NOT_ENUM=32

-- GDI+ Status-Codes
global enum OK = 0,
    GenericError = 1,
    InvalidParameter = 2,
    OutOfMemory = 3,
    ObjectBusy = 4,
    InsufficientBuffer = 5,
    NotImplemented = 6,
    Win32Error = 7,
    WrongState = 8,
    Aborted = 9,
    FileNotFound = 10,
    ValueOverflow = 11,
    AccessDenied = 12,
    UnknownImageFormat = 13,
    FontFamilyNotFound = 14,
    FontStyleNotFound = 15,
    NotTrueTypeFont = 16,
    UnsupportedGdiplusVersion = 17,
    GdiplusNotInitialized = 18,
    PropertyNotFound = 19,
    PropertyNotSupported = 20,
    ProfileNotFound = 21


-- TabControls
global constant
TCIF_TEXT     =      #1,
TCIF_IMAGE     =     #2,
TCIF_RTLREADING =    #4,
TCIF_PARAM      =    #8,
TCIF_STATE      =    #10,
TCIF_BUTTONPRESSED = #1,
TCIF_HIGHLIGHTED   = #2


-- TCM = TabControlMessages
global constant TCM_FIRST = #1300,  
 TCM_GETIMAGELIST =           (TCM_FIRST + 2),
 TCM_SETIMAGELIST  =          (TCM_FIRST + 3),
 TCM_GETITEMCOUNT   =         (TCM_FIRST + 4),
 TCM_GETITEMA        =        (TCM_FIRST + 5),
 TCM_SETITEMA        =        (TCM_FIRST + 6),
 TCM_INSERTITEMA     =        (TCM_FIRST + 7),
 TCM_DELETEITEM      =        (TCM_FIRST + 8),
 TCM_DELETEALLITEMS  =        (TCM_FIRST + 9),
 TCM_GETITEMRECT     =        (TCM_FIRST + 10),
 TCM_GETCURSEL       =        (TCM_FIRST + 11),
 TCM_SETCURSEL       =        (TCM_FIRST + 12),
 TCM_HITTEST         =        (TCM_FIRST + 13),
 TCM_SETITEMEXTRA    =        (TCM_FIRST + 14),
 TCM_ADJUSTRECT      =        (TCM_FIRST + 40),
 TCM_SETITEMSIZE     =        (TCM_FIRST + 41),
 TCM_REMOVEIMAGE     =        (TCM_FIRST + 42),
 TCM_SETPADDING      =        (TCM_FIRST + 43),
 TCM_GETROWCOUNT     =        (TCM_FIRST + 44),
 TCM_GETTOOLTIPS     =        (TCM_FIRST + 45),
 TCM_SETTOOLTIPS     =        (TCM_FIRST + 46),
 TCM_GETCURFOCUS     =        (TCM_FIRST + 47),
 TCM_SETCURFOCUS     =        (TCM_FIRST + 48),
 TCM_SETMINTABWIDTH  =    (TCM_FIRST + 49),
 TCM_DESELECTALL     =    (TCM_FIRST + 50),
 TCM_HIGHLIGHTITEM   =    (TCM_FIRST + 51),
 TCM_SETEXTENDEDSTYLE =   (TCM_FIRST + 52),
 TCM_GETEXTENDEDSTYLE =   (TCM_FIRST + 53),
 TCM_GETITEMW         =       (TCM_FIRST + 60),
 TCM_SETITEMW         =       (TCM_FIRST + 61),
 TCM_INSERTITEMW      =       (TCM_FIRST + 62),
 -- TCM_SETUNICODEFORMAT =   CCM_SETUNICODEFORMAT,
 -- TCM_GETUNICODEFORMAT =   CCM_GETUNICODEFORMAT,
 -- TCM_GETITEM          =   TCM_GETITEMW,
 -- TCM_SETITEM          =   TCM_SETITEMW,
 -- TCM_INSERTITEM       =   TCM_INSERTITEMW,
 TCM_GETITEM          =   TCM_GETITEMA,
 TCM_SETITEM          =   TCM_SETITEMA,
 TCM_INSERTITEM       =   TCM_INSERTITEMA

-- TCN = TabControlNotifications
global constant TCN_FIRST= 0 - 550,
	 TCN_KEYDOWN = TCN_FIRST,
	 TCN_SELCHANGE = TCN_FIRST - 1,
	 TCN_SELCHANGING = TCN_FIRST -2,
	 TCN_GETOBJECT = TCN_FIRST -3,
	 TCN_FOCUSCHANGE = TCN_FIRST - 4
	 
-- TCS = TabControlStyles
global constant	
TCS_SCROLLOPPOSITE = #1,
TCS_BOTTOM         = #2,
TCS_RIGHT          = #2,
TCS_MULTISELECT    = #4,
TCS_FLATBUTTONS    = #8,
TCS_FORCEICONLEFT  = #10,
TCS_FORCELABELLEFT = #20,
TCS_HOTTRACK       = #40,
TCS_VERTICAL       = #80,
TCS_TABS           = #0,
TCS_BUTTONS        = #100,
TCS_SINGLELINE     = #0,
TCS_MULTILINE      = #200,
TCS_RIGHTJUSTIFY   = #0,
TCS_FIXEDWIDTH     = #400,
TCS_RAGGEDRIGHT    = #800,
TCS_FOCUSONBUTTONDOWN = #1000,
TCS_OWNERDRAWFIXED    = #2000,
TCS_TOOLTIPS          = #4000,
TCS_FOCUSNEVER        = #8000,
TCS_EX_FLATSEPARATORS = #1,
TCS_EX_REGISTERDROP   = #2

global atom WM_USER      =  #0400 -- needed often, so this at the beginning of the file
global atom MAX_PATH     = 260

/* MM_MCINOTIFY flags */
global constant 
MM_MCINOTIFY          = #03B9,
MCI_NOTIFY_SUCCESSFUL = #0001,
MCI_NOTIFY_SUPERSEDED = #0002,
MCI_NOTIFY_ABORTED    = #0004,
MCI_NOTIFY_FAILURE    = #0008

-- Use with RichEdit and SynColoring
global constant FR_DOWN=1,
         FR_WHOLEWORD=2,
         FR_MATCHCASE=4,
         SCF_WORD=2,
         SCF_SELECTION=1,
         SCF_ALL = 4,
         CFM_COLOR= #40000000

--Commonctrl Classes

-- Common control shared messages

global constant CCM_FIRST = #2000,
                CCM_LAST  = CCM_FIRST+#200

global constant TOOLTIPS_CLASS="tooltips_class32",
                RICHEDIT_CLASS="RichEdit20A",
                MSFTEDIT_CLASS="RICHEDIT50W",
                STATUSCLASSNAME="msctls_statusbar32",
                PROGRESS_CLASS="msctls_progress32",
                WC_COMBOBOXEX="ComboBoxEx32",
                WC_COMBOBOX="ComboBox",
                WC_LISTVIEW="SysListView32",
                TRACKBAR_CLASS="msctls_trackbar32",
		MONTHCAL_CLASS = "SysMonthCal32",
		WC_TABCONTROL="SysTabControl32",
		REBARCLASSNAME = "ReBarWindow32",
		TOOLBARCLASSNAME = "ToolbarWindow32"

--================= TrackBar ==================================================

global constant    TBS_HORZ            = 0,
    TBS_VERT            = 2,
    TBS_AUTOTICKS       = 1,
    TBS_NOTICKS         = #10,
    TBS_TOP             = 4,
    TBS_BOTTOM          = 0,
    TBS_LEFT            = 4,
    TBS_RIGHT           = 0,
    TBS_BOTH            = 8,
    TBS_ENABLESELRANGE  = #20,
    TBS_FIXEDLENGTH     = #40,
    TBS_NOTHUMB         = #80,
    -- notifications
    TB_BOTTOM           = 7,
    TB_ENDTRACK         = 8,
    TB_LINEDOWN         = 1,
    TB_LINEUP           = 0,
    TB_PAGEDOWN         = 3,
    TB_PAGEUP           = 2,
    TB_THUMBPOSITION    = 4,
    TB_THUMBTRACK       = 5,
    TB_TOP              = 6,
    -- messages
    TBM_CLEARSEL        = 1043,
    TBM_CLEARTICS       = 1033,
    TBM_GETCHANNELRECT  = 1050,
    TBM_GETLINESIZE     = 1048,
    TBM_GETNUMTICS      = 1040,
    TBM_GETPAGESIZE     = 1046,
    TBM_GETPOS          = 1024,
    TBM_GETPTICS        = 1038,
    TBM_GETRANGEMAX     = 1026,
    TBM_GETRANGEMIN     = 1025,
    TBM_GETSELEND       = 1042,
    TBM_GETSELSTART     = 1041,
    TBM_GETTHUMBLENGTH  = 1052,
    TBM_GETTHUMBRECT    = 1049,
    TBM_GETTIC          = 1027,
    TBM_GETTICPOS       = 1039,
    TBM_SETLINESIZE     = 1047,
    TBM_SETPAGESIZE     = 1045,
    TBM_SETPOS          = 1029,
    TBM_SETRANGE        = 1030,
    TBM_SETRANGEMAX     = 1032,
    TBM_SETRANGEMIN     = 1031,
    TBM_SETSEL          = 1034,
    TBM_SETSELEND       = 1036,
    TBM_SETSELSTART     = 1035,
    TBM_SETTHUMBLENGTH  = 1051,
    TBM_SETTIC          = 1028,
    TBM_SETTICFREQ      = 1044


--================= ListView ==================================================
global constant  LVM_ARRANGE = 4118,
  LVM_FIRST = #1000,
  LVM_SETSELECTIONMARK = LVM_FIRST+67,
  LVM_SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST+54,
  LVM_GETHOTITEM = LVM_FIRST + 61,
  LVM_GETSELECTIONMARK = LVM_FIRST +66,
  LVM_CREATEDRAGIMAGE = 4129,
  LVM_DELETEALLITEMS = 4105,
  LVM_DELETECOLUMN = 4124,
  LVM_DELETEITEM = 4104,
  LVM_ENSUREVISIBLE = 4115,
  LVM_GETBKCOLOR = 4096,
  LVM_GETCALLBACKMASK = 4106,
  LVM_GETCOLUMNWIDTH = 4125,
  LVM_GETCOUNTPERPAGE = 4136,
  LVM_GETEDITCONTROL = 4120,
  LVM_GETIMAGELIST = 4098,
  LVM_EDITLABELW = 4214,
  LVM_FINDITEMW = 4179,
  LVM_GETCOLUMNW = 4191,
  LVM_GETISEARCHSTRINGW = 4213,
  LVM_GETITEMW = 4171,
  LVM_GETITEMTEXTW = 4211,
  LVM_GETSTRINGWIDTHW = 4183,
  LVM_INSERTCOLUMNW = 4193,
  LVM_INSERTITEMW = 4173,
  LVM_SETCOLUMNW = 4192,
  LVM_SETITEMW = 4172,
  LVM_SETITEMTEXTW = 4212,
  LVM_EDITLABELA = 4119,
  LVM_FINDITEMA = 4109,
  LVM_GETCOLUMNA = 4121,
  LVM_GETISEARCHSTRINGA = 4148,
  LVM_GETITEMA = 4101,
  LVM_GETITEMTEXTA = 4141,
  LVM_GETSTRINGWIDTHA = 4113,
  LVM_INSERTCOLUMNA = 4123,
  LVM_INSERTITEMA = 4103,
  LVM_SETCOLUMNA = 4122,
  LVM_SETITEMA = 4102,
  LVM_SETITEMTEXTA = 4142,
  LVM_GETITEMCOUNT = 4100,
  LVM_GETITEMPOSITION = 4112,
  LVM_GETITEMRECT = 4110,
  LVM_GETITEMSPACING = 4147,
  LVM_GETITEMSTATE = 4140,
  LVM_GETNEXTITEM = 4108,
  LVM_GETORIGIN = 4137,
  LVM_GETSELECTEDCOUNT = 4146,
  LVM_GETTEXTBKCOLOR = 4133,
  LVM_GETTEXTCOLOR = 4131,
  LVM_GETTOPINDEX = 4135,
  LVM_GETVIEWRECT = 4130,
  LVM_HITTEST = 4114,
  LVM_REDRAWITEMS = 4117,
  LVM_SCROLL = 4116,
  LVM_SETBKCOLOR = 4097,
  LVM_SETCALLBACKMASK = 4107,
  LVM_SETCOLUMNWIDTH = 4126,
  LVM_SETIMAGELIST = 4099,
  LVM_SETITEMCOUNT = 4143,
  LVM_SETITEMPOSITION = 4111,
  LVM_SETITEMPOSITION32 = 4145,
  LVM_SETITEMSTATE = 4139,
  LVM_SETTEXTBKCOLOR = 4134,
  LVM_SETTEXTCOLOR = 4132,
  LVM_SORTITEMS = 4144,
  LVM_UPDATE = 4138,
  LVN_BEGINDRAG = -109,
  LVN_BEGINRDRAG = -111,
  LVN_COLUMNCLICK = -108,
  LVN_DELETEALLITEMS = -104,
  LVN_DELETEITEM = -103,
  LVN_BEGINLABELEDITW = -175,
  LVN_ENDLABELEDITW = -176,
  LVN_GETDISPINFOW = -177,
  LVN_SETDISPINFOW = -178,
  LVN_BEGINLABELEDITA = -105,
  LVN_ENDLABELEDITA = -106,
  LVN_GETDISPINFOA = -150,
  LVN_SETDISPINFOA = -151,
  LVN_INSERTITEM = -102,
  LVN_ITEMCHANGED = -101,
  LVN_ITEMCHANGING = -100,
  LVN_KEYDOWN = -155,
  DONT_RESOLVE_DLL_REFERENCES = 1,
  EMR_SETPIXELV = 15,
  LVS_ALIGNLEFT = 2048,
  LVS_ALIGNTOP = 0,
  LVS_AUTOARRANGE = 256,
  LVS_EDITLABELS = 512,
  LVS_ICON = 0,
  LVS_LIST = 3,
  LVS_NOCOLUMNHEADER = 16384,
  LVS_NOLABELWRAP = 128,
  LVS_NOSCROLL = 8192,
  LVS_NOSORTHEADER = 32768,
  LVS_OWNERDRAWFIXED = 1024,
  LVS_REPORT = 1,
  LVS_SHAREIMAGELISTS = 64,
  LVS_SHOWSELALWAYS = 8,
  LVS_SINGLESEL = 4,
  LVS_SMALLICON = 2,
  LVS_SORTASCENDING = 16,
  LVS_SORTDESCENDING = 32,
  LVS_TYPESTYLEMASK = 64512,
  LVS_TYPEMASK = 3,
  LVS_ALIGNMASK =  #C00,
  LVSIL_NORMAL = 0,
  LVSIL_SMALL = 1,
  LVSIL_STATE = 2,
  LVIS_CUT = 4,
  LVIS_DROPHILITED = 8,
  LVIS_FOCUSED = 1,
  LVIS_SELECTED = 2,
  LVIS_OVERLAYMASK = 3840,
  LVIS_STATEIMAGEMASK = 61440,
  LVIF_TEXT = 1,
  LVIF_IMAGE = 2,
  LVIF_PARAM = 4,
  LVIF_STATE = 8,
  LVIF_DI_SETITEM = 4096,
  LVNI_ABOVE = 256,
  LVNI_ALL = 0,
  LVNI_BELOW = 512,
  LVNI_TOLEFT = 1024,
  LVNI_TORIGHT = 2048,
  LVNI_CUT = 4,
  LVNI_DROPHILITED = 8,
  LVNI_FOCUSED = 1,
  LVNI_SELECTED = 2,
  LVFI_PARAM = 1,
  LVFI_PARTIAL = 8,
  LVFI_STRING = 2,
  LVFI_WRAP = 32,
  LVFI_NEARESTXY = 64,
  LVHT_ABOVE = 8,
  LVHT_BELOW = 16,
  LVHT_NOWHERE = 1,
  LVHT_ONITEMICON = 2,
  LVHT_ONITEMLABEL = 4,
  LVHT_ONITEMSTATEICON = 8,
  LVHT_TOLEFT = 64,
  LVHT_TORIGHT = 32,
  LVCF_FMT = 1,
  LVCF_SUBITEM = 8,
  LVCF_TEXT = 4,
  LVCF_WIDTH = 2,
  LVCFMT_CENTER = 2,
  LVCFMT_LEFT = 0,
  LVCFMT_RIGHT = 1,
  LVIR_BOUNDS = 0,
  LVIR_ICON = 1,
  LVIR_LABEL = 2,
  LVIR_SELECTBOUNDS = 3,
  LVA_ALIGNLEFT = 1,
  LVA_ALIGNTOP = 2,
  LVA_DEFAULT = 0,
  LVA_SNAPTOGRID = 5,
  LVSCW_AUTOSIZE = -1,
  LVSCW_AUTOSIZE_USEHEADER = -2,
  LVS_EX_FULLROWSELECT = 32,
  LVS_EX_GRIDLINES = 1,
  LVS_EX_AUTOSIZECOLUMNS = #10000000,
  LVS_EX_ONECLICKACTIVATE =#40,
  LVS_EX_DOUBLEBUFFER = #10000

--================= MENUE =====================================================
--/* Menu flags */
global constant MF_INSERT   =       #00000000,
 MF_CHANGE          =  #00000080,
 MF_APPEND          =  #00000100,
 MF_DELETE          =  #00000200,
 MF_REMOVE          =  #00001000,
 MF_BYCOMMAND       =  #00000000,
 MF_BYPOSITION      =  #00000400,
 MF_SEPARATOR       =  #00000800,
 MF_ENABLED         =  #00000000,
 MF_GRAYED          =  #00000001,
 MF_DISABLED        =  #00000002,
 MF_UNCHECKED       =  #00000000,
 MF_CHECKED         =  #00000008,
 MF_USECHECKBITMAPS =  #00000200,
 MF_STRING          =  #00000000,
 MF_BITMAP          =  #00000004,
 MF_OWNERDRAW       =  #00000100,
 MF_POPUP           =  #00000010,
 MF_MENUBARBREAK    =  #00000020,
 MF_MENUBREAK       =  #00000040,
 MF_UNHILITE        =  #00000000,
 MF_HILITE          =  #00000080,
--#if (WINVER >= 0x0400)
     MF_DEFAULT     =  #00001000,
--#endif
 MF_SYSMENU         =  #00002000,
 MF_HELP            =  #00004000,
--#if (WINVER >= 0x0400)
     MF_RIGHTJUSTIFY =  #00004000,
--#endif
 MF_MOUSESELECT     =  #00008000,
--#if (WINVER >= 0x0400)
     MF_END         =  #00000080,
--#endif

--/* Menu types */
--#if (WINVER >= 0x0400)
     MFT_STRING     =   MF_STRING,
     MFT_BITMAP     =   MF_BITMAP,
     MFT_MENUBARBREAK = MF_MENUBARBREAK,
     MFT_MENUBREAK   =  MF_MENUBREAK,
     MFT_OWNERDRAW  =   MF_OWNERDRAW,
     MFT_RADIOCHECK =   #00000200,
     MFT_SEPARATOR  =   MF_SEPARATOR,
     MFT_RIGHTORDER =   #00002000,
     MFT_RIGHTJUSTIFY = MF_RIGHTJUSTIFY,
--#endif

--/* Menu states */
--#if (WINVER >= 0x0400)
     MFS_GRAYED     =  #00000003,
     MFS_DISABLED = MFS_GRAYED,
     MFS_CHECKED =  MF_CHECKED,
     MFS_HILITE =   MF_HILITE,
     MFS_ENABLED =  MF_ENABLED,
     MFS_UNCHECKED =MF_UNCHECKED,
     MFS_UNHILITE = MF_UNHILITE,
     MFS_DEFAULT  = MF_DEFAULT
--#endif

--/* Special values used in menu resources */
-- MF_END   =  #00000080

--================= MENUE =====================================================

--====== COMBOBOX CONTROL =====================================================
--====== COMBOBOX CONTROL =====================================================
global constant CBEM_INSERTITEM         = (WM_USER + 1),
    CBEM_SETIMAGELIST       = (WM_USER + 2),
    CBEM_GETIMAGELIST       = (WM_USER + 3),
    CBEM_GETITEM            = (WM_USER + 4),
    CBEM_SETITEM            = (WM_USER + 5),
    CBEM_DELETEITEM         =  #0144,           --CB_DELETESTRING
    CBEM_GETCOMBOCONTROL    = (WM_USER + 6),
    CBEM_GETEDITCONTROL     = (WM_USER + 7),
    CBEM_SETEXSTYLE         = (WM_USER + 8),
    CBEM_SETEXTENDEDSTYLE   = (WM_USER + 14),
    CBEM_GETEXSTYLE         = (WM_USER + 9),
    CBEM_GETEXTENDEDSTYLE   = (WM_USER + 9),
    CBEM_HASEDITCHANGED     = (WM_USER + 10),
    CBEM_INSERTITEMW        = (WM_USER + 11),
    CBEM_SETITEMW           = (WM_USER + 12),
    CBEM_GETITEMW           = (WM_USER + 13),
    CBES_EX_NOEDITIMAGE          = #00000001,
    CBES_EX_NOEDITIMAGEINDENT    = #00000002,
    CBES_EX_PATHWORDBREAKPROC    = #00000004,
    CBES_EX_NOSIZELIMIT          = #00000008,
    CBES_EX_CASESENSITIVE        = #00000010,
    CBEIF_TEXT              = #00000001,
    CBEIF_IMAGE             = #00000002,
    CBEIF_SELECTEDIMAGE     = #00000004,
    CBEIF_OVERLAY           = #00000008,
    CBEIF_INDENT            = #00000010,
    CBEIF_LPARAM            = #00000020,
    CBEIF_DI_SETITEM        = #10000000
    
--/* Combo box control message return values */
 global constant CB_OKAY =  0,
 CB_ERR  =  (-1),
 CB_ERRSPACE =(-2),

--/* Combo box control notification codes */
 CBN_ERRSPACE   =   (-1),
 CBN_SELCHANGE  =   1,
 CBN_DBLCLK     =   2,
 CBN_SETFOCUS   =   3,
 CBN_KILLFOCUS  =   4,
 CBN_EDITCHANGE =   5,
 CBN_EDITUPDATE =   6,
 CBN_DROPDOWN   =   7,
 CBN_CLOSEUP    =   8,
 CBN_SELENDOK   =   9,
 CBN_SELENDCANCEL = 10,

--/* Combo box control styles */
 CBS_SIMPLE             = #0001,
 CBS_DROPDOWN           = #0002,
 CBS_DROPDOWNLIST       = #0003,
 CBS_OWNERDRAWFIXED     = #0010,
 CBS_OWNERDRAWVARIABE   = #0020,
 CBS_AUTOHSCROLL        = #0040,
 CBS_OEMCONVERT         = #0080,
 CBS_SORT               = #0100,
 CBS_HASSTRINGS         = #0200,
 CBS_NOINTEGRALHEIGHT   = #0400,
 CBS_DISABLENOSCROLL    = #0800,
--#if (WINVER >= 0x0400)
 CBS_UPPERCASE      = #2000,
 CBS_LOWERCASE      = #4000,
--#endif

--/* Combo box control messages */
 CB_GETEDITSEL              = #0140,
 CB_LIMITTEXT               = #0141,
 CB_SETEDITSEL              = #0142,
 CB_ADDSTRING               = #0143,
 CB_DELETESTRING            = #0144,
 CB_DIR                     = #0145,
 CB_GETCOUNT                = #0146,
 CB_GETCURSEL               = #0147,
 CB_GETLBTEXT               = #0148,
 CB_GETLBTEXTLEN            = #0149,
 CB_INSERTSTRING            = #014A,
 CB_RESETCONTENT            = #014B,
 CB_FINDSTRING              = #014C,
 CB_SELECTSTRING            = #014D,
 CB_SETCURSEL               = #014E,
 CB_SHOWDROPDOWN            = #014F,
 CB_GETITEMDATA             = #0150,
 CB_SETITEMDATA             = #0151,
 CB_GETDROPPEDCONTROLRECT   = #0152,
 CB_SETITEMHEIGHT           = #0153,
 CB_GETITEMHEIGHT           = #0154,
 CB_SETEXTENDEDUI           = #0155,
 CB_GETEXTENDEDUI           = #0156,
 CB_GETDROPPEDSTATE         = #0157,
 CB_FINDSTRINGEXACT         = #0158,
 CB_SETLOCALE               = #0159,
 CB_GETLOCALE               = #015A,
--#if (WINVER >= 0x0400)
     CB_GETTOPINDEX         = #015B,
     CB_SETTOPINDEX         = #015C,
     CB_GETHORIZONTALEXTENT = #015D,
     CB_SETHORIZONTALEXTENT = #015E,
     CB_GETDROPPEDWIDTH     = #015F,
     CB_SETDROPPEDWIDTH     = #0160,
     CB_INITSTORAGE         = #0161,
--#endif
--#if (_WIN32_WINNT >= 0x0501)
     CB_GETCOMBOBOXINFO     = #0164,
     CB_MSGMAX              = #0165,
     CB_SETMINVISIBLE       = #1701
--#elif (WINVER >= 0x0400)
--   CB_MSGMAX              = #0162,
--#else
--   CB_MSGMAX              = #015B,
--#endif

--====== COMBOBOX CONTROL =====================================================

--====== PROGRESS CONTROL =====================================================

global constant PBS_SMOOTH  =           #01,
PBS_VERTICAL    =       #04,
PBM_SETRANGE    =       (WM_USER+1),
PBM_SETPOS      =       (WM_USER+2),
PBM_DELTAPOS    =       (WM_USER+3),
PBM_SETSTEP     =       (WM_USER+4),
PBM_STEPIT      =       (WM_USER+5),
PBM_SETRANGE32  =       (WM_USER+6),    -- lParam = high, wParam = low
PBM_GETRANGE    =       (WM_USER+7),    -- wParam = return (TRUE ? low : high). lParam = PPBRANGE or NULL
PBM_GETPOS      =       (WM_USER+8),
PBM_SETBARCOLOR =       (WM_USER+9),    -- lParam = bar color
PBM_SETBKCOLOR  =       CCM_FIRST+1,    -- lParam = bkColor

--#if (_WIN32_WINNT >= 0x0501)
PBS_MARQUEE     =       #08,
PBM_SETMARQUEE  =       (WM_USER+10),
--#endif        // _WIN32_WINNT >= 0x0501


--#if _WIN32_WINNT >= 0x0600
PBS_SMOOTHREVERSE   =   #10,
PBM_GETSTEP         =   (WM_USER+13),
PBM_GETBKCOLOR      =   (WM_USER+14),
PBM_GETBARCOLOR     =   (WM_USER+15),
PBM_SETSTATE        =   (WM_USER+16),  --wParam = PBST_[State] (NORMAL, ERROR, PAUSED)
PBM_GETSTATE        =   (WM_USER+17),
PBST_NORMAL         =   #0001,
PBST_ERROR          =   #0002,
PBST_PAUSED         =   #0003
--#endif        // _WIN32_WINNT >= 0x0600



--====== STATUS BAR CONTROL ===================================================

global atom SBARS_SIZEGRIP          = #0100,
SBARS_TOOLTIPS          = #0800,
-- this is a status bar flag, preference to SBARS_TOOLTIPS
SBT_TOOLTIPS            = #0800,
SB_SETTEXTA     =       WM_USER + 1,
SB_SETTEXTW     =       WM_USER + 11,
SB_GETTEXTA     =       WM_USER + 2,
SB_GETTEXTW     =       WM_USER + 13,
SB_GETTEXTLENGTHA   =   WM_USER + 3,
SB_GETTEXTLENGTHW   =   WM_USER + 12,
SB_SETTIPTEXTA  =       WM_USER + 16,
SB_SETTIPTEXTW  =       WM_USER + 17,
SB_GETTIPTEXTA  =       WM_USER + 18,
SB_GETTIPTEXTW  =       WM_USER + 19,
SB_GETICON      =       WM_USER + 20,
SB_SETPARTS         =   WM_USER + 4,
SB_GETPARTS         =   WM_USER + 6,
SB_GETBORDERS       =   WM_USER + 7,
SB_SETMINHEIGHT     =   WM_USER + 8,
SB_SIMPLE           =   WM_USER + 9,
SB_GETRECT          =   WM_USER + 10,
SB_ISSIMPLE         =   WM_USER + 14,
SB_SETICON      =       WM_USER + 15,
SB_GETTEXT          =   SB_GETTEXTA,
SB_SETTEXT          =   SB_SETTEXTA,
SB_GETTEXTLENGTH    =   SB_GETTEXTLENGTHA,
SB_SETTIPTEXT       =   SB_SETTIPTEXTA,
SB_GETTIPTEXT       =   SB_GETTIPTEXTA,

SBT_OWNERDRAW            = #1000,
SBT_NOBORDERS            = #0100,
SBT_POPOUT               = #0200,
SBT_RTLREADING           = #0400,
SBT_NOTABPARSING         = #0800,
SB_SETBKCOLOR       =   #2001,      -- lParam = bkColor
-- refers to the data saved for simple mode
SB_SIMPLEID  = #00ff
--====== STATUS BAR CONTROL ===================================================


-- GetDeviceCaps
/* GetDeviceCaps() indices */
global constant DRIVERVERSION   =   0,
 TECHNOLOGY     =   2,
 HORZSIZE       =   4,
 VERTSIZE       =   6,
 HORZRES        =   8,
 VERTRES        =   10,
 BITSPIXEL      =   12,
 PLANES         =   14,
 NUMBRUSHES     =   16,
 NUMPENS        =   18,
 NUMMARKERS     =   20,
 NUMFONTS       =   22,
 NUMCOLORS      =   24,
 PDEVICESIZE    =   26,
 CURVECAPS      =   28,
 LINECAPS       =   30,
 POLYGONALCAPS  =   32,
 TEXTCAPS       =   34,
 CLIPCAPS       =   36,
 RASTERCAPS     =   38,
 ASPECTX        =   40,
 ASPECTY        =   42,
 ASPECTXY       =   44,
 LOGPIXELSX     =   88,
 LOGPIXELSY     =   90,
 SIZEPALETTE    =   104,
 NUMRESERVED    =   106,
 COLORRES       =   108,
 PHYSICALWIDTH  =   110,
 PHYSICALHEIGHT =   111,
 PHYSICALOFFSETX =  112,
 PHYSICALOFFSETY =  113,
 SCALINGFACTORX =   114,
 SCALINGFACTORY =   115,
 VREFRESH       =   116,
 DESKTOPVERTRES =   117,
 DESKTOPHORZRES =   118,
 BLTALIGNMENT   =   119,
 SHADEBLENDCAPS =120,
 COLORMGMTCAPS  =121

-- SystemMetrics
global constant SM_CYCAPTION=4,
                SM_CYBORDER=6,
                SM_CXBORDER=5,
                SM_CXEDGE=45,
                SM_CYSCREEN=1,
                SM_CXSCREEN=0
                
/* PrintDlg() flags */
global constant PD_ALLPAGES     =   #00000000,
PD_SELECTION                =   #00000001,
PD_PAGENUMS                     =  #00000002,
PD_NOSELECTION                  =  #00000004,
PD_NOPAGENUMS                   =  #00000008,
PD_COLLATE                      =  #00000010,
PD_PRINTTOFILE                  =  #00000020,
PD_PRINTSETUP                   =  #00000040,
PD_NOWARNING                    =  #00000080,
PD_RETURNDC                     =  #00000100,
PD_RETURNIC                     =  #00000200,
PD_RETURNDEFAULT                =  #00000400,
PD_SHOWHELP                     =  #00000800,
PD_ENABLEPRINTHOOK              =  #00001000,
PD_ENABLESETUPHOOK              =  #00002000,
PD_ENABLEPRINTTEMPLATE          =  #00004000,
PD_ENABLESETUPTEMPLATE          =  #00008000,
PD_ENABLEPRINTTEMPLATEHANDLE    =  #00010000,
PD_ENABLESETUPTEMPLATEHANDLE    =  #00020000,
PD_USEDEVMODECOPIES             =  #00040000,
PD_DISABLEPRINTTOFILE           =  #00080000,
PD_HIDEPRINTTOFILE              =  #00100000,
PD_NONETWORKBUTTON              =  #00200000                

--AnimateWindow
global constant AW_ACTIVATE =#00020000,
                AW_BLEND    =#00080000,
                AW_CENTER   =#00000010,
                AW_HIDE     =#00010000,
                AW_HOR_POSITIVE=#00000001,
                AW_HOR_NEGATIVE=#00000002,
                AW_SLIDE    =#00040000,
                AW_VER_POSITIVE=#00000004,
                AW_VER_NEGATIVE=#00000008
global constant 
--File winuser.h:
 WS_OVERLAPPED       =  #00000000,
 WS_POPUP            =  #80000000,
 WS_CHILD            =  #40000000,
 WS_MINIMIZE         =  #20000000,
 WS_VISIBLE          =  #10000000,
 WS_DISABLED         =  #08000000,
 WS_CLIPSIBLINGS     =  #04000000,
 WS_CLIPCHILDREN     =  #02000000,
 WS_MAXIMIZE         =  #01000000,
 WS_CAPTION          =  #00C00000 ,   -- WS_BORDER | WS_DLGFRAME  */
 WS_BORDER           =  #00800000,
 WS_DLGFRAME         =  #00400000,
 WS_VSCROLL          =  #00200000,
 WS_HSCROLL          =  #00100000,
 WS_SYSMENU          =  #00080000,
 WS_THICKFRAME       =  #00040000,
 WS_GROUP            =  #00020000,
 WS_TABSTOP          =  #00010000,
 WS_MINIMIZEBOX      =  #00020000,
 WS_MAXIMIZEBOX      =  #00010000,
 WS_TILED          =  WS_OVERLAPPED,
 WS_ICONIC         =  WS_MINIMIZE,
 WS_SIZEBOX        =  WS_THICKFRAME,
 WS_CLIPPINGCHILD= #44000000,
 
 WS_GT   =or_all({WS_GROUP , WS_TABSTOP}),
 WS_EX_DLGMODALFRAME     =  #00000001,
 WS_EX_NOPARENTNOTIFY    =  #00000004,
 WS_EX_TOPMOST           =  #00000008,
 WS_EX_ACCEPTFILES       =  #00000010,
 WS_EX_TRANSPARENT       =  #00000020,
 WS_EX_MDICHILD          =  #00000040,
 WS_EX_TOOLWINDOW        =  #00000080,
 WS_EX_WINDOWEDGE        =  #00000100,
 WS_EX_CLIENTEDGE        =  #00000200,
 WS_EX_CONTEXTHELP       =  #00000400,
 WS_EX_RIGHT             =  #00001000,
 WS_EX_LEFT              =  #00000000,
 WS_EX_RTLREADING        =  #00002000,
 WS_EX_LTRREADING        =  #00000000,
 WS_EX_LEFTSCROLLBAR     =  #00004000,
 WS_EX_RIGHTSCROLLBAR    =  #00000000,
 WS_EX_CONTROLPARENT     =  #00010000,
 WS_EX_STATICEDGE        =  #00020000,
 WS_EX_APPWINDOW         =  #00040000,
WS_EX_OVERLAPPEDWINDOW = or_all({WS_EX_WINDOWEDGE,WS_EX_CLIENTEDGE}),
WS_EX_PALETTEWINDOW = or_all({WS_EX_WINDOWEDGE,WS_EX_TOOLWINDOW,WS_EX_TOPMOST}),

--WS_EX_OVERLAPPEDWINDOW  (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE)
-- WS_EX_PALETTEWINDOW     (WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST)
 WS_EX_LAYERED           =  #00080000,
 WS_EX_NOINHERITLAYOUT   =  #00100000, -- Disable inheritence of mirroring by children
 WS_EX_LAYOUTRTL         =  #00400000, -- Right to left mirroring
 WS_EX_NOACTIVATE        =  #08000000,
 WS_ACTIVECAPTION    =  #0001,
--File winuser.rh:


 
 
WS_OVERLAPPEDWINDOW =or_all({WS_OVERLAPPED,WS_CAPTION,WS_SYSMENU,WS_THICKFRAME,WS_MINIMIZEBOX,WS_MAXIMIZEBOX}),

WS_POPUPWINDOW      =or_all({WS_POPUP,WS_BORDER,WS_SYSMENU}),


WS_CHILDWINDOW   =  (WS_CHILD),

WS_TILEDWINDOW    =  WS_OVERLAPPEDWINDOW

--File wingdi.h:
global constant  BS_SOLID          =  0,
 BS_NULL           =  1,
 BS_HOLLOW         =  BS_NULL,
 BS_HATCHED        =  2,
 BS_PATTERN        =  3,
 BS_INDEXED        =  4,
 BS_DIBPATTERN     =  5,
 BS_DIBPATTERNPT   =  6,
 BS_PATTERN8X8     =  7,
 BS_DIBPATTERN8X8  =  8,
 BS_MONOPATTERN    =  9,
--File winuser.h:
 BS_PUSHBUTTON       =  #00000000,
 BS_DEFPUSHBUTTON    =  #00000001,
 BS_CHECKBOX         =  #00000002,
 BS_AUTOCHECKBOX     =  #00000003,
 BS_RADIOBUTTON      =  #00000004,
 BS_3STATE           =  #00000005,
 BS_AUTO3STATE       =  #00000006,
 BS_GROUPBOX         =  #00000007,
 BS_USERBUTTON       =  #00000008,
 BS_AUTORADIOBUTTON  =  #00000009,
 BS_OWNERDRAW        =  #0000000B,
 BS_LEFTTEXT         =  #00000020,
 BS_TEXT             =  #00000000,
 BS_ICON             =  #00000040,
 BS_BITMAP           =  #00000080,
 BS_LEFT             =  #00000100,
 BS_RIGHT            =  #00000200,
 BS_CENTER           =  #00000300,
 BS_TOP              =  #00000400,
 BS_BOTTOM           =  #00000800,
 BS_VCENTER          =  #00000C00,
 BS_PUSHLIKE         =  #00001000,
 BS_MULTILINE        =  #00002000,
 BS_NOTIFY           =  #00004000,
 BS_FLAT             =  #00008000,
 BS_RIGHTBUTTON      = BS_LEFTTEXT,
-- Windows Vista+
 BS_SPLITBUTTON =  #0000000C,
 BS_COMMANDLINK  = #0000000E


global constant IMAGE_BITMAP = 0,
                IMAGE_ICON   = 1,
                IMAGE_CURSOR = 2,
                IMAGE_ENHMETAFILE = 3

 global constant LR_DEFAULTCOLOR   =  #0000,
    LR_MONOCHROME       = #0001,
    LR_COLOR            = #0002,
    LR_COPYRETURNORG    = #0004,
    LR_COPYDELETEORG    = #0008,
    LR_LOADFROMFILE     = #0010,
    LR_LOADTRANSPARENT  = #0020,
    LR_DEFAULTSIZE      = #0040,
    LR_VGACOLOR         = #0080,
    LR_LOADMAP3DCOLORS  = #1000,
    LR_CREATEDIBSECTION = #2000,
    LR_COPYFROMRESOURCE = #4000,
    LR_SHARED           = #8000
    
--File winuser.h:
global constant WM_NULL                         =  #0000,
WM_CREATE                       =  #0001,
WM_DESTROY                      =  #0002,
WM_MOVE                         =  #0003,
WM_SIZE                         =  #0005,
WM_ACTIVATE                     =  #0006,
WM_SETFOCUS                     =  #0007,
WM_KILLFOCUS                    =  #0008,
WM_ENABLE                       =  #000A,
WM_SETREDRAW                    =  #000B,
WM_SETTEXT                      =  #000C,
WM_GETTEXT                      =  #000D,
WM_GETTEXTLENGTH                =  #000E,
WM_PAINT                        =  #000F,
WM_CLOSE                        =  #0010,
WM_QUERYENDSESSION              =  #0011,
WM_QUERYOPEN                    =  #0013,
WM_ENDSESSION                   =  #0016,
WM_QUIT                         =  #0012,
WM_ERASEBKGND                   =  #0014,
WM_SYSCOLORCHANGE               =  #0015,
WM_SHOWWINDOW                   =  #0018,
WM_WININICHANGE                 =  #001A,
WM_SETTINGCHANGE             =   WM_WININICHANGE,
WM_DEVMODECHANGE                =  #001B,
WM_ACTIVATEAPP                  =  #001C,
WM_FONTCHANGE                   =  #001D,
WM_TIMECHANGE                   =  #001E,
WM_CANCELMODE                   =  #001F,
WM_SETCURSOR                    =  #0020,
WM_MOUSEACTIVATE                =  #0021,
WM_CHILDACTIVATE                =  #0022,
WM_QUEUESYNC                    =  #0023,
WM_GETMINMAXINFO                =  #0024,
WM_PAINTICON                    =  #0026,
WM_ICONERASEBKGND               =  #0027,
WM_NEXTDLGCTL                   =  #0028,
WM_SPOOLERSTATUS                =  #002A,
WM_DRAWITEM                     =  #002B,
WM_MEASUREITEM                  =  #002C,
WM_DELETEITEM                   =  #002D,
WM_VKEYTOITEM                   =  #002E,
WM_CHARTOITEM                   =  #002F,
WM_SETFONT                      =  #0030,
WM_GETFONT                      =  #0031,
WM_SETHOTKEY                    =  #0032,
WM_GETHOTKEY                    =  #0033,
WM_QUERYDRAGICON                =  #0037,
WM_COMPAREITEM                  =  #0039,
WM_GETOBJECT                    =  #003D,
WM_COMPACTING                   =  #0041,
WM_COMMNOTIFY                   =  #0044, -- no longer suported */
WM_WINDOWPOSCHANGING            =  #0046,
WM_WINDOWPOSCHANGED             =  #0047,
WM_POWER                        =  #0048,
WM_COPYDATA                     =  #004A,
WM_CANCELJOURNAL                =  #004B,
WM_NOTIFY                       =  #004E,
WM_INPUTLANGCHANGEREQUEST       =  #0050,
WM_INPUTLANGCHANGE              =  #0051,
WM_TCARD                        =  #0052,
WM_HELP                         =  #0053,
WM_USERCHANGED                  =  #0054,
WM_NOTIFYFORMAT                 =  #0055,
WM_CONTEXTMENU                  =  #007B,
WM_STYLECHANGING                =  #007C,
WM_STYLECHANGED                 =  #007D,
WM_DISPLAYCHANGE                =  #007E,
WM_GETICON                      =  #007F,
WM_SETICON                      =  #0080,
WM_NCCREATE                     =  #0081,
WM_NCDESTROY                    =  #0082,
WM_NCCALCSIZE                   =  #0083,
WM_NCHITTEST                    =  #0084,
WM_NCPAINT                      =  #0085,
WM_NCACTIVATE                   =  #0086,
WM_GETDLGCODE                   =  #0087,
WM_SYNCPAINT                    =  #0088,
WM_NCMOUSEMOVE                  =  #00A0,
WM_NCLBUTTONDOWN                =  #00A1,
WM_NCLBUTTONUP                  =  #00A2,
WM_NCLBUTTONDBLCLK              =  #00A3,
WM_NCRBUTTONDOWN                =  #00A4,
WM_NCRBUTTONUP                  =  #00A5,
WM_NCRBUTTONDBLCLK              =  #00A6,
WM_NCMBUTTONDOWN                =  #00A7,
WM_NCMBUTTONUP                  =  #00A8,
WM_NCMBUTTONDBLCLK              =  #00A9,
WM_NCXBUTTONDOWN                =  #00AB,
WM_NCXBUTTONUP                  =  #00AC,
WM_NCXBUTTONDBLCLK              =  #00AD,
WM_KEYFIRST                     =  #0100,
WM_KEYDOWN                      =  #0100,
WM_KEYUP                        =  #0101,
WM_CHAR                         =  #0102,
WM_DEADCHAR                     =  #0103,
WM_SYSKEYDOWN                   =  #0104,
WM_SYSKEYUP                     =  #0105,
WM_SYSCHAR                      =  #0106,
WM_SYSDEADCHAR                  =  #0107,
WM_KEYLAST                      =  #0108,
WM_IME_STARTCOMPOSITION         =  #010D,
WM_IME_ENDCOMPOSITION           =  #010E,
WM_IME_COMPOSITION              =  #010F,
WM_IME_KEYLAST                  =  #010F,
WM_INITDIALOG                   =  #0110,
WM_COMMAND                      =  #0111,
WM_SYSCOMMAND                   =  #0112,
WM_TIMER                        =  #0113,
WM_HSCROLL                      =  #0114,
WM_VSCROLL                      =  #0115,
WM_INITMENU                     =  #0116,
WM_INITMENUPOPUP                =  #0117,
WM_MENUSELECT                   =  #011F,
WM_MENUCHAR                     =  #0120,
WM_ENTERIDLE                    =  #0121,
WM_MENURBUTTONUP                =  #0122,
WM_MENUDRAG                     =  #0123,
WM_MENUGETOBJECT                =  #0124,
WM_UNINITMENUPOPUP              =  #0125,
WM_MENUCOMMAND                  =  #0126,
WM_CHANGEUISTATE                =  #0127,
WM_UPDATEUISTATE                =  #0128,
WM_QUERYUISTATE                 =  #0129,
WM_CTLCOLORMSGBOX               =  #0132,
WM_CTLCOLOREDIT                 =  #0133,
WM_CTLCOLORLISTBOX              =  #0134,
WM_CTLCOLORBTN                  =  #0135,
WM_CTLCOLORDLG                  =  #0136,
WM_CTLCOLORSCROLLBAR            =  #0137,
WM_CTLCOLORSTATIC               =  #0138,
WM_MOUSEFIRST                   =  #0200,
WM_MOUSEMOVE                    =  #0200,
WM_LBUTTONDOWN                  =  #0201,
WM_LBUTTONUP                    =  #0202,
WM_LBUTTONDBLCLK                =  #0203,
WM_RBUTTONDOWN                  =  #0204,
WM_RBUTTONUP                    =  #0205,
WM_RBUTTONDBLCLK                =  #0206,
WM_MBUTTONDOWN                  =  #0207,
WM_MBUTTONUP                    =  #0208,
WM_MBUTTONDBLCLK                =  #0209,
WM_MOUSEWHEEL                   =  #020A,
WM_XBUTTONDOWN                  =  #020B,
WM_XBUTTONUP                    =  #020C,
WM_XBUTTONDBLCLK                =  #020D,
WM_MOUSELAST                    =  #020D,
--WM_MOUSELAST                    =  #020A,
--WM_MOUSELAST                    =  #0209,
WM_PARENTNOTIFY                 =  #0210,
WM_ENTERMENULOOP                =  #0211,
WM_EXITMENULOOP                 =  #0212,
WM_NEXTMENU                     =  #0213,
WM_SIZING                       =  #0214,
WM_CAPTURECHANGED               =  #0215,
WM_MOVING                       =  #0216,
WM_POWERBROADCAST               =  #0218,
WM_DEVICECHANGE                 =  #0219,
WM_MDICREATE                    =  #0220,
WM_MDIDESTROY                   =  #0221,
WM_MDIACTIVATE                  =  #0222,
WM_MDIRESTORE                   =  #0223,
WM_MDINEXT                      =  #0224,
WM_MDIMAXIMIZE                  =  #0225,
WM_MDITILE                      =  #0226,
WM_MDICASCADE                   =  #0227,
WM_MDIICONARRANGE               =  #0228,
WM_MDIGETACTIVE                 =  #0229,
WM_MDISETMENU                   =  #0230,
WM_ENTERSIZEMOVE                =  #0231,
WM_EXITSIZEMOVE                 =  #0232,
WM_DROPFILES                    =  #0233,
WM_MDIREFRESHMENU               =  #0234,
WM_IME_SETCONTEXT               =  #0281,
WM_IME_NOTIFY                   =  #0282,
WM_IME_CONTROL                  =  #0283,
WM_IME_COMPOSITIONFULL          =  #0284,
WM_IME_SELECT                   =  #0285,
WM_IME_CHAR                     =  #0286,
WM_IME_REQUEST                  =  #0288,
WM_IME_KEYDOWN                  =  #0290,
WM_IME_KEYUP                    =  #0291,
WM_MOUSEHOVER                   =  #02A1,
WM_MOUSELEAVE                   =  #02A3,
WM_NCMOUSEHOVER                 =  #02A0,
WM_NCMOUSELEAVE                 =  #02A2,
WM_CUT                          =  #0300,
WM_COPY                         =  #0301,
WM_PASTE                        =  #0302,
WM_CLEAR                        =  #0303,
WM_UNDO                         =  #0304,
WM_RENDERFORMAT                 =  #0305,
WM_RENDERALLFORMATS             =  #0306,
WM_DESTROYCLIPBOARD             =  #0307,
WM_DRAWCLIPBOARD                =  #0308,
WM_PAINTCLIPBOARD               =  #0309,
WM_VSCROLLCLIPBOARD             =  #030A,
WM_SIZECLIPBOARD                =  #030B,
WM_ASKCBFORMATNAME              =  #030C,
WM_CHANGECBCHAIN                =  #030D,
WM_HSCROLLCLIPBOARD             =  #030E,
WM_QUERYNEWPALETTE              =  #030F,
WM_PALETTEISCHANGING            =  #0310,
WM_PALETTECHANGED               =  #0311,
WM_HOTKEY                       =  #0312,
WM_PRINT                        =  #0317,
WM_PRINTCLIENT                  =  #0318,
WM_APPCOMMAND                   =  #0319,
WM_HANDHELDFIRST                =  #0358,
WM_HANDHELDLAST                 =  #035F,
WM_AFXFIRST                     =  #0360,
WM_AFXLAST                      =  #037F,
WM_PENWINFIRST                  =  #0380,
WM_PENWINLAST                   =  #038F,
WM_APP                          =  #8000,



--File commctrl.h:
--WM_MOUSEHOVER                   =  #02A1
--WM_MOUSELEAVE                   =  #02A3
--File commdlg.h:
WM_CHOOSEFONT_GETLOGFONT      =(WM_USER + 1),
WM_CHOOSEFONT_SETLOGFONT      =(WM_USER + 101),
WM_CHOOSEFONT_SETFLAGS        =(WM_USER + 102),
WM_PSD_PAGESETUPDLG     =(WM_USER  ),
WM_PSD_FULLPAGERECT     =(WM_USER+1),
WM_PSD_MINMARGINRECT    =(WM_USER+2),
WM_PSD_MARGINRECT       =(WM_USER+3),
WM_PSD_GREEKTEXTRECT    =(WM_USER+4),
WM_PSD_ENVSTAMPRECT     =(WM_USER+5),
WM_PSD_YAFULLPAGERECT   =(WM_USER+6),
--File cpl.h:
WM_CPL_LAUNCH   =(WM_USER+1000),
WM_CPL_LAUNCHED =(WM_USER+1001),
--File dbt.h:
--WM_DEVICECHANGE         =  #0219,
--File dde.h:
WM_DDE_FIRST        =  #03E0,
WM_DDE_INITIATE    = (WM_DDE_FIRST),
WM_DDE_TERMINATE   = (WM_DDE_FIRST+1),
WM_DDE_ADVISE      = (WM_DDE_FIRST+2),
WM_DDE_UNADVISE    = (WM_DDE_FIRST+3),
WM_DDE_ACK             = (WM_DDE_FIRST+4),
WM_DDE_DATA            = (WM_DDE_FIRST+5),
WM_DDE_REQUEST     = (WM_DDE_FIRST+6),
WM_DDE_POKE            = (WM_DDE_FIRST+7),
WM_DDE_EXECUTE     = (WM_DDE_FIRST+8),
WM_DDE_LAST            = (WM_DDE_FIRST+8),

--File ime.h:
WM_IME_REPORT       =  #0280,
--WM_CONVERTREQUESTEX     =  #0109
WM_WNT_CONVERTREQUESTEX =  #0109, -- WM_CONVERTREQUESTEX: 109 for NT, 108 for OT */
WM_CONVERTREQUEST       =  #010A,
WM_CONVERTRESULT        =  #010B,
WM_INTERIM              =  #010C,
WM_IMEKEYDOWN           =  #290,
WM_IMEKEYUP             =  #291,
--File pbt.h:
--WM_POWERBROADCAST               =  #218,
--File penwin.h:
--WM_RCRESULT             (WM_PENWINFIRST+1)  -- =  #381
--WM_HOOKRCRESULT         (WM_PENWINFIRST+2)  -- =  #382
--WM_PENMISCINFO          (WM_PENWINFIRST+3)  -- =  #383
--WM_globalRCCHANGE       (WM_PENWINFIRST+3)  -- alias
--WM_SKB                  (WM_PENWINFIRST+4)  -- =  #384
--WM_PENCTL               (WM_PENWINFIRST+5)  -- =  #385
--WM_HEDITCTL             (WM_PENWINFIRST+5)  -- FBC: alias
--WM_PENMISC              (WM_PENWINFIRST+6)  -- =  #386
--WM_CTLINIT              (WM_PENWINFIRST+7)  -- =  #387
--WM_PENEVENT             (WM_PENWINFIRST+8)  -- =  #388
--File ras.h:
WM_RASDIALEVENT =  #CCCD,
--File richedit.h:
--WM_CONTEXTMENU                        =  #007B,
--WM_PRINTCLIENT                        =  #0318,
--WM_NOTIFY             =  #004E,
--File vfw.h:
WM_CAP_START              =      WM_USER,
--WM_CAP_UNICODE_START            WM_USER+100
--WM_CAP_GET_CAPSTREAMPTR         (--WM_CAP_START+  1)
--WM_CAP_SET_CALLBACK_ERRORW     (--WM_CAP_UNICODE_START+  2)
--WM_CAP_SET_CALLBACK_STATUSW    (--WM_CAP_UNICODE_START+  3)
--WM_CAP_SET_CALLBACK_ERRORA     (--WM_CAP_START+  2)
--WM_CAP_SET_CALLBACK_STATUSA    (--WM_CAP_START+  3)
--WM_CAP_SET_CALLBACK_ERROR       --WM_CAP_SET_CALLBACK_ERRORW
--WM_CAP_SET_CALLBACK_STATUS      --WM_CAP_SET_CALLBACK_STATUSW
--WM_CAP_SET_CALLBACK_ERROR       --WM_CAP_SET_CALLBACK_ERRORA
--WM_CAP_SET_CALLBACK_STATUS      --WM_CAP_SET_CALLBACK_STATUSA
--WM_CAP_SET_CALLBACK_YIELD       (--WM_CAP_START+  4)
--WM_CAP_SET_CALLBACK_FRAME       (--WM_CAP_START+  5)
--WM_CAP_SET_CALLBACK_VIDEOSTREAM (--WM_CAP_START+  6)
--WM_CAP_SET_CALLBACK_WAVESTREAM  (--WM_CAP_START+  7)
--WM_CAP_GET_USER_DATA          (--WM_CAP_START+  8)
--WM_CAP_SET_USER_DATA          (--WM_CAP_START+  9)
--WM_CAP_DRIVER_CONNECT           (--WM_CAP_START+  10)
--WM_CAP_DRIVER_DISCONNECT        (--WM_CAP_START+  11)
--WM_CAP_DRIVER_GET_NAMEA        (--WM_CAP_START+  12)
--WM_CAP_DRIVER_GET_VERSIONA     (--WM_CAP_START+  13)
--WM_CAP_DRIVER_GET_NAMEW        (--WM_CAP_UNICODE_START+  12)
--WM_CAP_DRIVER_GET_VERSIONW     (--WM_CAP_UNICODE_START+  13)
--WM_CAP_DRIVER_GET_NAME          --WM_CAP_DRIVER_GET_NAMEW
--WM_CAP_DRIVER_GET_VERSION       --WM_CAP_DRIVER_GET_VERSIONW
--WM_CAP_DRIVER_GET_NAME          --WM_CAP_DRIVER_GET_NAMEA
--WM_CAP_DRIVER_GET_VERSION       --WM_CAP_DRIVER_GET_VERSIONA
--WM_CAP_DRIVER_GET_CAPS          (--WM_CAP_START+  14)
--WM_CAP_FILE_SET_CAPTURE_FILEA  (--WM_CAP_START+  20)
--WM_CAP_FILE_GET_CAPTURE_FILEA  (--WM_CAP_START+  21)
--WM_CAP_FILE_SAVEASA            (--WM_CAP_START+  23)
--WM_CAP_FILE_SAVEDIBA           (--WM_CAP_START+  25)
--WM_CAP_FILE_SET_CAPTURE_FILEW  (--WM_CAP_UNICODE_START+  20)
--WM_CAP_FILE_GET_CAPTURE_FILEW  (--WM_CAP_UNICODE_START+  21)
--WM_CAP_FILE_SAVEASW            (--WM_CAP_UNICODE_START+  23)
--WM_CAP_FILE_SAVEDIBW           (--WM_CAP_UNICODE_START+  25)
--WM_CAP_FILE_SET_CAPTURE_FILE    --WM_CAP_FILE_SET_CAPTURE_FILEW
--WM_CAP_FILE_GET_CAPTURE_FILE    --WM_CAP_FILE_GET_CAPTURE_FILEW
--WM_CAP_FILE_SAVEAS              --WM_CAP_FILE_SAVEASW
--WM_CAP_FILE_SAVEDIB             --WM_CAP_FILE_SAVEDIBW
--WM_CAP_FILE_SET_CAPTURE_FILE    --WM_CAP_FILE_SET_CAPTURE_FILEA
--WM_CAP_FILE_GET_CAPTURE_FILE    --WM_CAP_FILE_GET_CAPTURE_FILEA
--WM_CAP_FILE_SAVEAS              --WM_CAP_FILE_SAVEASA
--WM_CAP_FILE_SAVEDIB             --WM_CAP_FILE_SAVEDIBA
--WM_CAP_FILE_ALLOCATE            (--WM_CAP_START+  22)
--WM_CAP_FILE_SET_INFOCHUNK       (--WM_CAP_START+  24)
--WM_CAP_EDIT_COPY                (--WM_CAP_START+  30)
--WM_CAP_SET_AUDIOFORMAT          (--WM_CAP_START+  35)
--WM_CAP_GET_AUDIOFORMAT          (--WM_CAP_START+  36)
--WM_CAP_DLG_VIDEOFORMAT          (--WM_CAP_START+  41)
--WM_CAP_DLG_VIDEOSOURCE          (--WM_CAP_START+  42)
--WM_CAP_DLG_VIDEODISPLAY         (--WM_CAP_START+  43)
--WM_CAP_GET_VIDEOFORMAT          (--WM_CAP_START+  44)
--WM_CAP_SET_VIDEOFORMAT          (--WM_CAP_START+  45)
--WM_CAP_DLG_VIDEOCOMPRESSION     (--WM_CAP_START+  46)
--WM_CAP_SET_PREVIEW              (--WM_CAP_START+  50)
--WM_CAP_SET_OVERLAY              (--WM_CAP_START+  51)
--WM_CAP_SET_PREVIEWRATE          (--WM_CAP_START+  52)
--WM_CAP_SET_SCALE                (--WM_CAP_START+  53)
--WM_CAP_GET_STATUS               (--WM_CAP_START+  54)
--WM_CAP_SET_SCROLL               (--WM_CAP_START+  55)
--WM_CAP_GRAB_FRAME               (--WM_CAP_START+  60)
--WM_CAP_GRAB_FRAME_NOSTOP        (--WM_CAP_START+  61)
--WM_CAP_SEQUENCE                 (--WM_CAP_START+  62)
--WM_CAP_SEQUENCE_NOFILE          (--WM_CAP_START+  63)
--WM_CAP_SET_SEQUENCE_SETUP       (--WM_CAP_START+  64)
--WM_CAP_GET_SEQUENCE_SETUP       (--WM_CAP_START+  65)
--WM_CAP_SET_MCI_DEVICEA         (--WM_CAP_START+  66)
--WM_CAP_GET_MCI_DEVICEA         (--WM_CAP_START+  67)
--WM_CAP_SET_MCI_DEVICEW         (--WM_CAP_UNICODE_START+  66)
--WM_CAP_GET_MCI_DEVICEW         (--WM_CAP_UNICODE_START+  67)
--WM_CAP_SET_MCI_DEVICE           --WM_CAP_SET_MCI_DEVICEW
--WM_CAP_GET_MCI_DEVICE           --WM_CAP_GET_MCI_DEVICEW
--WM_CAP_SET_MCI_DEVICE           --WM_CAP_SET_MCI_DEVICEA
--WM_CAP_GET_MCI_DEVICE           --WM_CAP_GET_MCI_DEVICEA
--WM_CAP_STOP                     (--WM_CAP_START+  68)
--WM_CAP_ABORT                    (--WM_CAP_START+  69)
--WM_CAP_SINGLE_FRAME_OPEN        (--WM_CAP_START+  70)
--WM_CAP_SINGLE_FRAME_CLOSE       (--WM_CAP_START+  71)
--WM_CAP_SINGLE_FRAME             (--WM_CAP_START+  72)
--WM_CAP_PAL_OPENA               (--WM_CAP_START+  80)
--WM_CAP_PAL_SAVEA               (--WM_CAP_START+  81)
--WM_CAP_PAL_OPENW               (--WM_CAP_UNICODE_START+  80)
--WM_CAP_PAL_SAVEW               (--WM_CAP_UNICODE_START+  81)
--WM_CAP_PAL_OPEN                 --WM_CAP_PAL_OPENW
--WM_CAP_PAL_SAVE                 --WM_CAP_PAL_SAVEW
--WM_CAP_PAL_OPEN                 --WM_CAP_PAL_OPENA
--WM_CAP_PAL_SAVE                 --WM_CAP_PAL_SAVEA
--WM_CAP_PAL_PASTE                (--WM_CAP_START+  82)
--WM_CAP_PAL_AUTOCREATE           (--WM_CAP_START+  83)
--WM_CAP_PAL_MANUALCREATE         (--WM_CAP_START+  84)
--WM_CAP_SET_CALLBACK_CAPCONTROL  (--WM_CAP_START+  85)
--WM_CAP_UNICODE_END              --WM_CAP_PAL_SAVEW
--WM_CAP_END                      --WM_CAP_UNICODE_END
--File windowsx.h:
WM_CTLCOLOR                             =  #0019


--Messagebutton defs
--File stdlib.h:
-- MB_CUR_MAX __mb_cur_max
--File winnls.h:
global constant MB_PRECOMPOSED            =  #00000001,  -- use precomposed chars
 MB_COMPOSITE              =  #00000002,  -- use composite chars
 MB_USEGLYPHCHARS          =  #00000004,  -- use glyph chars, not ctrl chars
 MB_ERR_INVALID_CHARS      =  #00000008,  -- error for invalid chars
--File winuser.h:
 MB_OK                       =  #00000000,
 MB_OKCANCEL                 =  #00000001,
 MB_ABORTRETRYIGNORE         =  #00000002,
 MB_YESNOCANCEL              =  #00000003,
 MB_YESNO                    =  #00000004,
 MB_RETRYCANCEL              =  #00000005,
 MB_CANCELTRYCONTINUE        =  #00000006,
 MB_ICONHAND                 =  #00000010,
 MB_ICONQUESTION             =  #00000020,
 MB_ICONEXCLAMATION          =  #00000030,
 MB_ICONASTERISK             =  #00000040,
 MB_USERICON                 =  #00000080,
 MB_ICONWARNING           =   MB_ICONEXCLAMATION,
 MB_ICONERROR             =   MB_ICONHAND,
 MB_ICONINFORMATION       =   MB_ICONASTERISK,
 MB_ICONSTOP              =   MB_ICONHAND,
 MB_DEFBUTTON1               =  #00000000,
 MB_DEFBUTTON2               =  #00000100,
 MB_DEFBUTTON3               =  #00000200,
 MB_DEFBUTTON4               =  #00000300,
 MB_APPLMODAL                =  #00000000,
 MB_SYSTEMMODAL              =  #00001000,
 MB_TASKMODAL                =  #00002000,
 MB_HELP                     =  #00004000, -- Help Button
 MB_NOFOCUS                  =  #00008000,
 MB_SETFOREGROUND            =  #00010000,
 MB_DEFAULT_DESKTOP_ONLY     =  #00020000,
 MB_TOPMOST                  =  #00040000,
 MB_RIGHT                    =  #00080000,
 MB_RTLREADING               =  #00100000,
 MB_SERVICE_NOTIFICATION          =  #00200000,
-- MB_SERVICE_NOTIFICATION          =  #00040000,
 MB_SERVICE_NOTIFICATION_NT3X     =  #00040000,
 MB_TYPEMASK                 =  #0000000F,
 MB_ICONMASK                 =  #000000F0,
 MB_DEFMASK                  =  #00000F00,
 MB_MODEMASK                 =  #00003000,
 MB_MISCMASK                 =  #0000C000,
--File _lim.h:
 MB_LEN_MAX  =    2               -- max. # bytes in multibyte char */
 

--Return values
-- Return values from MessageBox() 
--      IDERROR = 0,    -- FAILURE (constant doesn't exist)
global constant IDOK            = 1,    -- OK button was selected.
        IDCANCEL        = 2,    -- Cancel button was selected.
        IDABORT = 3,    -- Abort button was selected.
        IDRETRY = 4,    -- Retry button was selected.
        IDIGNORE        = 5,    -- Ignore button was selected.
        IDYES           = 6,    -- Yes button was selected.     
        IDNO            = 7,    -- No button was selected.
        
--#if(WINVER >= 0x0400)
        IDCLOSE  =       8,
        IDHELP   =       9,
--#endif /* WINVER >= 0x0400 */

--#if(WINVER >= 0x0500)
        IDTRYAGAIN  =    10,
        IDCONTINUE  =    11
--#endif /* WINVER >= 0x0500 */

-- constants shamlessly copied from arwen
    -- edit messages
global constant 
    ES_AUTOHSCROLL = #80,
    ES_AUTOVSCROLL = 64,
    ES_LEFT = 0,
    ES_CENTER = 1,
    ES_RIGHT = 2,
    ES_MULTILINE = 4,
    ES_UPPERCASE = 8,
    ES_LOWERCASE = #10,
    ES_PASSWORD = #20,
    ES_NOHIDESEL = #100,
    ES_OEMCONVERT =  #400,
    ES_READONLY =  #800,
    ES_WANTRETURN = #1000,
    ES_NUMBER =  #2000,
    ES_SUNKEN =  #4000, --RichEdit only
    
    EM_CANPASTE = 1074,
    EM_CANUNDO = 198,
    EM_CHARFROMPOS = 215,
    EM_DISPLAYBAND = 1075,
    EM_EMPTYUNDOBUFFER = 205,
    EM_EXGETSEL = 1076,
    EM_EXLIMITTEXT = 1077,
    EM_EXLINEFROMCHAR = 1078,
    EM_EXSETSEL = 1079,
    EM_FINDTEXT = 1080,
    EM_FINDTEXTEX = 1103,
    EM_FINDWORDBREAK = 1100,
    EM_FMTLINES = 200,
    EM_FORMATRANGE = 1081,
    EM_GETCHARFORMAT = 1082,
    EM_GETEVENTMASK = 1083,
    EM_GETFIRSTVISIBLELINE = 206,
    EM_GETHANDLE = 189,
    EM_GETLIMITTEXT = 213,
    EM_GETLINE = 196,
    EM_GETLINECOUNT = 186,
    EM_GETMARGINS = 212,
    EM_GETMODIFY = 184,
    EM_GETIMECOLOR = 1129,
    EM_GETIMEOPTIONS = 1131,
    EM_GETOPTIONS = 1102,
    EM_GETOLEINTERFACE = 1084,
    EM_GETPARAFORMAT = 1085,
    EM_GETPASSWORDCHAR = 210,
    EM_GETPUNCTUATION = 1125,
    EM_GETRECT = 178,
    EM_GETSEL = 176,
    EM_GETSELTEXT = 1086,
    EM_GETTEXTRANGE = 1099,
    EM_GETTHUMB = 190,
    EM_GETWORDBREAKPROC = 209,
    EM_GETWORDBREAKPROCEX = 1104,
    EM_GETWORDWRAPMODE = 1127,
    EM_HIDESELECTION = 1087,
    EM_LIMITTEXT = 197,
    EM_LINEFROMCHAR = 201,
    EM_LINEINDEX = 187,
    EM_LINELENGTH = 193,
    EM_LINESCROLL = 182,
    EM_PASTESPECIAL = 1088,
    EM_POSFROMCHAR = 214,
    EM_REPLACESEL = 194,
    EM_REQUESTRESIZE = 1089,
    EM_SCROLL = 181,
    EM_SCROLLCARET = 183,
    EM_SELECTIONTYPE = 1090,
    EM_SETBKGNDCOLOR = 1091,
    EM_SETCHARFORMAT = 1092,
    EM_SETEVENTMASK = 1093,
    EM_SETHANDLE = 188,
    EM_SETIMECOLOR = 1128,
    EM_SETIMEOPTIONS = 1130,
    EM_SETLIMITTEXT = 197,
    EM_SETMARGINS = 211,
    EM_SETMODIFY = 185,
    EM_SETOLECALLBACK = 1094,
    EM_SETOPTIONS = 1101,
    EM_SETPARAFORMAT = 1095,
    EM_SETPASSWORDCHAR = 204,
    EM_SETPUNCTUATION = 1124,
    EM_SETREADONLY = 207,
    EM_SETRECT = 179,
    EM_SETRECTNP = 180,
    EM_SETSEL = 177,
    EM_SETTABSTOPS = 203,
    EM_SETTARGETDEVICE = 1096,
    EM_SETWORDBREAKPROC = 208,
    EM_SETWORDBREAKPROCEX = 1105,
    EM_SETWORDWRAPMODE = 1126,
    EM_STREAMIN = 1097,
    EM_STREAMOUT = 1098,
    EM_UNDO = 199,
    EM_SETUNDOLIMIT = 1106,
-- The following messages need Unicode strings
    ECM_FIRST = #1500,
    EM_SETCUEBANNER=ECM_FIRST+1,
    EM_GETCUEBANNER=ECM_FIRST+2,
    EM_SHOWBALLOONTIP=ECM_FIRST+3, 
    EM_HIDEBALLOONTIP=ECM_FIRST+4,
    EM_SETHILITE=ECM_FIRST+5,   -- >= Vista, not documented?
    EM_GETHILITE=ECM_FIRST+6,   -- >= Vista, not documented?
    -- notifications
    EN_SETFOCUS = #100,
    EN_KILLFOCUS = #200,
    EN_CHANGE = #300,
    EN_UPDATE = #400,
    EN_ERRSPACE = 1280,
    EN_MAXTEXT = 1281,
    EN_HSCROLL = 1537,
    EN_VSCROLL = 1538,
    EN_MSGFILTER = 1792,
    EN_REQUESTRESIZE = 1793,
    EN_SELCHANGE = 1794,
    EN_DROPFILES = 1795,
    EN_PROTECTED = 1796,
    EN_CORRECTTEXT = 1797,
    EN_STOPNOUNDO = 1798,
    EN_IMECHANGE = 1799,
    EN_SAVECLIPBOARD = 1800,
    EN_OLEOPFAILED = 1801

----------
-- BUTTONS
----------
    -- Button Styles

    -- messages 
global constant BM_CLICK = 245,
    BM_GETCHECK = 240,
    BM_GETIMAGE = 246,
    BM_GETSTATE = 242,
    BM_SETCHECK = 241,
    BM_SETIMAGE = 247,
    BM_SETSTATE = 243,
    BM_SETSTYLE = 244,
    -- notifications
    BN_CLICKED = 0,
    BN_DBLCLK = 5,
    BN_DISABLE = 4,
    BN_DOUBLECLICKED = 5,
    BN_HILITE = 2,
    BN_KILLFOCUS = 7,
    BN_PAINT = 1,
    BN_PUSHED = 2,
    BN_SETFOCUS = 6,
    BN_UNHILITE = 3,
    BN_UNPUSHED = 3,
    -- states
    BST_UNCHECKED = 0,
    BST_CHECKED = 1,
    BST_INDETERMINATE = 2,
    BST_PUSHED = 4,
    BST_FOCUS = 8

--------------
-- Listbox
--------------

global constant LB_ADDFILE = 406,
    LB_ADDSTRING = 384,
    LB_DELETESTRING = 386,
    LB_DIR = 397,
    LB_FINDSTRING = 399,
    LB_FINDSTRINGEXACT = 418,
    LB_GETANCHORINDEX = 413,
    LB_GETCARETINDEX = 415,
    LB_GETCOUNT = 395,
    LB_GETCURSEL = 392,
    LB_GETHORIZONTALEXTENT = 403,
    LB_GETITEMDATA = 409,
    LB_GETITEMHEIGHT = 417,
    LB_GETITEMRECT = 408,
    LB_GETLOCALE = 422,
    LB_GETSEL = 391,
    LB_GETSELCOUNT = 400,
    LB_GETSELITEMS = 401,
    LB_GETTEXT = 393,
    LB_GETTEXTLEN = 394,
    LB_GETTOPINDEX = 398,
    LB_INITSTORAGE = 424,
    LB_INSERTSTRING = 385,
    LB_ITEMFROMPOINT = 425,
    LB_RESETCONTENT = 388,
    LB_SELECTSTRING = 396,
    LB_SELITEMRANGE = 411,
    LB_SELITEMRANGEEX = 387,
    LB_SETANCHORINDEX = 412,
    LB_SETCARETINDEX = 414,
    LB_SETCOLUMNWIDTH = 405,
    LB_SETCOUNT = 423,
    LB_SETCURSEL = 390,
    LB_SETHORIZONTALEXTENT = 404,
    LB_SETITEMDATA = 410,
    LB_SETITEMHEIGHT = 416,
    LB_SETLOCALE = 421,
    LB_SETSEL = 389,
    LB_SETTABSTOPS = 402,
    LB_SETTOPINDEX = 407,

    LB_ERR = -1,
    LB_ERRSPACE = -2,

    LBN_DBLCLK = 2,
    LBN_ERRSPACE = -2,
    LBN_KILLFOCUS = 5,
    LBN_SELCANCEL = 3,
    LBN_SELCHANGE = 1,
    LBN_SETFOCUS = 4,

    LBS_NOTIFY = 1,
    LBS_SORT = 2,
    LBS_NOREDRAW = 4,
    LBS_MULTIPLESEL = 8,
    LBS_OWNERDRAWFIXED = #10,
    LBS_OWNERDRAWVARIABLE = #20,
    LBS_HASSTRINGS = #40,
    LBS_USETABSTOPS = #80,
    LBS_NOINTEGRALHEIGHT = #100,
    LBS_MULTICOLUMN = #200,
    LBS_WANTKEYBOARDINPUT =  #400,
    LBS_EXTENDEDSEL =  #800,
    LBS_DISABLENOSCROLL = #1000,
    LBS_NODATA =  #2000,
    LBS_NOSEL =  #4000,
    LBS_STANDARD =  #A00003,
    
-- Static Controls
    SS_LEFT = 0,
    SS_CENTER = 1,
    SS_RIGHT = 2,
    SS_ICON = 3,
    SS_BLACKRECT = 4,
    SS_GRAYRECT = 5,
    SS_WHITERECT = 6,
    SS_BLACKFRAME = 7,
    SS_GRAYFRAME = 8,
    SS_WHITEFRAME = 9,
    SS_USERITEM = 10,
    SS_SIMPLE = 11,
    SS_LEFTNOWORDWRAP =  12,
    SS_OWNERDRAW =  13,
    SS_BITMAP =  14,
    SS_ENHMETAFILE =  15,
    SS_ETCHEDHORZ = 16,
    SS_ETCHEDVERT =  17,
    SS_ETCHEDFRAME =  18,

    SS_NOPREFIX = #80,
    SS_NOTIFY = #100,
    SS_CENTERIMAGE = #200,
    SS_RIGHTJUST =  #400,
    SS_REALSIZEIMAGE =  #800,
    SS_SUNKEN = #1000,
    SS_REALSIZECONTROL = #40, -- WinVer 501 and over (at least Win2000 i think)
-- End  
    STN_CLICKED=0,
    STN_DBLCLK=1,
    STN_ENABLE=2,
    STN_DISABLE=3,
    STM_SETICON         = #0170,
    STM_GETICON         = #0171,
    STM_SETIMAGE        = #0172,
    STM_GETIMAGE        = #0173,

-- Also from arwen
------------------------
-- STOCK LOGICAL OBJECTS
------------------------
    -- brushes
    WHITE_BRUSH = 0,
    LTGRAY_BRUSH = 1,
    GRAY_BRUSH = 2,
    DKGRAY_BRUSH = 3,
    BLACK_BRUSH = 4,
    NULL_BRUSH = 5,
    HOLLOW_BRUSH = NULL_BRUSH,
    DC_BRUSH = 18,
    DC_PEN = 19,
    -- pens
    WHITE_PEN = 6,
    BLACK_PEN = 7,
    NULL_PEN = 8,
    -- fonts
    OEM_FIXED_FONT = 10,
    ANSI_FIXED_FONT = 11,
    ANSI_VAR_FONT = 12,
    SYSTEM_FONT = 13,
    DEVICE_DEFAULT_FONT = 14,
    DEFAULT_PALETTE = 15,
    SYSTEM_FIXED_FONT = 16,
    DEFAULT_GUI_FONT = 17,
    
    -- PenStyles (not from Arwen ;))
    PS_SOLID    =       #00000000,
    PS_DASH     =       #00000001,
    PS_DOT      =       #00000002,
    PS_DASHDOT  =       #00000003,
    PS_DASHDOTDOT   =   #00000004,
    PS_NULL         =   #00000005,
    PS_INSIDEFRAME  =   #00000006,
    PS_USERSTYLE    =   #00000007,
    PS_ALTERNATE    =   #00000008,
    PS_STYLE_MASK   =   #0000000F,
    PS_ENDCAP_ROUND =   #00000000,
    PS_ENDCAP_SQUARE=   #00000100,
    PS_ENDCAP_FLAT  =   #00000200,
    PS_ENDCAP_MASK  =   #00000F00,
    PS_JOIN_ROUND   =   #00000000,
    PS_JOIN_BEVEL   =   #00001000,
    PS_JOIN_MITER   =   #00002000,
    PS_JOIN_MASK    =   #0000F000,
    PS_COSMETIC     =   #00000000,
    PS_GEOMETRIC    =   #00010000,
    PS_TYPE_MASK    =   #000F0000,

    Normal    = 0,
    Bold      = 1,
    Italic    = 2,
    Underline = 4,
    Strikeout = 8,

-- GetCurrentObject constants
    OBJ_BRUSH = 2,
    OBJ_PEN = 1,
    OBJ_PAL = 5,
    OBJ_FONT = 6,
    OBJ_BITMAP = 7,
    OBJ_EXTPEN = 11,
    OBJ_REGION = 8,
    OBJ_DC = 3,
    OBJ_MEMDC = 10,
    OBJ_METAFILE = 9,
    OBJ_METADC = 4,
    OBJ_ENHMETAFILE = 13,
    OBJ_ENHMETADC = 12

    
-- RedrawWindow() flags 
global constant RDW_INVALIDATE      =#0001,
        RDW_INTERNALPAINT   =#0002,
        RDW_ERASE           =#0004,
        RDW_VALIDATE        =#0008,
        RDW_NOINTERNALPAINT =#0010,
        RDW_NOERASE         =#0020,
        RDW_NOCHILDREN      =#0040,
        RDW_ALLCHILDREN     =#0080,
        RDW_UPDATENOW       =#0100,
        RDW_ERASENOW        =#0200,
        RDW_FRAME           =#0400,
        RDW_NOFRAME         =#0800 

-- Get-SetWindowLong
global constant GWL_WNDPROC = (-4),
                GWL_HINSTANCE =  (-6),

                GWL_HWNDPARENT = (-8),
                
                GWL_ID          =(-12),
                
                GWL_STYLE       =(-16),
                
                GWL_EXSTYLE     =(-20),
                
                GWL_USERDATA    =(-21),
                DWL_MSGRESULT =  0,

                DWL_DLGPROC   =  4,
                
                DWL_USER      =  8
                


global constant VK_DBE_ALPHANUMERIC              =  #0F0,
 VK_DBE_KATAKANA                  =  #0F1,
 VK_DBE_HIRAGANA                  =  #0F2,
 VK_DBE_SBCSCHAR                  =  #0F3,
 VK_DBE_DBCSCHAR                  =  #0F4,
 VK_DBE_ROMAN                     =  #0F5,
 VK_DBE_NOROMAN                   =  #0F6,
 VK_DBE_ENTERWORDREGISTERMODE     =  #0F7,
 VK_DBE_ENTERIMECONFIGMODE        =  #0F8,
 VK_DBE_FLUSHSTRING               =  #0F9,
 VK_DBE_CODEINPUT                 =  #0FA,
 VK_DBE_NOCODEINPUT               =  #0FB,
 VK_DBE_DETERMINESTRING           =  #0FC,
 VK_DBE_ENTERDLGCONVERSIONMODE    =  #0FD,
--File winuser.h:,
 VK_LBUTTON        =  #01,
 VK_RBUTTON        =  #02,
 VK_CANCEL         =  #03,
 VK_MBUTTON        =  #04 ,   -- NOT contiguous with L & RBUTTON */
 VK_XBUTTON1       =  #05 ,   -- NOT contiguous with L & RBUTTON */
 VK_XBUTTON2       =  #06 ,   -- NOT contiguous with L & RBUTTON */
 VK_BACK           =  #08,
 VK_TAB            =  #09,
 VK_CLEAR          =  #0C,
 VK_RETURN         =  #0D,
 VK_SHIFT          =  #10,
 VK_CONTROL        =  #11,
 VK_MENU           =  #12,
 VK_PAUSE          =  #13,
 VK_CAPITAL        =  #14,
 VK_KANA           =  #15,
 VK_HANGEUL        =  #15,  -- old name - should be here for compatibility */
 VK_HANGUL         =  #15,
 VK_JUNJA          =  #17,
 VK_FINAL          =  #18,
 VK_HANJA          =  #19,
 VK_KANJI          =  #19,
 VK_ESCAPE         =  #1B,
 VK_CONVERT        =  #1C,
 VK_NONCONVERT     =  #1D,
 VK_ACCEPT         =  #1E,
 VK_MODECHANGE     =  #1F,
 VK_SPACE          =  #20,
 VK_PRIOR          =  #21,
 VK_NEXT           =  #22,
 VK_END            =  #23,
 VK_HOME           =  #24,
 VK_LEFT           =  #25,
 VK_UP             =  #26,
 VK_RIGHT          =  #27,
 VK_DOWN           =  #28,
 VK_SELECT         =  #29,
 VK_PRINT          =  #2A,
 VK_EXECUTE        =  #2B,
 VK_SNAPSHOT       =  #2C,
 VK_INSERT         =  #2D,
 VK_DELETE         =  #2E,
 VK_HELP           =  #2F,
 VK_0 = 48,
  VK_1 = 49,
  VK_2 = 50,
  VK_3 = 51,
  VK_4 = 52,
  VK_5 = 53,
  VK_6 = 54,
  VK_7 = 55,
  VK_8 = 56,
  VK_9 = 57,
  VK_A = 65,
  VK_B = 66,
  VK_C = 67,
  VK_D = 68,
  VK_E = 69,
  VK_F = 70,
  VK_G = 71,
  VK_H = 72,
  VK_I = 73,
  VK_J = 74,
  VK_K = 75,
  VK_L = 76,
  VK_M = 77,
  VK_N = 78,
  VK_O = 79,
  VK_P = 80,
  VK_Q = 81,
  VK_R = 82,
  VK_S = 83,
  VK_T = 84,
  VK_U = 85,
  VK_V = 86,
  VK_W = 87,
  VK_X = 88,
  VK_Y = 89,
  VK_Z = 90,
 VK_LWIN           =  #5B,
 VK_RWIN           =  #5C,
 VK_APPS           =  #5D,
 VK_SLEEP          =  #5F,
 VK_NUMPAD0        =  #60,
 VK_NUMPAD1        =  #61,
 VK_NUMPAD2        =  #62,
 VK_NUMPAD3        =  #63,
 VK_NUMPAD4        =  #64,
 VK_NUMPAD5        =  #65,
 VK_NUMPAD6        =  #66,
 VK_NUMPAD7        =  #67,
 VK_NUMPAD8        =  #68,
 VK_NUMPAD9        =  #69,
 VK_MULTIPLY       =  #6A,
 VK_ADD            =  #6B,
 VK_SEPARATOR      =  #6C,
 VK_SUBTRACT       =  #6D,
 VK_DECIMAL        =  #6E,
 VK_DIVIDE         =  #6F,
 VK_F1             =  #70,
 VK_F2             =  #71,
 VK_F3             =  #72,
 VK_F4             =  #73,
 VK_F5             =  #74,
 VK_F6             =  #75,
 VK_F7             =  #76,
 VK_F8             =  #77,
 VK_F9             =  #78,
 VK_F10            =  #79,
 VK_F11            =  #7A,
 VK_F12            =  #7B,
 VK_F13            =  #7C,
 VK_F14            =  #7D,
 VK_F15            =  #7E,
 VK_F16            =  #7F,
 VK_F17            =  #80,
 VK_F18            =  #81,
 VK_F19            =  #82,
 VK_F20            =  #83,
 VK_F21            =  #84,
 VK_F22            =  #85,
 VK_F23            =  #86,
 VK_F24            =  #87,
 VK_NUMLOCK        =  #90,
 VK_SCROLL         =  #91,
 VK_OEM_NEC_EQUAL  =  #92,   -- '=' key on numpad
 VK_OEM_FJ_JISHO   =  #92,   -- 'Dictionary' key
 VK_OEM_FJ_MASSHOU =  #93,   -- 'Unregister word' key
 VK_OEM_FJ_TOUROKU =  #94,   -- 'Register word' key
 VK_OEM_FJ_LOYA    =  #95,   -- 'Left OYAYUBI' key
 VK_OEM_FJ_ROYA    =  #96,   -- 'Right OYAYUBI' key
 VK_LSHIFT         =  #A0,
 VK_RSHIFT         =  #A1,
 VK_LCONTROL       =  #A2,
 VK_RCONTROL       =  #A3,
 VK_LMENU          =  #A4,
 VK_RMENU          =  #A5,
 VK_BROWSER_BACK        =  #A6,
 VK_BROWSER_FORWARD     =  #A7,
 VK_BROWSER_REFRESH     =  #A8,
 VK_BROWSER_STOP        =  #A9,
 VK_BROWSER_SEARCH      =  #AA,
 VK_BROWSER_FAVORITES   =  #AB,
 VK_BROWSER_HOME        =  #AC,
 VK_VOLUME_MUTE         =  #AD,
 VK_VOLUME_DOWN         =  #AE,
 VK_VOLUME_UP           =  #AF,
 VK_MEDIA_NEXT_TRACK    =  #B0,
 VK_MEDIA_PREV_TRACK    =  #B1,
 VK_MEDIA_STOP          =  #B2,
 VK_MEDIA_PLAY_PAUSE    =  #B3,
 VK_LAUNCH_MAIL         =  #B4,
 VK_LAUNCH_MEDIA_SELECT =  #B5,
 VK_LAUNCH_APP1         =  #B6,
 VK_LAUNCH_APP2         =  #B7,
 VK_OEM_1          =  #BA,   -- ';:' for US
 VK_OEM_PLUS       =  #BB,   -- '+' any country
 VK_OEM_COMMA      =  #BC,   -- ',' any country
 VK_OEM_MINUS      =  #BD,   -- '-' any country
 VK_OEM_PERIOD     =  #BE,   -- '.' any country
 VK_OEM_2          =  #BF,   -- '/?' for US
 VK_OEM_3          =  #C0,   -- '`~' for US
 VK_OEM_4          =  #DB,  --  '[{' for US
 VK_OEM_5          =  #DC,  --  '\|' for US
 VK_OEM_6          =  #DD,  --  ']}' for US
 VK_OEM_7          =  #DE,  --  ''"' for US
 VK_OEM_8          =  #DF,
 VK_OEM_AX         =  #E1,  --  'AX' key on Japanese AX kbd
 VK_OEM_102        =  #E2,  --  "<>" or "\|" on RT 102-key kbd.
 VK_ICO_HELP       =  #E3,  --  Help key on ICO
 VK_ICO_00         =  #E4,  --  00 key on ICO
 VK_PROCESSKEY     =  #E5,
 VK_ICO_CLEAR      =  #E6,
 VK_PACKET         =  #E7,
 VK_OEM_RESET      =  #E9,
 VK_OEM_JUMP       =  #EA,
 VK_OEM_PA1        =  #EB,
 VK_OEM_PA2        =  #EC,
 VK_OEM_PA3        =  #ED,
 VK_OEM_WSCTRL     =  #EE,
 VK_OEM_CUSEL      =  #EF,
 VK_OEM_ATTN       =  #F0,
 VK_OEM_FINISH     =  #F1,
 VK_OEM_COPY       =  #F2,
 VK_OEM_AUTO       =  #F3,
 VK_OEM_ENLW       =  #F4,
 VK_OEM_BACKTAB    =  #F5,
 VK_ATTN           =  #F6,
 VK_CRSEL          =  #F7,
 VK_EXSEL          =  #F8,
 VK_EREOF          =  #F9,
 VK_PLAY           =  #FA,
 VK_ZOOM           =  #FB,
 VK_NONAME         =  #FC,
 VK_PA1            =  #FD,
 VK_OEM_CLEAR      =  #FE,

    IDC_ARROW       = 32512, 
    IDC_IBEAM       = 32513, 
    IDC_WAIT        = 32514,
    IDC_CROSS       = 32515, 
    IDC_UPARROW     = 32516, 
    IDC_SIZENWSE    = 32642, 
    IDC_SIZENESW    = 32643, 
    IDC_SIZEWE      = 32644, 
    IDC_SIZENS      = 32645, 
    IDC_SIZEALL     = 32646, 
    IDC_NO          = 32648, 
    IDC_APPSTARTING = 32650, 
    IDC_HELP        = 32651

--ToolTips styles 
global constant TTS_ALWAYSTIP = #0001,
            TTS_NOPREFIX    =   #0002,
            TTS_NOANIMATE   =   #0010,
            TTS_NOFADE      =   #0020,
            TTS_BALLOON     =   #0040,
            TTS_CLOSE       =   #0080,

-- #if (_WIN32_WINNT >= 0x0600)
            TTS_USEVISUALSTYLE= #0100,


-- /* ToolTips flags */
TTF_IDISHWND    =           #00000001,
    TTF_CENTERTIP   =   #00000002,
    TTF_RTLREADING  =   #00000004,
    TTF_SUBCLASS    =   #00000010,
-- #if (_WIN32_IE >= 0x0300)
    TTF_TRACK       =#00000020,
    TTF_ABSOLUTE    =#00000080,
    TTF_TRANSPARENT =#00000100,
-- #endif
-- #if (_WIN32_IE >= 0x0501)
    TTF_PARSELINKS  =#00001000,
-- #endif
-- #if (_WIN32_IE >= 0x0300)
    TTF_DI_SETITEM  =#00008000,
-- #endif

-- /* ToolTips delay time flags */
    TTDT_AUTOMATIC  =0,
    TTDT_RESHOW =   1,
    TTDT_AUTOPOP=   2,
    TTDT_INITIAL=   3,

-- /* ToolTips icons */
    TTI_NONE    =           0,
    TTI_INFO    =           1,
    TTI_WARNING =           2,
    TTI_ERROR   =           3,
-- #if (_WIN32_WINNT >= 0x0600)
    TTI_INFO_LARGE  =   4,
    TTI_WARNING_LARGE=  5,
    TTI_ERROR_LARGE =   6,
-- #endif

-- /* ToolTips messages */
    TTM_ACTIVATE    =       (WM_USER + 1),
    TTM_SETDELAYTIME=       (WM_USER + 3),
    TTM_ADDTOOLA=           (WM_USER + 4),
    TTM_DELTOOLA=           (WM_USER + 5),
    TTM_NEWTOOLRECTA=       (WM_USER + 6),
    TTM_RELAYEVENT  =       (WM_USER + 7),
    TTM_GETTOOLINFOA=       (WM_USER + 8),
    TTM_SETTOOLINFOA=       (WM_USER + 9),
    TTM_HITTESTA    =       (WM_USER + 10),
    TTM_GETTEXTA    =       (WM_USER + 11),
    TTM_UPDATETIPTEXTA  =   (WM_USER + 12),
    TTM_GETTOOLCOUNT    =   (WM_USER + 13),
    TTM_ENUMTOOLSA      =   (WM_USER + 14),
    TTM_GETCURRENTTOOLA =   (WM_USER + 15),
    TTM_WINDOWFROMPOINT =   (WM_USER + 16),
-- #if (_WIN32_IE >= 0x0300)
    TTM_TRACKACTIVATE=  (WM_USER + 17),
    TTM_TRACKPOSITION=  (WM_USER + 18),
    TTM_SETTIPBKCOLOR=  (WM_USER + 19),
    TTM_SETTIPTEXTCOLOR= (WM_USER + 20),
    TTM_GETDELAYTIME=   (WM_USER + 21),
    TTM_GETTIPBKCOLOR=  (WM_USER + 22),
    TTM_GETTIPTEXTCOLOR= (WM_USER + 23),
    TTM_SETMAXTIPWIDTH= (WM_USER + 24),
    TTM_GETMAXTIPWIDTH= (WM_USER + 25), 
    TTM_SETMARGIN   =   (WM_USER + 26),
    TTM_GETMARGIN   =   (WM_USER + 27),
    TTM_POP         =   (WM_USER + 28),
-- #endif
-- #if (_WIN32_IE >= 0x0400)
TTM_UPDATE  =       (WM_USER + 29),
-- #endif
-- #if (_WIN32_IE >= 0x0500)
TTM_GETBUBBLESIZE=  (WM_USER + 30),
TTM_ADJUSTRECT  =   (WM_USER + 31),
TTM_SETTITLEA   =   (WM_USER + 32),
TTM_SETTITLEW   =   (WM_USER + 33),
-- #endif
-- #if (_WIN32_WINNT >= 0x0501)
TTM_POPUP   =       (WM_USER + 34),
TTM_GETTITLE=       (WM_USER + 35),
-- #endif
--#define TTM_ADDTOOLW          (WM_USER + 50),
--#define TTM_DELTOOLW          (WM_USER + 51),
--#define TTM_NEWTOOLRECTW      (WM_USER + 52),
--#define TTM_GETTOOLINFOW      (WM_USER + 53),
--#define TTM_SETTOOLINFOW      (WM_USER + 54),
--#define TTM_HITTESTW          (WM_USER + 55),
--#define TTM_GETTEXTW          (WM_USER + 56),
--#define TTM_UPDATETIPTEXTW        (WM_USER + 57),
--#define TTM_ENUMTOOLSW            (WM_USER + 58),
--#define TTM_GETCURRENTTOOLW   (WM_USER + 59),
-- #if (_WIN32_WINNT >= 0x0501)
--  #define TTM_SETWINDOWTHEME  CCM_SETWINDOWTHEME
-- #endif
-- #ifdef UNICODE
--TTM_ADDTOOL       TTM_ADDTOOLW
--TTM_DELTOOL       TTM_DELTOOLW
--TTM_NEWTOOLRECT   TTM_NEWTOOLRECTW
--TTM_GETTOOLINFO   TTM_GETTOOLINFOW
--TTM_SETTOOLINFO   TTM_SETTOOLINFOW
--TTM_HITTEST       TTM_HITTESTW
--TTM_GETTEXT       TTM_GETTEXTW
--TTM_UPDATETIPTEXT TTM_UPDATETIPTEXTW
--TTM_ENUMTOOLS     TTM_ENUMTOOLSW
--TTM_GETCURRENTTOOL    TTM_GETCURRENTTOOLW
--  #if (_WIN32_IE >= 0x0500)
--      #define TTM_SETTITLE    TTM_SETTITLEW
--  #endif
-- #else
TTM_ADDTOOL =       TTM_ADDTOOLA,
TTM_DELTOOL =       TTM_DELTOOLA,
TTM_NEWTOOLRECT =   TTM_NEWTOOLRECTA,
TTM_GETTOOLINFO =   TTM_GETTOOLINFOA,
TTM_SETTOOLINFO =   TTM_SETTOOLINFOA,
TTM_HITTEST     =   TTM_HITTESTA,
TTM_GETTEXT     =   TTM_GETTEXTA,
TTM_UPDATETIPTEXT=  TTM_UPDATETIPTEXTA,
TTM_ENUMTOOLS   =   TTM_ENUMTOOLSA,
TTM_GETCURRENTTOOL= TTM_GETCURRENTTOOLA,
--  #if (_WIN32_IE >= 0x0500)
TTM_SETTITLE=   TTM_SETTITLEA,
--  #endif
-- #endif

-- /* ToolTips notifications */
TTN_FIRST       =   (0-520),
TTN_GETDISPINFOA=   (TTN_FIRST - 0),
TTN_SHOW        =   (TTN_FIRST - 1),
TTN_POP         =   (TTN_FIRST - 2),
TTN_LINKCLICK   =   (TTN_FIRST - 3),
--#define TTN_GETDISPINFOW  (TTN_FIRST - 10)
-- #ifdef UNICODE
--  #define TTN_GETDISPINFO TTN_GETDISPINFOW
-- #else
    TTN_GETDISPINFO =TTN_GETDISPINFOA,
-- #endif
TTN_NEEDTEXTA=      TTN_GETDISPINFOA,
--#define TTN_NEEDTEXTW     TTN_GETDISPINFOW
TTN_NEEDTEXT=       TTN_GETDISPINFO



-- Fonthandlin Stuff
--/* Output precision values */
global constant 
OUT_DEFAULT_PRECIS  =   0,
OUT_STRING_PRECIS   =       1,
OUT_CHARACTER_PRECIS    =   2,
OUT_STROKE_PRECIS       =   3,
OUT_TT_PRECIS           =   4,
OUT_DEVICE_PRECIS       =   5,
OUT_RASTER_PRECIS       =   6,
OUT_TT_ONLY_PRECIS      =   7,
OUT_OUTLINE_PRECIS      =   8,
OUT_SCREEN_OUTLINE_PRECIS   = 9,
OUT_PS_ONLY_PRECIS      =   10

--/* Font weights */
global constant 
FW_DONTCARE =   0,
FW_THIN     =   100,
FW_EXTRALIGHT=  200,
FW_LIGHT    =   300,
FW_NORMAL   =   400,
FW_MEDIUM   =   500,
FW_SEMIBOLD =   600,
FW_BOLD     =   700,
FW_EXTRABOLD=   800,
FW_HEAVY    =   900,
FW_ULTRALIGHT=  FW_EXTRALIGHT,
FW_REGULAR  =   FW_NORMAL,
FW_DEMIBOLD =   FW_SEMIBOLD,
FW_ULTRABOLD=   FW_EXTRABOLD,
FW_BLACK    =   FW_HEAVY


--/* Character sets */
global constant 
ANSI_CHARSET        =   0,
DEFAULT_CHARSET     =   1,
SYMBOL_CHARSET      =   2,
SHIFTJIS_CHARSET    =   128,
HANGEUL_CHARSET     =   129,
HANGUL_CHARSET      =   129,
GB2312_CHARSET      =   134,
CHINESEBIG5_CHARSET =   136,
OEM_CHARSET         =   255,
JOHAB_CHARSET   =   130,
HEBREW_CHARSET  =   177,
ARABIC_CHARSET  =   178,
GREEK_CHARSET   =   161,
TURKISH_CHARSET =   162,
VIETNAMESE_CHARSET= 163,
THAI_CHARSET    =   222,
EASTEUROPE_CHARSET= 238,
RUSSIAN_CHARSET =   204,
MAC_CHARSET     =   77,
BALTIC_CHARSET  =   186

--/* Font families */
global constant 
FF_DONTCARE =   #00,
FF_ROMAN    =   #10,
FF_SWISS    =   #20,
FF_MODERN   =   #30,
FF_SCRIPT   =   #40,
FF_DECORATIVE=  #50

--ChooseFont
global constant CF_APPLY = 512,
  CF_ANSIONLY =  #400,
  CF_BOTH = 3,
  CF_TTONLY =  #40000,
  CF_EFFECTS = 256,
  CF_ENABLEHOOK = 8,
  CF_ENABLETEMPLATE = 16,
  CF_ENABLETEMPLATEHANDLE = 32,
  CF_FIXEDPITCHONLY =  #4000,
  CF_FORCEFONTEXIST =  #10000,
  CF_INITTOLOGFONTSTRUCT = 64,
  CF_LIMITSIZE =  #2000,
  CF_NOOEMFONTS =  #800,
  CF_NOFACESEL =  #80000,
  CF_NOSCRIPTSEL =  #800000,
  CF_NOSTYLESEL =  #100000,
  CF_NOSIZESEL =  #200000,
  CF_NOSIMULATIONS = 4096,
  CF_NOVECTORFONTS =  #800,
  CF_NOVERTFONTS =  #1000000,
  CF_PRINTERFONTS = 2,
  CF_SCALABLEONLY =  #20000,
  CF_SCREENFONTS = 1,
  CF_SCRIPTSONLY =  #400,
  CF_SELECTSCRIPT =  #400000,
  CF_SHOWHELP = 4,
  CF_USESTYLE = 128,
  CF_WYSIWYG =  #8000,
  BOLD_FONTTYPE = 256,
  ITALIC_FONTTYPE = 512,
  PRINTER_FONTTYPE =  #4000,
  REGULAR_FONTTYPE =  #400,
  SCREEN_FONTTYPE =  #2000,
  SIMULATED_FONTTYPE =  #8000,
  LF_FACESIZE = 32,
  LF_FULLFACESIZE = 64

--/* Clip precision values */
global constant 
CLIP_DEFAULT_PRECIS =   #00,
CLIP_CHARACTER_PRECIS=  #01,
CLIP_STROKE_PRECIS  =   #02,
CLIP_MASK           =   #0F,
CLIP_LH_ANGLES      =   #10,
CLIP_TT_ALWAYS      =   #20,
CLIP_DFA_DISABLE=   #40,
CLIP_EMBEDDED   =       #80



--/* Quality values */
global constant 
DEFAULT_QUALITY         =   0,
DRAFT_QUALITY           =   1,
PROOF_QUALITY           =   2,
NONANTIALIASED_QUALITY  =   3,
ANTIALIASED_QUALITY     =   4,
CLEARTYPE_QUALITY       =   5,
CLEARTYPE_NATURAL_QUALITY=  6

--/* Pitch values */
global constant 
DEFAULT_PITCH   =#00,
FIXED_PITCH     =#01,
VARIABLE_PITCH  =#02,
MONO_FONT   =#08

/* Ternary raster operations */
global constant 
SRCCOPY     =           #00CC0020,
SRCPAINT    =  #00EE0086,
SRCAND      =      #008800C6,
SRCINVERT   =     #00660046,
SRCERASE    =   #00440328,
NOTSRCCOPY  =   #00330008,
NOTSRCERASE =#001100A6,
MERGECOPY   =#00C000CA,
MERGEPAINT  =   #00BB0226,
PATCOPY     =#00F00021,
PATPAINT    =   #00FB0A09,
PATINVERT   =#005A0049,
DSTINVERT   =#00550009,
BLACKNESS   =#00000042,
WHITENESS   =#00FF0062,
NOMIRRORBITMAP  =#80000000,
CAPTUREBLT      =#40000000

-- This is "real" old stuff .....
-- Backgroundmodes for SetBGMode etc.

global constant TRANSPARENT = 1,
                OPAQUE          =2

global sequence form_spec_def
        form_spec_def = "%d"
global constant form_spec_hex ="%x",
                form_spec_oct ="%o",
                form_spec_float ="%f",
                form_spec_exp ="%e",
                form_spec_auto ="%g",
                form_spec_string="%s",
                form_spec_dec="%d"
                                


global constant VersionInfoSize = 0 
global constant MajorVersion = 4
global constant MinorVersion  = 8
global constant BuildNumber = 12 
global constant PlatformId = 16 
global constant CSDVersion = 20

global atom WINVERSIONMAJOR,
            WINVERSIONMINOR,
            BUILDNUMBER,
            PLATFORMID,
            WINVER


global sequence SERVICEPACK,
                WINVERSION
                
-- These are the Constants for CreateWindow and RegisterWindowClass

global constant cbSize = 0,
         style  = 4,
         lpfnWndProc = 8,
         cbClsExtra = 12,
         cbWndExtra = 16,
         hInstance  = 20,
         hIcon      = 24,
         hCursor    = 28,
         hbrBackground = 32,
         lpszMenuName  = 36,
         lpszClassName = 40,
         hIconSm = 44,
         SIZE_OF_WNDCLASS = 48

global constant SIZE_OF_MESSAGE = 40,
                SIZE_OF_OSVERSIONINFO =148,
                SIZE_OF_kbdllhookstruct = 20

global constant VER_PLATFORM_WIN32s = 0,                                        --Win32s on Windows 3.1. 
                VER_PLATFORM_WIN32_WINDOWS = 1,                                 --Win32 on Windows 95.
                VER_PLATFORM_WIN32_NT = 2                                       --Win32 NT

        
global constant GW_HWNDNEXT     = 2,
                    GW_HWNDPREV =3

global constant CS_HREDRAW = 2,
            CS_VREDRAW = 1

global constant SW_SHOWNORMAL = 1,
                SW_HIDE = 0,
                SW_MINIMIZE=6,
                SW_SHOWMINIMIZED = 2,
                SW_SHOWMAXIMIZE = 3,
                SW_MAXIMIZE = 3,
                SW_RESTORE = 9,
                SW_SHOW=5

global constant SND_FILENAME = #00020000,
         SND_ASYNC    = #00000001
         
global constant DT_SINGLELINE = #0020,
         DT_CENTER     = #0001,
         DT_VCENTER    = #0004



      
-- global constant IDC_ARROW = 32512,

global constant      CW_USEDEFAULT = #80000000
        
-- Brushes

--global constant WHITE_BRUSH =0,
--       LTGRAY_BRUSH =1,
--       GRAY_BRUSH = 2,
--       DKGRAY_BRUSH = 3,
--       BLACK_BRUSH =4,
--       NULL_BRUSH=5,
--       DC_BRUSH=18,
--       HOLLOW_BRUSH = NULL_BRUSH
        
-- END CONSTANTS FOR MYAPI32 --     
