Module Winuser.pkg

     1
     2Use DFTypes.pkg     // DataFlex Types (structures)
     3
     4Handle EXTKEY
     5MOVE 16777216 TO extkey
     6
     7// Scroll Bar Constants
     8Define SB_HORZ          for 0
     9Define SB_VERT          for 1
    10Define SB_CTL           for 2
    11Define SB_BOTH          for 3
    12
    13// scrollInfo stucture constants
    14
    15Define SIF_RANGE           for |CI$0001
    16Define SIF_PAGE            for |CI$0002
    17Define SIF_POS             for |CI$0004
    18Define SIF_DISABLENOSCROLL for |CI$0008
    19Define SIF_TRACKPOS        for |CI$0010
    20Define SIF_ALL             for (SIF_RANGE ior SIF_PAGE ior SIF_POS ior SIF_TRACKPOS)
    21
    22
    23
    24// Scroll Bar Commands
    25Define SB_LINEUP        for 0
    26Define SB_LINELEFT      for 0
    27Define SB_LINEDOWN      for 1
    28Define SB_LINERIGHT     for 1
    29Define SB_PAGEUP        for 2
    30Define SB_PAGELEFT      for 2
    31Define SB_PAGEDOWN      for 3
    32Define SB_PAGERIGHT     for 3
    33Define SB_THUMBPOSITION for 4
    34Define SB_THUMBTRACK    for 5
    35Define SB_TOP           for 6
    36Define SB_LEFT          for 6
    37Define SB_BOTTOM        for 7
    38Define SB_RIGHT         for 7
    39Define SB_ENDSCROLL     for 8
    40
    41External_Function AnsiToOem 'CharToOemA' User32.dll ;
    42    Pointer lpszAnsi Pointer lpszOem Returns Integer
    43
    44External_Function AppendMenu "AppendMenuA" User32.dll ;
    45    Handle hMenu Integer flags Integer NewItem STRING val Returns Integer
    46
    47External_Function ArrangeIcons "ArrangeIconicWindows" User32.dll ;
    48    Handle hWnd Returns Integer
    49
    50External_Function BeginPaint "BeginPaint" User32.dll ;
    51    Handle hWnd Pointer lpPS Returns Handle
    52
    53External_Function ClientToScreen "ClientToScreen" User32.dll ;
    54    Handle hWnd Pointer lpsPoint Returns Integer
    55
    56External_Function CreatePopupMenu "CreatePopupMenu" User32.dll ;
    57    Returns Handle
    58
    59// Creates an overlapped, pop-up, or child window with an extended window style.
    60External_Function CreateWindowEx "CreateWindowExA" USER32.DLL ;
    61    DWord dwExStyle ;                   // The extended window style of the window being created. 
    62    Pointer lpClassName ;               // The window class name. The class name can be any name registered with RegisterClass or RegisterClassEx
    63    Pointer lpWindowName ;              // The window name.
    64    DWord dwStyle ;                     // The style of the window being created.
    65    Integer iX Integer iY ;             // The initial horizontal and vertival position of the window
    66    Integer nWidth Integer nHeight ;    // The width and height, in device units, of the window.
    67    Handle hWndParent ;                 // Handle to the parent or owner window of the window being created.
    68    Handle hMenu ;                      // Handle to a menu, or specifies a child-window identifier, depending on the window style.
    69    Handle hInstance ;                  // Handle to the instance of the module to be associated with the window.
    70    Pointer lpParam ;                   // Pointer to a value to be passed to the window through the CREATESTRUCT structure.
    71    Returns Handle                      // If the function succeeds, the return value is a handle to the new window.
    72
    73
    74// Destroys the specified window.
    75External_Function DestroyWindow "DestroyWindow" USER32.DLL Handle hWnd Returns Integer
    76
    77External_Function DestroyIcon "DestroyIcon" User32.dll Handle hIcon Returns Integer
    78
    79External_Function DestroyCursor "DestroyCursor" User32.dll Handle hIcon Returns Integer
    80
    81External_Function DrawText 'DrawTextA' User32.dll ;
    82    Handle  hDC Pointer lpsz DWORD cb Pointer lprc DWORD fuFormat RETURNS Integer
    83
    84External_Function EnableMenuItem "EnableMenuItem" User32.dll ;
    85    Handle hmenu Integer uitem Integer uFlags Returns Integer
    86
    87External_Function EndPaint "EndPaint" User32.dll ;
    88    Handle hWnd Pointer lpPS Returns Handle
    89
    90External_Function FindWindow "FindWindowA" User32.dll ;
    91    String sClassName String sCaption Returns Handle
    92
    93External_Function GetAsyncKeyState "GetAsyncKeyState" User32.dll ;
    94    DWORD vkey Returns Integer
    95
    96External_Function GetClassLong "GetClassLongA" ;
    97    User32.DLL Integer hWnd Integer Offset Returns Integer
    98
    99External_Function GetClientRect 'GetClientRect' User32.dll ;
   100    Handle hwnd Pointer lprect Returns Integer
   101
   102External_Function GetCursorPos "GetCursorPos" User32.dll ;
   103    Pointer lppoint Returns Integer
   104
   105External_Function GetDesktopWindow "GetDesktopWindow" User32.dll ;
   106    Returns Handle
   107
   108External_Function GetDC "GetDC" User32.dll  ;
   109    Handle hWnd  Returns Integer
   110
   111External_Function GetKeyboardState "GetKeyboardState" User32.dll ;
   112    Pointer lpkeystate Returns Integer
   113
   114External_Function GetKeyState "GetKeyState" User32.dll ;
   115    DWORD vkey Returns Integer
   116
   117External_Function GetSysColor "GetSysColor" User32.dll ;
   118    DWORD nSysColor Returns DWORD
   119
   120External_Function GetWindowLong "GetWindowLongA" User32.dll ;
   121    Integer hWnd Integer offset Returns Integer
   122
   123External_Function GetWindowPlacement "GetWindowPlacement" User32.dll ;
   124    Handle hWnd Pointer lpsWndPl Returns Integer
   125
   126External_Function GetWindowRect 'GetWindowRect' User32.dll ;
   127    Handle hwnd Pointer lprect Returns Integer
   128
   129External_Function GetWindow "GetWindow" User32.dll ;
   130    Handle hWnd Integer fuRel Returns Handle
   131
   132External_Function GetWindowText "GetWindowTextA" User32.dll ;
   133    Handle hWnd Pointer lpsText INTEGER cbText Returns Integer
   134
   135External_Function GetWindowWord "GetWindowWord" User32.dll ;
   136    Handle hWnd DWORD  nOffset Returns Integer
   137
   138External_Function InitCommonControls "InitCommonControls" COMCTL32.DLL ;
   139    Returns Integer
   140
   141External_Function InvalidateRect "InvalidateRect" User32.dll ;
   142    Handle hWnd Pointer lpRect DWORD fReDraw Returns Integer
   143
   144External_Function IsClipboardFormatAvailable "IsClipboardFormatAvailable" User32.dll ;
   145    DWord dwFormat Returns Integer
   146
   147External_Function LoadCursor "LoadCursorA" User32.DLL ;
   148    Integer hCursor Pointer ResourceID Returns Integer
   149
   150External_Function LoadImage "LoadImageA" User32.dll ;
   151   Integer hInst String sImage Integer iType Integer cx Integer cy Integer iFlags Returns Handle
   152
   153External_Function LoadResourceCursor "LoadCursorA" User32.DLL ;
   154    HANDLE hModule STRING resid RETURNS HANDLE
   155
   156External_Function PostMessage 'PostMessageA' User32.dll ;
   157    Handle hwnd Handle uMsg DWORD wParam DWORD lParam Returns Integer
   158
   159External_Function ReleaseDC "ReleaseDC" User32.dll  ;
   160    Handle hWnd  Handle hDC  Returns Integer
   161
   162External_Function ScreenToClient 'ScreenToClient' User32.dll ;
   163    Handle hwnd Pointer lppt Returns Integer
   164
   165External_Function SendMessage 'SendMessageA' User32.dll ;
   166    Handle hwnd Handle uMsg DWORD wParam DWORD lParam Returns Integer
   167
   168External_Function SetCapture "SetCapture" User32.dll ;
   169    Handle hWnd Returns Integer
   170
   171External_Function SetClassLong "SetClassLongA" User32.DLL ;
   172    Integer hWnd Integer Offset Integer NewLong Returns Integer
   173
   174External_Function SetCursor "SetCursor" User32.DLL ;
   175    Integer hCursor Returns Integer
   176
   177External_Function SetFocus 'SetFocus' User32.dll ;
   178    Handle hwnd Returns Integer
   179
   180External_Function SetForegroundWindow "SetForegroundWindow" User32.dll ;
   181    Handle hWnd Returns Integer
   182
   183External_Function GetForegroundWindow "GetForegroundWindow" User32.dll ;
   184    Returns Integer
   185
   186External_Function SetKeyboardState "SetKeyboardState" User32.dll ;
   187    Pointer lpkeystate Returns Integer
   188
   189External_Function SetScrollPos 'SetScrollPos' User32.dll ;
   190    Handle hWnd DWORD fnBar DWORD iPos DWORD fnReDraw Returns Integer
   191
   192External_Function SetScrollRange 'SetScrollRange' User32.dll ;
   193    Handle hWnd DWORD fnBar DWORD iMin DWORD iMax DWORD fnReDraw Returns Integer
   194
   195External_Function SetWindowLong "SetWindowLongA" User32.dll ;
   196    Handle hwnd Integer idx NUMBER wlong Returns Integer
   197
   198External_Function SetWindowPos "SetWindowPos" User32.dll ;
   199    Handle hWnd Handle hWndAfter Integer x Integer y Integer cx Integer cy Integer uFlags Returns Integer
   200
   201External_Function SetWindowPlacement "SetWindowPlacement" User32.dll ;
   202  Handle hWnd Pointer lpwndpl ;
   203Returns Integer
   204
   205External_Function SetWindowText "SetWindowTextA" User32.dll ;
   206    Handle hWnd string sText Returns Integer
   207
   208External_Function ShowWindow 'ShowWindow' User32.dll ;
   209    Handle hwnd DWORD flag Returns Integer
   210
   211External_Function TrackPopupMenu "TrackPopupMenu" User32.dll ;
   212    Handle hmenu Integer flags Integer x Integer y Integer res Handle hWnd Pointer lprect Returns Integer
   213
   214External_Function WindowFromPoint "WindowFromPoint" User32.dll ;
   215    DWORD ptx DWORD pty Returns Handle
   216
   217External_Function EnableWindow 'EnableWindow' User32.dll ;
   218    Handle hWnd Integer bEnable Returns Integer
   219
   220External_Function UpdateWindow 'UpdateWindow' User32.dll Handle hWnd Returns DWORD
   221
   222External_Function OemToAnsi 'OemToCharA' User32.dll ;
   223    Pointer lpszAnsi Pointer lpszOem Returns Integer
   224
   225External_Function GetSystemMetrics "GetSystemMetrics" User32.dll ;
   226    Integer nIndex Returns Integer
   227
   228External_Function SystemParametersInfo "SystemParametersInfoA" User32.dll ;
   229    Dword uiAction Dword uiParam Pointer pvParam Dword fWinini Returns Integer
   230
   231External_Function IsWindow "IsWindow" User32.dll ;
   232    Handle hWnd Returns Integer
   233
   234External_Function GetParent "GetParent" User32.dll ;
   235    Handle hWnd ;
   236    Returns Handle
   237
   238External_Function IsWindowEnabled "IsWindowEnabled" User32.dll ;
   239    Handle hWnd ;
   240    Returns Boolean
   241
   242// updates the specified rectangle or region in a window's client area.
   243External_Function RedrawWindow "RedrawWindow" User32.dll ;
   244    Handle hWnd ;          // Handle to the window to be redrawn
   245    Pointer lpRcUpdate ;   // Pointer to a RECT structure containing the coordinates of the update rectangle. Ignored if the hrgnUpdate parameter identifies a region.
   246    Handle hrgnUpdate ;    // Handle to the update region. If both the hrgnUpdate and lprcUpdate parameters are NULL, the entire client area is added to the update region.
   247    Integer flags ;        // Specifies one or more redraw flags.
   248    Returns Boolean        // If the function succeeds, the return value is nonzero. If the Function fails, the return value is zero. 
   249
   250// GetMonitorInfo
   251// --------------
   252
   253// See also MonitorFromPoint, MonitorFromWindow
   254External_Function GetMonitorInfo "GetMonitorInfoA" user32.dll ;
   255    Handle hMonitor ;
   256    Pointer lpmi ;
   257    Returns Boolean
   258
   259// MonitorFromPoint
   260// ----------------
   261 
   262// Retrieves a handle to the display monitor that contains a specified point. 
   263// See also MonitorFromWindow, GetMonitorInfo
   264External_Function MonitorFromPoint "MonitorFromPoint" user32.dll ;
   265    DWord x ;
   266    DWord y ;           // Specifies the point of interest in virtual-screen coordinates. 
   267    DWord dwFlags ;     // Determines the function's return value if the window does not intersect any display monitor (e.g. MONITOR_DEFAULTTONEAREST)
   268    Returns Handle
   269
   270
   271// MonitorFromWindow
   272// -----------------
   273
   274// retrieves a handle to the display monitor that has the largest area of intersection with the bounding rectangle of a specified window.
   275// See also MonitorFromPoint, GetMonitorInfo
   276External_Function MonitorFromWindow "MonitorFromWindow" user32.dll ;
   277    Handle hWnd ;       // Handle to the window of interest
   278    DWord dwFlags ;     // Determines the function's return value if the window does not intersect any display monitor (e.g. MONITOR_DEFAULTTONEAREST)
   279    Returns Handle
   280
   281External_Function SetScrollInfo "SetScrollInfo" User32.dll ;
   282    Handle hwnd ;     // handle to window
   283    UInteger fnBar ;  // scroll bar type
   284    Pointer lpsi ;    // scroll parameters
   285    Boolean fRedraw ; // redraw flag
   286    Returns UInteger
   287
   288External_Function ScrollWindow "ScrollWindow" User32.dll ;
   289    Handle hWnd ;
   290    Integer XAmount ;
   291    Integer YAmount Pointer ;
   292    lpRect Pointer lpClipRect ;
   293    Returns Boolean
   294
   295External_Function GetScrollInfo "GetScrollInfo" User32.dll ; 
   296    Handle hwnd ;     // handle to window
   297    UInteger fnBar ;  // scroll bar type
   298    Pointer lpsi ;    // scroll parameters
   299    Returns UInteger
   300
   301External_Function MapVirtualKey "MapVirtualKeyA" User32.dll ;
   302    UInteger UInt UInteger uMapType Returns Integer
   303
   304Define SPI_GETWORKAREA for 48
   305
   306Move (InitCommonControls()) To WindowIndex
   307
   308// SetWindowPos defaults
   309#REPLACE SWP_NOSIZE     1
   310#REPLACE SWP_NOMOVE     2
   311#REPLACE SWP_NOZORDER   4
   312#REPLACE SWP_NOACTIVATE 16
   313#REPLACE SWP_DRAWFRAME  32
   314#REPLACE HWND_TOPMOST   -1
   315#REPLACE HWND_NOTOPMOST -2
   316
   317//======= Get/SetWindowLong Constants ======================================
   318
   319#replace GWL_EXSTYLE         (-20)
   320#replace GWL_STYLE           (-16)
   321
   322#REPLACE GWW_HINSTANCE       -6
   323
   324#replace WM_USER             |CI$0400
   325#REPLACE WM_SIZE             5
   326
   327#replace WM_ACTIVATE         |CI$0006
   328
   329//  WM_ACTIVATE state values
   330//
   331#replace     WA_INACTIVE     0
   332#replace     WA_ACTIVE       1
   333#replace     WA_CLICKACTIVE  2
   334
   335#replace CW_USEDEFAULT       |CI$80000000
   336
   337
   338// Mouse-Key constants
   339#REPLACE  MK_LBUTTON  |CI1
   340#REPLACE  MK_RBUTTON  |CI2
   341#REPLACE  MK_SHIFT    |CI4
   342#REPLACE  MK_CONTROL  |CI8
   343#REPLACE  MK_MBUTTON  |CI16
   344
   345
   346//====== COMMON CONTROL STYLES ================================================
   347
   348#replace CCS_TOP                 |CI$00000001
   349#replace CCS_NOMOVEY             |CI$00000002
   350#replace CCS_BOTTOM              |CI$00000003
   351#replace CCS_NORESIZE            |CI$00000004
   352#replace CCS_NOPARENTALIGN       |CI$00000008
   353#replace CCS_NOHILITE            |CI$00000010
   354#replace CCS_ADJUSTABLE          |CI$00000020
   355#replace CCS_NODIVIDER           |CI$00000040
   356
   357//*
   358// * ShowWindow() Commands
   359// */
   360#replace SW_HIDE             0
   361#replace SW_SHOWNORMAL       1
   362#replace SW_NORMAL           1
   363#replace SW_SHOWMINIMIZED    2
   364#replace SW_SHOWMAXIMIZED    3
   365#replace SW_MAXIMIZE         3
   366#replace SW_SHOWNOACTIVATE   4
   367#replace SW_SHOW             5
   368#replace SW_MINIMIZE         6
   369#replace SW_SHOWMINNOACTIVE  7
   370#replace SW_SHOWNA           8
   371#replace SW_RESTORE          9
   372#replace SW_SHOWDEFAULT      10
   373#replace SW_MAX              10
   374
   375//*
   376// * Button Control Styles
   377// */
   378#replace BS_PUSHBUTTON      |CI$00
   379#replace BS_DEFPUSHBUTTON   |CI$01
   380#replace BS_CHECKBOX        |CI$02
   381#replace BS_AUTOCHECKBOX    |CI$03
   382#replace BS_RADIOBUTTON     |CI$04
   383#replace BS_3STATE          |CI$05
   384#replace BS_AUTO3STATE      |CI$06
   385#replace BS_GROUPBOX        |CI$07
   386#replace BS_USERBUTTON      |CI$08
   387#replace BS_AUTORADIOBUTTON |CI$09
   388#replace BS_OWNERDRAW       |CI$0B
   389#replace BS_LEFTTEXT        |CI$20
   390
   391Define BS_TEXT         for |CI$0000
   392Define BS_ICON         for |CI$0040
   393Define BS_BITMAP       for |CI$0080
   394Define BS_LEFT         for |CI$0100
   395Define BS_RIGHT        for |CI$0200
   396Define BS_CENTER       for |CI$0300
   397Define BS_TOP          for |CI$0400
   398Define BS_BOTTOM       for |CI$0800
   399Define BS_VCENTER      for |CI$0C00
   400Define BS_PUSHLIKE     for |CI$1000
   401Define BS_MULTILINE    for |CI$2000
   402Define BS_NOTIFY       for |CI$4000
   403Define BS_FLAT         for |CI$8000
   404Define BS_RIGHTBUTTON  for BS_LEFTTEXT
   405
   406//*
   407// * User Button Notification Codes
   408// */
   409#replace BN_CLICKED         0
   410#replace BN_PAINT           1
   411#replace BN_HILITE          2
   412#replace BN_UNHILITE        3
   413#replace BN_DISABLE         4
   414#replace BN_DOUBLECLICKED   5
   415
   416//*
   417// * Button Control Messages
   418// */
   419#replace BM_GETCHECK        |CI$00F0
   420#replace BM_SETCHECK        |CI$00F1
   421#replace BM_GETSTATE        |CI$00F2
   422#replace BM_SETSTATE        |CI$00F3
   423#replace BM_SETSTYLE        |CI$00F4
   424
   425//
   426// * Window Styles
   427// */
   428#replace WS_OVERLAPPED       |CI$00000000
   429#replace WS_POPUP            |CI$80000000
   430#replace WS_CHILD            |CI$40000000
   431#replace WS_MINIMIZE         |CI$20000000
   432#replace WS_VISIBLE          |CI$10000000
   433#replace WS_DISABLED         |CI$08000000
   434#replace WS_CLIPSIBLINGS     |CI$04000000
   435#replace WS_CLIPCHILDREN     |CI$02000000
   436#replace WS_MAXIMIZE         |CI$01000000
   437#replace WS_CAPTION          |CI$00C00000
   438#replace WS_BORDER           |CI$00800000
   439#replace WS_DLGFRAME         |CI$00400000
   440#replace WS_VSCROLL          |CI$00200000
   441#replace WS_HSCROLL          |CI$00100000
   442#replace WS_SYSMENU          |CI$00080000
   443#replace WS_THICKFRAME       |CI$00040000
   444#replace WS_GROUP            |CI$00020000
   445#replace WS_TABSTOP          |CI$00010000
   446
   447#replace WS_MINIMIZEBOX      |CI$00020000
   448#replace WS_MAXIMIZEBOX      |CI$00010000
   449
   450#replace WS_TILED            WS_OVERLAPPED
   451#replace WS_ICONIC           WS_MINIMIZE
   452#replace WS_SIZEBOX          WS_THICKFRAME
   453#replace WS_TILEDWINDOW      WS_OVERLAPPEDWINDOW
   454
   455//*
   456// * Common Window Styles
   457 //*/
   458#replace WS_OVERLAPPEDWINDOW (WS_OVERLAPPED    + ;
   459                             WS_CAPTION        + ;
   460                             WS_SYSMENU        + ;
   461                             WS_THICKFRAME     + ;
   462                             WS_MINIMIZEBOX    + ;
   463                             WS_MAXIMIZEBOX)
   464
   465#replace WS_POPUPWINDOW      (WS_POPUP          + ;
   466                             WS_BORDER          + ;
   467                             WS_SYSMENU)
   468
   469#replace WS_CHILDWINDOW      (WS_CHILD)
   470
   471//*
   472// * Extended Window Styles
   473 //*/
   474#replace WS_EX_DLGMODALFRAME     |CI$00000001
   475#replace WS_EX_NOPARENTNOTIFY    |CI$00000004
   476#replace WS_EX_TOPMOST           |CI$00000008
   477#replace WS_EX_ACCEPTFILES       |CI$00000010
   478#replace WS_EX_TRANSPARENT       |CI$00000020
   479#replace WS_EX_MDICHILD          |CI$00000040
   480#replace WS_EX_TOOLWINDOW        |CI$00000080
   481#replace WS_EX_WINDOWEDGE        |CI$00000100
   482#replace WS_EX_CLIENTEDGE        |CI$00000200
   483#replace WS_EX_CONTEXTHELP       |CI$00000400
   484
   485#replace WS_EX_RIGHT             |CI$00001000
   486#replace WS_EX_LEFT              |CI$00000000
   487#replace WS_EX_RTLREADING        |CI$00002000
   488#replace WS_EX_LTRREADING        |CI$00000000
   489#replace WS_EX_LEFTSCROLLBAR     |CI$00004000
   490#replace WS_EX_RIGHTSCROLLBAR    |CI$00000000
   491
   492#replace WS_EX_CONTROLPARENT     |CI$00010000
   493#replace WS_EX_STATICEDGE        |CI$00020000
   494#replace WS_EX_APPWINDOW         |CI$00040000
   495
   496#replace WS_EX_OVERLAPPEDWINDOW  (WS_EX_WINDOWEDGE + WS_EX_CLIENTEDGE)
   497#replace WS_EX_PALETTEWINDOW     (WS_EX_WINDOWEDGE + WS_EX_TOOLWINDOW + WS_EX_TOPMOST)
   498
   499//*
   500// * Edit Control Styles
   501// */
   502#replace ES_LEFT             |CI$0000
   503#replace ES_CENTER           |CI$0001
   504#replace ES_RIGHT            |CI$0002
   505#replace ES_MULTILINE        |CI$0004
   506#replace ES_UPPERCASE        |CI$0008
   507#replace ES_LOWERCASE        |CI$0010
   508#replace ES_PASSWORD         |CI$0020
   509#replace ES_AUTOVSCROLL      |CI$0040
   510#replace ES_AUTOHSCROLL      |CI$0080
   511#replace ES_NOHIDESEL        |CI$0100
   512#replace ES_OEMCONVERT       |CI$0400
   513#replace ES_READONLY         |CI$0800
   514#replace ES_WANTRETURN       |CI$1000
   515#replace ES_NUMBER           |CI$2000
   516
   517//*
   518// * Edit Control Notification Codes
   519//*/
   520#replace EN_SETFOCUS         |CI$0100
   521#replace EN_KILLFOCUS        |CI$0200
   522#replace EN_CHANGE           |CI$0300
   523#replace EN_UPDATE           |CI$0400
   524#replace EN_ERRSPACE         |CI$0500
   525#replace EN_MAXTEXT          |CI$0501
   526#replace EN_HSCROLL          |CI$0601
   527#replace EN_VSCROLL          |CI$0602
   528
   529//*
   530// * Listbox Styles
   531// */
   532#replace LBS_NOTIFY            |CI$0001
   533#replace LBS_SORT              |CI$0002
   534#replace LBS_NOREDRAW          |CI$0004
   535#replace LBS_MULTIPLESEL       |CI$0008
   536#replace LBS_OWNERDRAWFIXED    |CI$0010
   537#replace LBS_OWNERDRAWVARIABLE |CI$0020
   538#replace LBS_HASSTRINGS        |CI$0040
   539#replace LBS_USETABSTOPS       |CI$0080
   540#replace LBS_NOINTEGRALHEIGHT  |CI$0100
   541#replace LBS_MULTICOLUMN       |CI$0200
   542#replace LBS_WANTKEYBOARDINPUT |CI$0400
   543#replace LBS_EXTENDEDSEL       |CI$0800
   544#replace LBS_DISABLENOSCROLL   |CI$1000
   545#replace LBS_NODATA            |CI$2000
   546#replace LBS_NOSEL             |CI$4000
   547#replace LBS_STANDARD          (LBS_NOTIFY + LBS_SORT + WS_VSCROLL + WS_BORDER)
   548
   549// ;win40  -- A lot of MF_* flags have been renamed as MFT_* and MFS_* flags */
   550//
   551// Menu flags for Add/Check/EnableMenuItem()
   552///
   553#replace MF_INSERT           |CI$00000000
   554#replace MF_CHANGE           |CI$00000080
   555#replace MF_APPEND           |CI$00000100
   556#replace MF_DELETE           |CI$00000200
   557#replace MF_REMOVE           |CI$00001000
   558
   559#replace MF_BYCOMMAND        |CI$00000000
   560#replace MF_BYPOSITION       |CI$00000400
   561
   562#replace MF_GRAYED           |CI$00000001
   563#replace MF_DISABLED         |CI$00000002
   564
   565#replace MF_USECHECKBITMAPS  |CI$00000200
   566
   567#replace MF_POPUP            |CI$00000010
   568
   569#replace MF_SYSMENU          |CI$00002000
   570#replace MF_HELP             |CI$00004000
   571#replace MF_MOUSESELECT      |CI$00008000
   572
   573#replace MF_END              |CI$00000080
   574
   575#replace MFT_STRING          |CI$00000000
   576#replace MFT_BITMAP          |CI$00000004
   577#replace MFT_MENUBARBREAK    |CI$00000020
   578#replace MFT_MENUBREAK       |CI$00000040
   579#replace MFT_OWNERDRAW       |CI$00000100
   580#replace MFT_RADIOCHECK      |CI$00000200
   581#replace MFT_SEPARATOR       |CI$00000800
   582#replace MFT_RIGHTORDER      |CI$00002000
   583#replace MFT_RIGHTJUSTIFY    |CI$00004000
   584
   585#replace MFS_GRAYED          |CI$00000003
   586#replace MFS_DISABLED        MFS_GRAYED
   587#replace MFS_CHECKED         |CI$00000008
   588#replace MFS_HILITE          |CI$00000080
   589#replace MFS_ENABLED         |CI$00000000
   590#replace MFS_UNCHECKED       |CI$00000000
   591#replace MFS_UNHILITE        |CI$00000000
   592#replace MFS_DEFAULT         |CI$00001000
   593
   594#replace MF_SEPARATOR        MFT_SEPARATOR
   595
   596#replace MF_CHECKED          MFS_CHECKED
   597#replace MF_ENABLED          MFS_ENABLED
   598#replace MF_UNCHECKED        MFS_UNCHECKED
   599#replace MF_UNHILITE         MFS_UNHILITE
   600
   601#replace MF_STRING           MFT_STRING
   602#replace MF_BITMAP           MFT_BITMAP
   603#replace MF_OWNERDRAW        MFT_OWNERDRAW
   604
   605#replace MF_MENUBARBREAK     MFT_MENUBARBREAK
   606#replace MF_MENUBREAK        MFT_MENUBREAK
   607
   608#replace MF_HILITE           MFS_HILITE
   609
   610#replace MF_DEFAULT          MFS_DEFAULT
   611#replace MF_RIGHTJUSTIFY     MFT_RIGHTJUSTIFY
   612
   613//
   614// Flags for TrackPopupMenu
   615//
   616#replace TPM_LEFTBUTTON      |CI$0000
   617#replace TPM_RIGHTBUTTON     |CI$0002
   618#replace TPM_LEFTALIGN       |CI$0000
   619#replace TPM_CENTERALIGN     |CI$0004
   620#replace TPM_RIGHTALIGN      |CI$0008
   621
   622#replace TPM_TOPALIGN        |CI$0000
   623#replace TPM_VCENTERALIGN    |CI$0010
   624#replace TPM_BOTTOMALIGN     |CI$0020
   625
   626#replace TPM_HORIZONTAL      |CI$0000
   627#replace TPM_VERTICAL        |CI$0040
   628#replace TPM_NONOTIFY        |CI$0080
   629#replace TPM_RETURNCMD       |CI$0100
   630
   631//
   632// Combo Box return Values
   633//
   634#replace CB_OKAY             0
   635#replace CB_ERR              (-1)
   636#replace CB_ERRSPACE         (-2)
   637
   638
   639//
   640// Combo Box Notification Codes
   641//
   642#replace CBN_ERRSPACE        (-1)
   643#replace CBN_SELCHANGE       1
   644#replace CBN_DBLCLK          2
   645#replace CBN_SETFOCUS        3
   646#replace CBN_KILLFOCUS       4
   647#replace CBN_EDITCHANGE      5
   648#replace CBN_EDITUPDATE      6
   649#replace CBN_DROPDOWN        7
   650#replace CBN_CLOSEUP         8
   651#replace CBN_SELENDOK        9
   652#replace CBN_SELENDCANCEL    10
   653
   654//
   655// Combo Box styles
   656//
   657#replace CBS_SIMPLE            |CI$0001
   658#replace CBS_DROPDOWN          |CI$0002
   659#replace CBS_DROPDOWNLIST      |CI$0003
   660#replace CBS_OWNERDRAWFIXED    |CI$0010
   661#replace CBS_OWNERDRAWVARIABLE |CI$0020
   662#replace CBS_AUTOHSCROLL       |CI$0040
   663#replace CBS_OEMCONVERT        |CI$0080
   664#replace CBS_SORT              |CI$0100
   665#replace CBS_HASSTRINGS        |CI$0200
   666#replace CBS_NOINTEGRALHEIGHT  |CI$0400
   667#replace CBS_DISABLENOSCROLL   |CI$0800
   668
   669//
   670// Combo Box messages
   671//
   672#replace CB_GETEDITSEL               |CI$0140
   673#replace CB_LIMITTEXT                |CI$0141
   674#replace CB_SETEDITSEL               |CI$0142
   675#replace CB_ADDSTRING                |CI$0143
   676#replace CB_DELETESTRING             |CI$0144
   677#replace CB_DIR                      |CI$0145
   678#replace CB_GETCOUNT                 |CI$0146
   679#replace CB_GETCURSEL                |CI$0147
   680#replace CB_GETLBTEXT                |CI$0148
   681#replace CB_GETLBTEXTLEN             |CI$0149
   682#replace CB_INSERTSTRING             |CI$014A
   683#replace CB_RESETCONTENT             |CI$014B
   684#replace CB_FINDSTRING               |CI$014C
   685#replace CB_SELECTSTRING             |CI$014D
   686#replace CB_SETCURSEL                |CI$014E
   687#replace CB_SHOWDROPDOWN             |CI$014F
   688#replace CB_GETITEMDATA              |CI$0150
   689#replace CB_SETITEMDATA              |CI$0151
   690#replace CB_GETDROPPEDCONTROLRECT    |CI$0152
   691#replace CB_SETITEMHEIGHT            |CI$0153
   692#replace CB_GETITEMHEIGHT            |CI$0154
   693#replace CB_SETEXTENDEDUI            |CI$0155
   694#replace CB_GETEXTENDEDUI            |CI$0156
   695#replace CB_GETDROPPEDSTATE          |CI$0157
   696#replace CB_FINDSTRINGEXACT          |CI$0158
   697#replace CB_SETLOCALE                |CI$0159
   698#replace CB_GETLOCALE                |CI$015a
   699Define CB_GETTOPINDEX                for |CI$015b
   700Define CB_SETTOPINDEX                for |CI$015c
   701Define CB_GETHORIZONTALEXTENT        for |CI$015d
   702Define CB_SETHORIZONTALEXTENT        for |CI$015e
   703Define CB_GETDROPPEDWIDTH            for |CI$015f
   704Define CB_SETDROPPEDWIDTH            for |CI$0160
   705Define CB_INITSTORAGE                for |CI$0161
   706Define CB_MSGMAX                     for |CI$0162
   707
   708
   709//
   710// Edit Control Messages
   711//
   712#replace EM_GETSEL               |CI$00B0
   713#replace EM_SETSEL               |CI$00B1
   714#replace EM_GETRECT              |CI$00B2
   715#replace EM_SETRECT              |CI$00B3
   716#replace EM_SETRECTNP            |CI$00B4
   717#replace EM_SCROLL               |CI$00B5
   718#replace EM_LINESCROLL           |CI$00B6
   719#replace EM_SCROLLCARET          |CI$00B7
   720#replace EM_GETMODIFY            |CI$00B8
   721#replace EM_SETMODIFY            |CI$00B9
   722#replace EM_GETLINECOUNT         |CI$00BA
   723#replace EM_LINEINDEX            |CI$00BB
   724#replace EM_SETHANDLE            |CI$00BC
   725#replace EM_GETHANDLE            |CI$00BD
   726#replace EM_GETTHUMB             |CI$00BE
   727#replace EM_LINELENGTH           |CI$00C1
   728#replace EM_REPLACESEL           |CI$00C2
   729#replace EM_GETLINE              |CI$00C4
   730#replace EM_SETLIMITTEXT         |CI$00C5
   731#replace EM_CANUNDO              |CI$00C6
   732#replace EM_UNDO                 |CI$00C7
   733#replace EM_FMTLINES             |CI$00C8
   734#replace EM_LINEFROMCHAR         |CI$00C9
   735#replace EM_SETTABSTOPS          |CI$00CB
   736#replace EM_SETPASSWORDCHAR      |CI$00CC
   737#replace EM_EMPTYUNDOBUFFER      |CI$00CD
   738#replace EM_GETFIRSTVISIBLELINE  |CI$00CE
   739#replace EM_SETREADONLY          |CI$00CF
   740#replace EM_SETWORDBREAKPROC     |CI$00D0
   741#replace EM_GETWORDBREAKPROC     |CI$00D1
   742#replace EM_GETPASSWORDCHAR      |CI$00D2
   743#replace EM_SETMARGINS           |CI$00D3
   744#replace EM_GETMARGINS           |CI$00D4
   745#replace EM_GETLIMITTEXT         |CI$00D5
   746#replace EM_POSFROMCHAR          |CI$00D6
   747#replace EM_CHARFROMPOS          |CI$00D7
   748
   749#replace EM_LIMITTEXT            EM_SETLIMITTEXT
   750#replace EM_MSGMAX               |CI$00D8
   751
   752//
   753// Listbox messages
   754//
   755#replace LB_ADDSTRING            |CI$0180
   756#replace LB_INSERTSTRING         |CI$0181
   757#replace LB_DELETESTRING         |CI$0182
   758#replace LB_SELITEMRANGEEX       |CI$0183
   759#replace LB_RESETCONTENT         |CI$0184
   760#replace LB_SETSEL               |CI$0185
   761#replace LB_SETCURSEL            |CI$0186
   762#replace LB_GETSEL               |CI$0187
   763#replace LB_GETCURSEL            |CI$0188
   764#replace LB_GETTEXT              |CI$0189
   765#replace LB_GETTEXTLEN           |CI$018A
   766#replace LB_GETCOUNT             |CI$018B
   767#replace LB_SELECTSTRING         |CI$018C
   768#replace LB_DIR                  |CI$018D
   769#replace LB_GETTOPINDEX          |CI$018E
   770#replace LB_FINDSTRING           |CI$018F
   771#replace LB_GETSELCOUNT          |CI$0190
   772#replace LB_GETSELITEMS          |CI$0191
   773#replace LB_SETTABSTOPS          |CI$0192
   774#replace LB_GETHORIZONTALEXTENT  |CI$0193
   775#replace LB_SETHORIZONTALEXTENT  |CI$0194
   776#replace LB_SETCOLUMNWIDTH       |CI$0195
   777#replace LB_ADDFILE              |CI$0196
   778#replace LB_SETTOPINDEX          |CI$0197
   779#replace LB_GETITEMRECT          |CI$0198
   780#replace LB_GETITEMDATA          |CI$0199
   781#replace LB_SETITEMDATA          |CI$019A
   782#replace LB_SELITEMRANGE         |CI$019B
   783#replace LB_SETANCHORINDEX       |CI$019C
   784#replace LB_GETANCHORINDEX       |CI$019D
   785#replace LB_SETCARETINDEX        |CI$019E
   786#replace LB_GETCARETINDEX        |CI$019F
   787#replace LB_SETITEMHEIGHT        |CI$01A0
   788#replace LB_GETITEMHEIGHT        |CI$01A1
   789#replace LB_FINDSTRINGEXACT      |CI$01A2
   790#replace LB_SETLOCALE            |CI$01A5
   791#replace LB_GETLOCALE            |CI$01A6
   792#replace LB_SETCOUNT             |CI$01A7
   793#replace LB_INITSTORAGE          |CI$01A8
   794#replace LB_ITEMFROMPOINT        |CI$01A9
   795#replace LB_MSGMAX               |CI$01AE
   796
   797
   798#replace WM_SETFOCUS                     |CI$0007
   799#replace WM_KILLFOCUS                    |CI$0008
   800#replace WM_ENABLE                       |CI$000A
   801#replace WM_SETREDRAW                    |CI$000B
   802#replace WM_SETTEXT                      |CI$000C
   803#replace WM_GETTEXT                      |CI$000D
   804#replace WM_GETTEXTLENGTH                |CI$000E
   805#replace WM_PAINT                        |CI$000F
   806#replace WM_CLOSE                        |CI$0010
   807#replace WM_QUERYENDSESSION              |CI$0011
   808#replace WM_QUIT                         |CI$0012
   809#replace WM_QUERYOPEN                    |CI$0013
   810#replace WM_ERASEBKGND                   |CI$0014
   811#replace WM_SYSCOLORCHANGE               |CI$0015
   812#replace WM_ENDSESSION                   |CI$0016
   813#replace WM_SHOWWINDOW                   |CI$0018
   814#replace WM_SETTINGCHANGE                |CI$001A
   815#replace WM_WININICHANGE                 WM_SETTINGCHANGE
   816
   817#replace WM_DEVMODECHANGE                |CI$001B
   818#replace WM_ACTIVATEAPP                  |CI$001C
   819#replace WM_FONTCHANGE                   |CI$001D
   820#replace WM_TIMECHANGE                   |CI$001E
   821#replace WM_CANCELMODE                   |CI$001F
   822#replace WM_SETCURSOR                    |CI$0020
   823#replace WM_MOUSEACTIVATE                |CI$0021
   824#replace WM_CHILDACTIVATE                |CI$0022
   825#replace WM_QUEUESYNC                    |CI$0023
   826
   827#replace WM_GETMINMAXINFO                |CI$0024
   828
   829#replace WM_PAINTICON                    |CI$0026
   830#replace WM_ICONERASEBKGND               |CI$0027
   831#replace WM_NEXTDLGCTL                   |CI$0028
   832#replace WM_SPOOLERSTATUS                |CI$002A
   833#replace WM_DRAWITEM                     |CI$002B
   834#replace WM_MEASUREITEM                  |CI$002C
   835#replace WM_DELETEITEM                   |CI$002D
   836#replace WM_VKEYTOITEM                   |CI$002E
   837#replace WM_CHARTOITEM                   |CI$002F
   838#replace WM_SETFONT                      |CI$0030
   839#replace WM_GETFONT                      |CI$0031
   840#replace WM_SETHOTKEY                    |CI$0032
   841#replace WM_GETHOTKEY                    |CI$0033
   842#replace WM_QUERYDRAGICON                |CI$0037
   843#replace WM_COMPAREITEM                  |CI$0039
   844
   845#replace WM_COMPACTING                   |CI$0041
   846#replace WM_COMMNOTIFY                   |CI$0044
   847#replace WM_WINDOWPOSCHANGING            |CI$0046
   848#replace WM_WINDOWPOSCHANGED             |CI$0047
   849
   850#replace WM_POWER                        |CI$0048
   851
   852#replace WM_NCCREATE                     |CI$0081
   853#replace WM_NCDESTROY                    |CI$0082
   854#replace WM_NCCALCSIZE                   |CI$0083
   855#replace WM_NCHITTEST                    |CI$0084
   856#replace WM_NCPAINT                      |CI$0085
   857#replace WM_NCACTIVATE                   |CI$0086
   858#replace WM_GETDLGCODE                   |CI$0087
   859
   860#replace WM_NCMOUSEMOVE                  |CI$00A0
   861#replace WM_NCLBUTTONDOWN                |CI$00A1
   862#replace WM_NCLBUTTONUP                  |CI$00A2
   863#replace WM_NCLBUTTONDBLCLK              |CI$00A3
   864#replace WM_NCRBUTTONDOWN                |CI$00A4
   865#replace WM_NCRBUTTONUP                  |CI$00A5
   866#replace WM_NCRBUTTONDBLCLK              |CI$00A6
   867#replace WM_NCMBUTTONDOWN                |CI$00A7
   868#replace WM_NCMBUTTONUP                  |CI$00A8
   869#replace WM_NCMBUTTONDBLCLK              |CI$00A9
   870
   871#replace WM_KEYFIRST                     |CI$0100
   872#replace WM_KEYDOWN                      |CI$0100
   873#replace WM_KEYUP                        |CI$0101
   874#replace WM_CHAR                         |CI$0102
   875#replace WM_DEADCHAR                     |CI$0103
   876#replace WM_SYSKEYDOWN                   |CI$0104
   877#replace WM_SYSKEYUP                     |CI$0105
   878#replace WM_SYSCHAR                      |CI$0106
   879#replace WM_SYSDEADCHAR                  |CI$0107
   880#replace WM_KEYLAST                      |CI$0108
   881
   882#REPLACE WM_NOTIFY                       |CI$004E
   883
   884#replace WM_INITDIALOG                   |CI$0110
   885#replace WM_COMMAND                      |CI$0111
   886#replace WM_SYSCOMMAND                   |CI$0112
   887#replace WM_TIMER                        |CI$0113
   888#replace WM_HSCROLL                      |CI$0114
   889#replace WM_VSCROLL                      |CI$0115
   890#replace WM_INITMENU                     |CI$0116
   891#replace WM_INITMENUPOPUP                |CI$0117
   892#replace WM_MENUSELECT                   |CI$011F
   893#replace WM_MENUCHAR                     |CI$0120
   894#replace WM_ENTERIDLE                    |CI$0121
   895
   896#replace WM_CTLCOLORMSGBOX               |CI$0132
   897#replace WM_CTLCOLOREDIT                 |CI$0133
   898#replace WM_CTLCOLORLISTBOX              |CI$0134
   899#replace WM_CTLCOLORBTN                  |CI$0135
   900#replace WM_CTLCOLORDLG                  |CI$0136
   901#replace WM_CTLCOLORSCROLLBAR            |CI$0137
   902#replace WM_CTLCOLORSTATIC               |CI$0138
   903
   904#replace MN_SETHMENU                     |CI$01E0
   905#replace MN_GETHMENU                     |CI$01E1
   906#replace MN_SIZEWINDOW                   |CI$01E2
   907#replace MN_OPENHIERARCHY                |CI$01E3
   908#replace MN_CLOSEHIERARCHY               |CI$01E4
   909#replace MN_SELECTITEM                   |CI$01E5
   910#replace MN_CANCELMENUS                  |CI$01E6
   911#replace MN_SELECTFIRSTVALIDITEM         |CI$01E7
   912
   913#replace WM_MOUSEFIRST                   |CI$0200
   914#replace WM_MOUSEMOVE                    |CI$0200
   915#replace WM_LBUTTONDOWN                  |CI$0201
   916#replace WM_LBUTTONUP                    |CI$0202
   917#replace WM_LBUTTONDBLCLK                |CI$0203
   918#replace WM_RBUTTONDOWN                  |CI$0204
   919#replace WM_RBUTTONUP                    |CI$0205
   920#replace WM_RBUTTONDBLCLK                |CI$0206
   921#replace WM_MBUTTONDOWN                  |CI$0207
   922#replace WM_MBUTTONUP                    |CI$0208
   923#replace WM_MBUTTONDBLCLK                |CI$0209
   924#replace WM_MOUSELAST                    |CI$0209
   925
   926#replace WM_PARENTNOTIFY                 |CI$0210
   927
   928// virtual key codes (from winuser.h)
   929// We recommend that virtual keys are used. The VK set is much more complete.
   930
   931#replace VK_LBUTTON        |CI$01
   932#replace VK_RBUTTON        |CI$02
   933#replace VK_CANCEL         |CI$03
   934#replace VK_MBUTTON        |CI$04
   935
   936#replace VK_BACK           |CI$08
   937#replace VK_TAB            |CI$09
   938
   939#replace VK_CLEAR          |CI$0C
   940#replace VK_RETURN         |CI$0D
   941
   942#replace VK_SHIFT          |CI$10
   943#replace VK_CONTROL        |CI$11
   944#replace VK_MENU           |CI$12
   945#replace VK_PAUSE          |CI$13
   946#replace VK_CAPITAL        |CI$14
   947
   948#replace VK_ESCAPE         |CI$1B
   949
   950#replace VK_SPACE          |CI$20
   951#replace VK_PRIOR          |CI$21
   952#replace VK_NEXT           |CI$22
   953#replace VK_END            |CI$23
   954#replace VK_HOME           |CI$24
   955#replace VK_LEFT           |CI$25
   956#replace VK_UP             |CI$26
   957#replace VK_RIGHT          |CI$27
   958#replace VK_DOWN           |CI$28
   959#replace VK_SELECT         |CI$29
   960#replace VK_PRINT          |CI$2A
   961#replace VK_EXECUTE        |CI$2B
   962#replace VK_SNAPSHOT       |CI$2C
   963#replace VK_INSERT         |CI$2D
   964#replace VK_DELETE         |CI$2E
   965#replace VK_HELP           |CI$2F
   966
   967// VK_0 thru VK_9 are the same as ASCII '0' thru '9' (|CI$30 - |CI$39)
   968Define VK_0 for 48
   969Define VK_1 for 49
   970Define VK_2 for 50
   971Define VK_3 for 51
   972Define VK_4 for 52
   973Define VK_5 for 53
   974Define VK_6 for 54
   975Define VK_7 for 55
   976Define VK_8 for 56
   977Define VK_9 for 57
   978
   979// VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (|CI$41 - |CI$5A)
   980Define VK_A for 65
   981Define VK_B for 66
   982Define VK_C for 67
   983Define VK_D for 68
   984Define VK_E for 69
   985Define VK_F for 70
   986Define VK_G for 71
   987Define VK_H for 72
   988Define VK_I for 73
   989Define VK_J for 74
   990Define VK_K for 75
   991Define VK_L for 76
   992Define VK_M for 77
   993Define VK_N for 78
   994Define VK_O for 79
   995Define VK_P for 80
   996Define VK_Q for 81
   997Define VK_R for 82
   998Define VK_S for 83
   999Define VK_T for 84
  1000Define VK_U for 85
  1001Define VK_V for 86
  1002Define VK_W for 87
  1003Define VK_X for 88
  1004Define VK_Y for 89
  1005Define VK_Z for 90
  1006
  1007
  1008#replace VK_LWIN           |CI$5B
  1009#replace VK_RWIN           |CI$5C
  1010#replace VK_APPS           |CI$5D
  1011
  1012#replace VK_NUMPAD0        |CI$60
  1013#replace VK_NUMPAD1        |CI$61
  1014#replace VK_NUMPAD2        |CI$62
  1015#replace VK_NUMPAD3        |CI$63
  1016#replace VK_NUMPAD4        |CI$64
  1017#replace VK_NUMPAD5        |CI$65
  1018#replace VK_NUMPAD6        |CI$66
  1019#replace VK_NUMPAD7        |CI$67
  1020#replace VK_NUMPAD8        |CI$68
  1021#replace VK_NUMPAD9        |CI$69
  1022#replace VK_MULTIPLY       |CI$6A
  1023#replace VK_ADD            |CI$6B
  1024#replace VK_SEPARATOR      |CI$6C
  1025#replace VK_SUBTRACT       |CI$6D
  1026#replace VK_DECIMAL        |CI$6E
  1027#replace VK_DIVIDE         |CI$6F
  1028#replace VK_F1             |CI$70
  1029#replace VK_F2             |CI$71
  1030#replace VK_F3             |CI$72
  1031#replace VK_F4             |CI$73
  1032#replace VK_F5             |CI$74
  1033#replace VK_F6             |CI$75
  1034#replace VK_F7             |CI$76
  1035#replace VK_F8             |CI$77
  1036#replace VK_F9             |CI$78
  1037#replace VK_F10            |CI$79
  1038#replace VK_F11            |CI$7A
  1039#replace VK_F12            |CI$7B
  1040#replace VK_F13            |CI$7C
  1041#replace VK_F14            |CI$7D
  1042#replace VK_F15            |CI$7E
  1043#replace VK_F16            |CI$7F
  1044#replace VK_F17            |CI$80
  1045#replace VK_F18            |CI$81
  1046#replace VK_F19            |CI$82
  1047#replace VK_F20            |CI$83
  1048#replace VK_F21            |CI$84
  1049#replace VK_F22            |CI$85
  1050#replace VK_F23            |CI$86
  1051#replace VK_F24            |CI$87
  1052
  1053#replace VK_NUMLOCK        |CI$90
  1054#replace VK_SCROLL         |CI$91
  1055
  1056//
  1057//  VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.
  1058//  Used only as parameters to GetAsyncKeyState() and GetKeyState().
  1059//  No other API or message will distinguish left and right keys in this way.
  1060//
  1061
  1062#replace VK_LSHIFT         |CI$A0
  1063#replace VK_RSHIFT         |CI$A1
  1064#replace VK_LCONTROL       |CI$A2
  1065#replace VK_RCONTROL       |CI$A3
  1066#replace VK_LMENU          |CI$A4   // alt keys
  1067#replace VK_RMENU          |CI$A5
  1068
  1069#replace VK_PROCESSKEY     |CI$E5
  1070#replace VK_ATTN           |CI$F6
  1071#replace VK_CRSEL          |CI$F7
  1072#replace VK_EXSEL          |CI$F8
  1073#replace VK_EREOF          |CI$F9
  1074#replace VK_PLAY           |CI$FA
  1075#replace VK_ZOOM           |CI$FB
  1076#replace VK_NONAME         |CI$FC
  1077#replace VK_PA1            |CI$FD
  1078#replace VK_OEM_CLEAR      |CI$FE
  1079
  1080
  1081//
  1082// Support for Windows System Colors (GetSysColor etc)
  1083//
  1084#REPLACE COLOR_SCROLLBAR            0
  1085#REPLACE COLOR_BACKGROUND           1
  1086#REPLACE COLOR_ACTIVECAPTION        2
  1087#REPLACE COLOR_INACTIVECAPTION      3
  1088#REPLACE COLOR_MENU                 4
  1089#REPLACE COLOR_WINDOW               5
  1090#REPLACE COLOR_WINDOWFRAME          6
  1091#REPLACE COLOR_MENUTEXT             7
  1092#REPLACE COLOR_WINDOWTEXT           8
  1093#REPLACE COLOR_CAPTIONTEXT          9
  1094#REPLACE COLOR_ACTIVEBORDER        10
  1095#REPLACE COLOR_INACTIVEBORDER      11
  1096#REPLACE COLOR_APPWORKSPACE        12
  1097#REPLACE COLOR_HIGHLIGHT           13
  1098#REPLACE COLOR_HIGHLIGHTTEXT       14
  1099#REPLACE COLOR_BTNFACE             15
  1100#REPLACE COLOR_BTNSHADOW           16
  1101#REPLACE COLOR_GRAYTEXT            17
  1102#REPLACE COLOR_BTNTEXT             18
  1103#REPLACE COLOR_INACTIVECAPTIONTEXT 19
  1104#REPLACE COLOR_BTNHIGHLIGHT        20
  1105#REPLACE COLOR_3DDKSHADOW          21
  1106#REPLACE COLOR_3DLIGHT             22
  1107#REPLACE COLOR_INFOTEXT            23
  1108#REPLACE COLOR_INFOBK              24
  1109
  1110#REPLACE COLOR_DESKTOP             COLOR_BACKGROUND
  1111#REPLACE COLOR_3DFACE              COLOR_BTNFACE
  1112#REPLACE COLOR_3DSHADOW            COLOR_BTNSHADOW
  1113#REPLACE COLOR_3DHIGHLIGHT         COLOR_BTNHIGHLIGHT
  1114#REPLACE COLOR_3DHILIGHT           COLOR_BTNHIGHLIGHT
  1115#REPLACE COLOR_BTNHILIGHT          COLOR_BTNHIGHLIGHT
  1116
  1117Type Type_POINT
  1118  Field Type_Point_x as DWORD
  1119  Field Type_Point_y as DWORD
  1120End_Type
  1121
  1122//*** The constants used as parameter to the system metrics function
  1123#REPLACE SM_CXSCREEN          0  // Width of screen
  1124#REPLACE SM_CYSCREEN          1  // Height of screen
  1125#REPLACE SM_CXVSCROLL         2  // Width of arrow bitmap on vertical scrollbar
  1126#REPLACE SM_CYHSCROLL         3  // Height of arrow bitmap on horizontal scrollbar
  1127#REPLACE SM_CYCAPTION         4  // Height of caption
  1128#REPLACE SM_CXBORDER          5  // Width of window frame that cannot be sized
  1129#REPLACE SM_CYBORDER          6  // Height of window frame that cannot be sized
  1130#REPLACE SM_CXDLGFRAME        7  // Width of frame when windows had WS_DLGFRAME style
  1131#REPLACE SM_CYDLGFRAME        8  // Height of frame when windows had WS_DLGFRAME style
  1132#REPLACE SM_CYVTHUMB          9  // Height of thumb box on vertical scrollbar
  1133#REPLACE SM_CXHTHUMB          10 // Width of thumb box on vertical scrollbar
  1134#REPLACE SM_CXICON            11 // Width of icon
  1135#REPLACE SM_CYICON            12 // Height of icon
  1136#REPLACE SM_CXCURSOR          13 // Width of cursor
  1137#REPLACE SM_CYCURSOR          14 // Height of cursor
  1138#REPLACE SM_CYMENU            15 // Height of single line menu bar
  1139#REPLACE SM_CXFULLSCREEN      16 // Width of window client area for full screen window
  1140#REPLACE SM_CYFULLSCREEN      17 // Height of window client area for full screen window
  1141#REPLACE SM_CYKANJIWINDOW     18 // Height of kanji window
  1142#REPLACE SM_MOUSEPRESENT      19 // Nonzero (True) if mouse hardware installed
  1143#REPLACE SM_CYVSCROLL         20 // Height of arrow bitmap on vertical scrollbar
  1144#REPLACE SM_CXHSCROLL         21 // Width of arrow bitmap on horizontal scrollbar
  1145#REPLACE SM_DEBUG             22 // Nonzero (True) if windows debugging version
  1146#REPLACE SM_SWAPBUTTON        23 // Nonzero (True) if left and right mouse buttons swapped
  1147#REPLACE SM_CXMIN             28 // Minimum width of window
  1148#REPLACE SM_CYMIN             29 // Minimum height of window
  1149#REPLACE SM_CXSIZE            30 // Width of bitmaps contained in the title bar
  1150#REPLACE SM_CYSIZE            31 // Height of bitmaps contained in the title bar
  1151#REPLACE SM_CXFRAME           32 // Width of window frame that can be sized
  1152#REPLACE SM_CYFRAME           33 // Height of window frame that can be sized
  1153#REPLACE SM_CXMINTRACK        34 // Minimum tracking width of window
  1154#REPLACE SM_CYMINTRACK        35 // Minimum tracking height of window
  1155#REPLACE SM_CXDOUBLECLK       36
  1156#REPLACE SM_CYDOUBLECLK       37
  1157#REPLACE SM_CXICONSPACING     38
  1158#REPLACE SM_CYICONSPACING     39
  1159#REPLACE SM_MENUDROPALIGNMENT 40
  1160#REPLACE SM_PENWINDOWS        41
  1161#REPLACE SM_DBCSENABLED       42
  1162
  1163#REPLACE SM_CMOUSEBUTTONS     43
  1164
  1165#REPLACE SM_CXFIXEDFRAME      SM_CXDLGFRAME  // win40 name change
  1166#REPLACE SM_CYFIXEDFRAME      SM_CYDLGFRAME  // win40 name change
  1167#REPLACE SM_CXSIZEFRAME       SM_CXFRAME     // win40 name change
  1168#REPLACE SM_CYSIZEFRAME       SM_CYFRAME     // win40 name change
  1169
  1170#REPLACE SM_SECURE            44
  1171#REPLACE SM_CXEDGE            45
  1172#REPLACE SM_CYEDGE            46
  1173#REPLACE SM_CXMINSPACING      47
  1174#REPLACE SM_CYMINSPACING      48
  1175#REPLACE SM_CXSMICON          49
  1176#REPLACE SM_CYSMICON          50
  1177#REPLACE SM_CYSMCAPTION       51
  1178#REPLACE SM_CXSMSIZE          52
  1179#REPLACE SM_CYSMSIZE          53
  1180#REPLACE SM_CXMENUSIZE        54
  1181#REPLACE SM_CYMENUSIZE        55
  1182#REPLACE SM_ARRANGE           56
  1183#REPLACE SM_CXMINIMIZED       57
  1184#REPLACE SM_CYMINIMIZED       58
  1185#REPLACE SM_CXMAXTRACK        59
  1186#REPLACE SM_CYMAXTRACK        60
  1187#REPLACE SM_CXMAXIMIZED       61
  1188#REPLACE SM_CYMAXIMIZED       62
  1189#REPLACE SM_NETWORK           63
  1190#REPLACE SM_CLEANBOOT         67
  1191#REPLACE SM_CXDRAG            68
  1192#REPLACE SM_CYDRAG            69
  1193
  1194#REPLACE SM_SHOWSOUNDS        70
  1195
  1196#REPLACE SM_CXMENUCHECK       71   // Use instead of GetMenuCheckMarkDimensions()!
  1197#REPLACE SM_CYMENUCHECK       72
  1198#REPLACE SM_SLOWMACHINE       73
  1199#REPLACE SM_MIDEASTENABLED    74
  1200
  1201// This is undocumented and OS specific. It has been removed
  1202//#REPLACE SM_CMETRICS          75
  1203
  1204//GetWindow() Symbols
  1205#REPLACE GW_HWNDFIRST 0
  1206#Replace GW_HWNDLAST  1
  1207#Replace GW_HWNDNEXT  2
  1208#Replace GW_HWNDPREV  3
  1209#Replace GW_OWNER     4
  1210#Replace GW_CHILD     5
  1211#Replace GW_MAX       6
  1212
  1213// Clipboard Formats
  1214#REPLACE CF_TEXT             |CI1
  1215#REPLACE CF_BITMAP           |CI2
  1216#REPLACE CF_METAFILEPICT     |CI3
  1217#REPLACE CF_SYLK             |CI4
  1218#REPLACE CF_DIF              |CI5
  1219#REPLACE CF_TIFF             |CI6
  1220#REPLACE CF_OEMTEXT          |CI7
  1221#REPLACE CF_DIB              |CI8
  1222#REPLACE CF_PALETTE          |CI9
  1223#REPLACE CF_PENDATA          |CI10
  1224#REPLACE CF_RIFF             |CI11
  1225#REPLACE CF_WAVE             |CI12
  1226#REPLACE CF_UNICODETEXT      |CI13
  1227#REPLACE CF_ENHMETAFILE      |CI14
  1228#REPLACE CF_HDROP            |CI15
  1229#REPLACE CF_LOCALE           |CI16
  1230#REPLACE CF_MAX              |CI17
  1231
  1232// Offsets used in GetClassLong
  1233Define GCL_MENUNAME      for (-8)
  1234Define GCL_HBRBACKGROUND for (-10)
  1235Define GCL_HCURSOR       for (-12)
  1236Define GCL_HICON         for (-14)
  1237Define GCL_HMODULE       for (-16)
  1238Define GCL_CBWNDEXTRA    for (-18)
  1239Define GCL_CBCLSEXTRA    for (-20)
  1240Define GCL_WNDPROC       for (-24)
  1241Define GCL_STYLE         for (-26)
  1242Define GCW_ATOM          for (-32)
  1243
  1244// HitTest results
  1245Define HTERROR       for  -2
  1246Define HTTRANSPARENT for  -1
  1247Define HTNOWHERE     for  0
  1248Define HTCLIENT      for  1
  1249Define HTCAPTION     for  2
  1250Define HTSYSMENU     for  3
  1251Define HTGROWBOX     for  4
  1252Define HTSIZE        for  HTGROWBOX
  1253Define HTMENU        for  5
  1254Define HTHSCROLL     for  6
  1255Define HTVSCROLL     for  7
  1256Define HTMINBUTTON   for  8
  1257Define HTMAXBUTTON   for  9
  1258Define HTLEFT        for  10
  1259Define HTRIGHT       for  11
  1260Define HTTOP         for  12
  1261Define HTTOPLEFT     for  13
  1262Define HTTOPRIGHT    for  14
  1263Define HTBOTTOM      for  15
  1264Define HTBOTTOMLEFT  for  16
  1265Define HTBOTTOMRIGHT for  17
  1266Define HTBORDER      for  18
  1267Define HTREDUCE      for  HTMINBUTTON
  1268Define HTZOOM        for  HTMAXBUTTON
  1269Define HTSIZEFIRST   for  HTLEFT
  1270Define HTSIZELAST    for  HTBOTTOMRIGHT
  1271Define HTOBJECT      for  19
  1272Define HTCLOSE       for  20
  1273Define HTHELP        for  21
  1274
  1275// Static class symbols
  1276Define SS_LEFT           for |CI$0000
  1277Define SS_CENTER         for |CI$0001
  1278Define SS_RIGHT          for |CI$0002
  1279Define SS_ICON           for |CI$0003
  1280Define SS_BLACKRECT      for |CI$0004
  1281Define SS_GRAYRECT       for |CI$0005
  1282Define SS_WHITERECT      for |CI$0006
  1283Define SS_BLACKFRAME     for |CI$0007
  1284Define SS_GRAYFRAME      for |CI$0008
  1285Define SS_WHITEFRAME     for |CI$0009
  1286Define SS_USERITEM       for |CI$000A
  1287Define SS_SIMPLE         for |CI$000B
  1288Define SS_LEFTNOWORDWRAP for |CI$000C
  1289Define SS_OWNERDRAW      for |CI$000D
  1290Define SS_BITMAP         for |CI$000E
  1291Define SS_ENHMETAFILE    for |CI$000F
  1292Define SS_ETCHEDHORZ     for |CI$0010
  1293Define SS_ETCHEDVERT     for |CI$0011
  1294Define SS_ETCHEDFRAME    for |CI$0012
  1295Define SS_TYPEMASK       for |CI$001F
  1296Define SS_NOPREFIX       for |CI$0080
  1297Define SS_NOTIFY         for |CI$0100
  1298Define SS_CENTERIMAGE    for |CI$0200
  1299Define SS_RIGHTJUST      for |CI$0400
  1300Define SS_REALSIZEIMAGE  for |CI$0800
  1301Define SS_SUNKEN         for |CI$1000
  1302Define SS_ENDELLIPSIS    for |CI$4000
  1303Define SS_PATHELLIPSIS   for |CI$8000
  1304Define SS_WORDELLIPSIS   for |CI$C000
  1305Define SS_ELLIPSISMASK   for |CI$C000
  1306
  1307// Redraw Flags for RedrawWindow
  1308
  1309Define RDW_INVALIDATE       for |CI$0001
  1310Define RDW_INTERNALPAINT    for |CI$0002
  1311Define RDW_ERASE            for |CI$0004
  1312Define RDW_VALIDATE         for |CI$0008
  1313Define RDW_NOINTERNALPAINT  for |CI$0010
  1314Define RDW_NOERASE          for |CI$0020
  1315Define RDW_NOCHILDREN       for |CI$0040
  1316Define RDW_ALLCHILDREN      for |CI$0080
  1317Define RDW_UPDATENOW        for |CI$0100
  1318Define RDW_ERASENOW         for |CI$0200
  1319Define RDW_FRAME            for |CI$0400
  1320Define RDW_NOFRAME          for |CI$0800
  1321
  1322// Monitor Flags:
  1323Define MONITOR_DEFAULTONNULL for 0
  1324Define MONITOR_DEFAULTONPRIMARY for 1
  1325Define MONITOR_DEFAULTONNEAREST for 2
  1326
  1327// MapVirtualKey values
  1328Define MAPVK_VK_TO_VSC for  0
  1329Define MAPVK_VSC_TO_VK  for 1
  1330Define MAPVK_VK_TO_CHAR for 2
  1331Define MAPVK_VSC_TO_VK_EX  for 3
  1332
  1333
  1334