Module:    Win32-User
Copyright:    Original Code is Copyright (c) 1995-2004 Functional Objects, Inc.
              All rights reserved.
License:      See License.txt in this distribution for details.
Warranty:     Distributed WITHOUT WARRANTY OF ANY KIND

// This file is automatically generated from "winuser.h"; do not edit.


// Adapted from:
/****************************************************************************
*                                                                           *
* winuser.h -- USER procedure declarations, constant definitions and macros *
*                                                                           *
* 
*                                                                           *
****************************************************************************/
define inline constant <HDWP> = <HANDLE>;
define inline constant <MENUTEMPLATEA> = <C-void>;
define inline constant <MENUTEMPLATE> = <MENUTEMPLATEA>;
define inline constant <LPMENUTEMPLATEA> = <PVOID>;
define inline constant <LPMENUTEMPLATE> = <LPMENUTEMPLATEA>;
define C-subtype <WNDPROC> ( <C-function-pointer> ) end;
define C-subtype <DLGPROC> ( <C-function-pointer> ) end;
define C-subtype <TIMERPROC> ( <C-function-pointer> ) end;
define C-subtype <GRAYSTRINGPROC> ( <C-function-pointer> ) end;
define C-subtype <WNDENUMPROC> ( <C-function-pointer> ) end;
define C-subtype <HOOKPROC> ( <C-function-pointer> ) end;
define C-subtype <SENDASYNCPROC> ( <C-function-pointer> ) end;
define C-subtype <PROPENUMPROCA> ( <C-function-pointer> ) end;
define C-subtype <PROPENUMPROCEXA> ( <C-function-pointer> ) end;
define C-subtype <EDITWORDBREAKPROCA> ( <C-function-pointer> ) end;
define C-subtype <DRAWSTATEPROC> ( <C-function-pointer> ) end;
define inline constant <PROPENUMPROC> = <PROPENUMPROCA>;
define inline constant <PROPENUMPROCEX> = <PROPENUMPROCEXA>;
define inline constant <EDITWORDBREAKPROC> = <EDITWORDBREAKPROCA>;
define C-subtype <NAMEENUMPROCA> ( <C-function-pointer> ) end;
define inline constant <WINSTAENUMPROCA> = <NAMEENUMPROCA>;
define inline constant <DESKTOPENUMPROCA> = <NAMEENUMPROCA>;
define inline constant <WINSTAENUMPROC> = <WINSTAENUMPROCA>;
define inline constant <DESKTOPENUMPROC> = <DESKTOPENUMPROCA>;
define inline-only constant $RT-CURSOR                  =
	MAKEINTRESOURCE(1);
define inline-only constant $RT-BITMAP                  =
	MAKEINTRESOURCE(2);
define inline-only constant $RT-ICON                    =
	MAKEINTRESOURCE(3);
define inline-only constant $RT-MENU                    =
	MAKEINTRESOURCE(4);
define inline-only constant $RT-DIALOG                  =
	MAKEINTRESOURCE(5);
define inline-only constant $RT-STRING                  =
	MAKEINTRESOURCE(6);
define inline-only constant $RT-FONTDIR                 =
	MAKEINTRESOURCE(7);
define inline-only constant $RT-FONT                    =
	MAKEINTRESOURCE(8);
define inline-only constant $RT-ACCELERATOR             =
	MAKEINTRESOURCE(9);
define inline-only constant $RT-RCDATA                  =
	MAKEINTRESOURCE(10);
define inline-only constant $RT-MESSAGETABLE            =
	MAKEINTRESOURCE(11);
define inline-only constant $DIFFERENCE                 =   11;
define inline-only constant $RT-VERSION                 =
	MAKEINTRESOURCE(16);
define inline-only constant $RT-DLGINCLUDE              =
	MAKEINTRESOURCE(17);
define inline-only constant $RT-PLUGPLAY                =
	MAKEINTRESOURCE(19);
define inline-only constant $RT-VXD                     =
	MAKEINTRESOURCE(20);
define inline-only constant $RT-ANICURSOR               =
	MAKEINTRESOURCE(21);
define inline-only constant $RT-ANIICON                 =
	MAKEINTRESOURCE(22);
define inline-only constant $RT-HTML                    =
	MAKEINTRESOURCE(23);
define inline-only constant $SB-HORZ                    =    0;
define inline-only constant $SB-VERT                    =    1;
define inline-only constant $SB-CTL                     =    2;
define inline-only constant $SB-BOTH                    =    3;
define inline-only constant $SB-LINEUP                  =    0;
define inline-only constant $SB-LINELEFT                =    0;
define inline-only constant $SB-LINEDOWN                =    1;
define inline-only constant $SB-LINERIGHT               =    1;
define inline-only constant $SB-PAGEUP                  =    2;
define inline-only constant $SB-PAGELEFT                =    2;
define inline-only constant $SB-PAGEDOWN                =    3;
define inline-only constant $SB-PAGERIGHT               =    3;
define inline-only constant $SB-THUMBPOSITION           =    4;
define inline-only constant $SB-THUMBTRACK              =    5;
define inline-only constant $SB-TOP                     =    6;
define inline-only constant $SB-LEFT                    =    6;
define inline-only constant $SB-BOTTOM                  =    7;
define inline-only constant $SB-RIGHT                   =    7;
define inline-only constant $SB-ENDSCROLL               =    8;
define inline-only constant $SW-HIDE                    =    0;
define inline-only constant $SW-SHOWNORMAL              =    1;
define inline-only constant $SW-NORMAL                  =    1;
define inline-only constant $SW-SHOWMINIMIZED           =    2;
define inline-only constant $SW-SHOWMAXIMIZED           =    3;
define inline-only constant $SW-MAXIMIZE                =    3;
define inline-only constant $SW-SHOWNOACTIVATE          =    4;
define inline-only constant $SW-SHOW                    =    5;
define inline-only constant $SW-MINIMIZE                =    6;
define inline-only constant $SW-SHOWMINNOACTIVE         =    7;
define inline-only constant $SW-SHOWNA                  =    8;
define inline-only constant $SW-RESTORE                 =    9;
define inline-only constant $SW-SHOWDEFAULT             =   10;
define inline-only constant $SW-FORCEMINIMIZE           =   11;
define inline-only constant $SW-MAX                     =   11;
define inline-only constant $HIDE-WINDOW                =    0;
define inline-only constant $SHOW-OPENWINDOW            =    1;
define inline-only constant $SHOW-ICONWINDOW            =    2;
define inline-only constant $SHOW-FULLSCREEN            =    3;
define inline-only constant $SHOW-OPENNOACTIVATE        =    4;
define inline-only constant $SW-PARENTCLOSING           =    1;
define inline-only constant $SW-OTHERZOOM               =    2;
define inline-only constant $SW-PARENTOPENING           =    3;
define inline-only constant $SW-OTHERUNZOOM             =    4;
define inline-only constant $KF-EXTENDED                = #x0100;
define inline-only constant $KF-DLGMODE                 = #x0800;
define inline-only constant $KF-MENUMODE                = #x1000;
define inline-only constant $KF-ALTDOWN                 = #x2000;
define inline-only constant $KF-REPEAT                  = #x4000;
define inline-only constant $KF-UP                      = #x8000;
define inline-only constant $VK-LBUTTON                 = #x01;
define inline-only constant $VK-RBUTTON                 = #x02;
define inline-only constant $VK-CANCEL                  = #x03;
define inline-only constant $VK-MBUTTON                 = #x04;
define inline-only constant $VK-BACK                    = #x08;
define inline-only constant $VK-TAB                     = #x09;
define inline-only constant $VK-CLEAR                   = #x0C;
define inline-only constant $VK-RETURN                  = #x0D;
define inline-only constant $VK-SHIFT                   = #x10;
define inline-only constant $VK-CONTROL                 = #x11;
define inline-only constant $VK-MENU                    = #x12;
define inline-only constant $VK-PAUSE                   = #x13;
define inline-only constant $VK-CAPITAL                 = #x14;
define inline-only constant $VK-KANA                    = #x15;
define inline-only constant $VK-HANGEUL                 = #x15;
define inline-only constant $VK-HANGUL                  = #x15;
define inline-only constant $VK-JUNJA                   = #x17;
define inline-only constant $VK-FINAL                   = #x18;
define inline-only constant $VK-HANJA                   = #x19;
define inline-only constant $VK-KANJI                   = #x19;
define inline-only constant $VK-ESCAPE                  = #x1B;
define inline-only constant $VK-CONVERT                 = #x1C;
define inline-only constant $VK-NONCONVERT              = #x1D;
define inline-only constant $VK-ACCEPT                  = #x1E;
define inline-only constant $VK-MODECHANGE              = #x1F;
define inline-only constant $VK-SPACE                   = #x20;
define inline-only constant $VK-PRIOR                   = #x21;
define inline-only constant $VK-NEXT                    = #x22;
define inline-only constant $VK-END                     = #x23;
define inline-only constant $VK-HOME                    = #x24;
define inline-only constant $VK-LEFT                    = #x25;
define inline-only constant $VK-UP                      = #x26;
define inline-only constant $VK-RIGHT                   = #x27;
define inline-only constant $VK-DOWN                    = #x28;
define inline-only constant $VK-SELECT                  = #x29;
define inline-only constant $VK-PRINT                   = #x2A;
define inline-only constant $VK-EXECUTE                 = #x2B;
define inline-only constant $VK-SNAPSHOT                = #x2C;
define inline-only constant $VK-INSERT                  = #x2D;
define inline-only constant $VK-DELETE                  = #x2E;
define inline-only constant $VK-HELP                    = #x2F;
define inline-only constant $VK-LWIN                    = #x5B;
define inline-only constant $VK-RWIN                    = #x5C;
define inline-only constant $VK-APPS                    = #x5D;
define inline-only constant $VK-NUMPAD0                 = #x60;
define inline-only constant $VK-NUMPAD1                 = #x61;
define inline-only constant $VK-NUMPAD2                 = #x62;
define inline-only constant $VK-NUMPAD3                 = #x63;
define inline-only constant $VK-NUMPAD4                 = #x64;
define inline-only constant $VK-NUMPAD5                 = #x65;
define inline-only constant $VK-NUMPAD6                 = #x66;
define inline-only constant $VK-NUMPAD7                 = #x67;
define inline-only constant $VK-NUMPAD8                 = #x68;
define inline-only constant $VK-NUMPAD9                 = #x69;
define inline-only constant $VK-MULTIPLY                = #x6A;
define inline-only constant $VK-ADD                     = #x6B;
define inline-only constant $VK-SEPARATOR               = #x6C;
define inline-only constant $VK-SUBTRACT                = #x6D;
define inline-only constant $VK-DECIMAL                 = #x6E;
define inline-only constant $VK-DIVIDE                  = #x6F;
define inline-only constant $VK-F1                      = #x70;
define inline-only constant $VK-F2                      = #x71;
define inline-only constant $VK-F3                      = #x72;
define inline-only constant $VK-F4                      = #x73;
define inline-only constant $VK-F5                      = #x74;
define inline-only constant $VK-F6                      = #x75;
define inline-only constant $VK-F7                      = #x76;
define inline-only constant $VK-F8                      = #x77;
define inline-only constant $VK-F9                      = #x78;
define inline-only constant $VK-F10                     = #x79;
define inline-only constant $VK-F11                     = #x7A;
define inline-only constant $VK-F12                     = #x7B;
define inline-only constant $VK-F13                     = #x7C;
define inline-only constant $VK-F14                     = #x7D;
define inline-only constant $VK-F15                     = #x7E;
define inline-only constant $VK-F16                     = #x7F;
define inline-only constant $VK-F17                     = #x80;
define inline-only constant $VK-F18                     = #x81;
define inline-only constant $VK-F19                     = #x82;
define inline-only constant $VK-F20                     = #x83;
define inline-only constant $VK-F21                     = #x84;
define inline-only constant $VK-F22                     = #x85;
define inline-only constant $VK-F23                     = #x86;
define inline-only constant $VK-F24                     = #x87;
define inline-only constant $VK-NUMLOCK                 = #x90;
define inline-only constant $VK-SCROLL                  = #x91;
define inline-only constant $VK-LSHIFT                  = #xA0;
define inline-only constant $VK-RSHIFT                  = #xA1;
define inline-only constant $VK-LCONTROL                = #xA2;
define inline-only constant $VK-RCONTROL                = #xA3;
define inline-only constant $VK-LMENU                   = #xA4;
define inline-only constant $VK-RMENU                   = #xA5;
define inline-only constant $VK-PROCESSKEY              = #xE5;
define inline-only constant $VK-ATTN                    = #xF6;
define inline-only constant $VK-CRSEL                   = #xF7;
define inline-only constant $VK-EXSEL                   = #xF8;
define inline-only constant $VK-EREOF                   = #xF9;
define inline-only constant $VK-PLAY                    = #xFA;
define inline-only constant $VK-ZOOM                    = #xFB;
define inline-only constant $VK-NONAME                  = #xFC;
define inline-only constant $VK-PA1                     = #xFD;
define inline-only constant $VK-OEM-CLEAR               = #xFE;
define inline-only constant $WH-MIN                     =   -1;
define inline-only constant $WH-MSGFILTER               =   -1;
define inline-only constant $WH-JOURNALRECORD           =    0;
define inline-only constant $WH-JOURNALPLAYBACK         =    1;
define inline-only constant $WH-KEYBOARD                =    2;
define inline-only constant $WH-GETMESSAGE              =    3;
define inline-only constant $WH-CALLWNDPROC             =    4;
define inline-only constant $WH-CBT                     =    5;
define inline-only constant $WH-SYSMSGFILTER            =    6;
define inline-only constant $WH-MOUSE                   =    7;
define inline-only constant $WH-HARDWARE                =    8;
define inline-only constant $WH-SHELL                   =   10;
define inline-only constant $WH-FOREGROUNDIDLE          =   11;
define inline-only constant $WH-CALLWNDPROCRET          =   12;
define inline-only constant $HC-ACTION                  =    0;
define inline-only constant $HC-GETNEXT                 =    1;
define inline-only constant $HC-SKIP                    =    2;
define inline-only constant $HC-NOREMOVE                =    3;
define inline-only constant $HC-SYSMODALON              =    4;
define inline-only constant $HC-SYSMODALOFF             =    5;
define inline-only constant $HCBT-MOVESIZE              =    0;
define inline-only constant $HCBT-MINMAX                =    1;
define inline-only constant $HCBT-QS                    =    2;
define inline-only constant $HCBT-CREATEWND             =    3;
define inline-only constant $HCBT-DESTROYWND            =    4;
define inline-only constant $HCBT-ACTIVATE              =    5;
define inline-only constant $HCBT-CLICKSKIPPED          =    6;
define inline-only constant $HCBT-KEYSKIPPED            =    7;
define inline-only constant $HCBT-SYSCOMMAND            =    8;
define inline-only constant $HCBT-SETFOCUS              =    9;

define C-struct <CBT-CREATEWNDA>
  sealed inline-only slot lpcs-value     :: <LPCREATESTRUCTA>;
  sealed inline-only slot hwndInsertAfter-value :: <HWND>;
  pointer-type-name: <LPCBT-CREATEWNDA>;
  c-name: "struct tagCBT_CREATEWNDA";
end C-struct <CBT-CREATEWNDA>;
define inline constant <CBT-CREATEWND> = <CBT-CREATEWNDA>;
define inline constant <LPCBT-CREATEWND> = <LPCBT-CREATEWNDA>;

define C-struct <CBTACTIVATESTRUCT>
  sealed inline-only slot fMouse-value   :: <BOOL>;
  sealed inline-only slot hWndActive-value :: <HWND>;
  pointer-type-name: <LPCBTACTIVATESTRUCT>;
  c-name: "struct tagCBTACTIVATESTRUCT";
end C-struct <CBTACTIVATESTRUCT>;
define inline-only constant $MSGF-DIALOGBOX             =    0;
define inline-only constant $MSGF-MESSAGEBOX            =    1;
define inline-only constant $MSGF-MENU                  =    2;
define inline-only constant $MSGF-SCROLLBAR             =    5;
define inline-only constant $MSGF-NEXTWINDOW            =    6;
define inline-only constant $MSGF-MAX                   =    8;
define inline-only constant $MSGF-USER                  = 4096;
define inline-only constant $HSHELL-WINDOWCREATED       =    1;
define inline-only constant $HSHELL-WINDOWDESTROYED     =    2;
define inline-only constant $HSHELL-ACTIVATESHELLWINDOW =    3;
define inline-only constant $HSHELL-WINDOWACTIVATED     =    4;
define inline-only constant $HSHELL-GETMINRECT          =    5;
define inline-only constant $HSHELL-REDRAW              =    6;
define inline-only constant $HSHELL-TASKMAN             =    7;
define inline-only constant $HSHELL-LANGUAGE            =    8;

define C-struct <EVENTMSG>
  sealed inline-only slot message-value  :: <UINT>;
  sealed inline-only slot paramL-value   :: <UINT>;
  sealed inline-only slot paramH-value   :: <UINT>;
  sealed inline-only slot time-value     :: <DWORD>;
  sealed inline-only slot hwnd-value     :: <HWND>;
  pointer-type-name: <LPEVENTMSG>;
  c-name: "struct tagEVENTMSG";
end C-struct <EVENTMSG>;
define C-pointer-type <PEVENTMSGMSG> => <EVENTMSG>;
define C-pointer-type <LPEVENTMSGMSG> => <EVENTMSG>;
define inline constant <PEVENTMSG> = <LPEVENTMSG>;

define C-struct <CWPSTRUCT>
  sealed inline-only slot lParam-value   :: <LPARAM>;
  sealed inline-only slot wParam-value   :: <WPARAM>;
  sealed inline-only slot message-value  :: <UINT>;
  sealed inline-only slot hwnd-value     :: <HWND>;
  pointer-type-name: <LPCWPSTRUCT>;
  c-name: "struct tagCWPSTRUCT";
end C-struct <CWPSTRUCT>;
define inline constant <PCWPSTRUCT> = <LPCWPSTRUCT>;

define C-struct <CWPRETSTRUCT>
  sealed inline-only slot lResult-value  :: <LRESULT>;
  sealed inline-only slot lParam-value   :: <LPARAM>;
  sealed inline-only slot wParam-value   :: <WPARAM>;
  sealed inline-only slot message-value  :: <UINT>;
  sealed inline-only slot hwnd-value     :: <HWND>;
  pointer-type-name: <LPCWPRETSTRUCT>;
  c-name: "struct tagCWPRETSTRUCT";
end C-struct <CWPRETSTRUCT>;
define inline constant <PCWPRETSTRUCT> = <LPCWPRETSTRUCT>;

define C-struct <MOUSEHOOKSTRUCT>
  sealed inline-only slot pt-value       :: <POINT>;
  sealed inline-only slot hwnd-value     :: <HWND>;
  sealed inline-only slot wHitTestCode-value :: <UINT>;
  sealed inline-only slot dwExtraInfo-value :: <DWORD>;
  pointer-type-name: <LPMOUSEHOOKSTRUCT>;
  c-name: "struct tagMOUSEHOOKSTRUCT";
end C-struct <MOUSEHOOKSTRUCT>;
define inline constant <PMOUSEHOOKSTRUCT> = <LPMOUSEHOOKSTRUCT>;

define C-struct <HARDWAREHOOKSTRUCT>
  sealed inline-only slot hwnd-value     :: <HWND>;
  sealed inline-only slot message-value  :: <UINT>;
  sealed inline-only slot wParam-value   :: <WPARAM>;
  sealed inline-only slot lParam-value   :: <LPARAM>;
  pointer-type-name: <LPHARDWAREHOOKSTRUCT>;
  c-name: "struct tagHARDWAREHOOKSTRUCT";
end C-struct <HARDWAREHOOKSTRUCT>;
define inline constant <PHARDWAREHOOKSTRUCT> = <LPHARDWAREHOOKSTRUCT>;
define inline-only constant $HKL-PREV                   =    0;
define inline-only constant $HKL-NEXT                   =    1;
define inline-only constant $KLF-ACTIVATE               = #x00000001;
define inline-only constant $KLF-SUBSTITUTE-OK          = #x00000002;
define inline-only constant $KLF-UNLOADPREVIOUS         = #x00000004;
define inline-only constant $KLF-REORDER                = #x00000008;
define inline-only constant $KLF-REPLACELANG            = #x00000010;
define inline-only constant $KLF-NOTELLSHELL            = #x00000080;
define inline-only constant $KLF-SETFORPROCESS          = #x00000100;
define inline-only constant $KL-NAMELENGTH              =    9;

define inline-only C-function LoadKeyboardLayout
  parameter pwszKLID   :: <LPCSTR>;
  parameter Flags      :: <UINT>;
  result value :: <HKL>;
  c-name: "LoadKeyboardLayoutA", c-modifiers: "__stdcall";
end;

define inline-only C-function ActivateKeyboardLayout
  parameter hkl        :: <HKL>;
  parameter Flags      :: <UINT>;
  result value :: <HKL>;
  c-name: "ActivateKeyboardLayout", c-modifiers: "__stdcall";
end;

define inline-only C-function UnloadKeyboardLayout
  parameter hkl        :: <HKL>;
  result value :: <BOOL>;
  c-name: "UnloadKeyboardLayout", c-modifiers: "__stdcall";
end;

define inline-only C-function GetKeyboardLayoutName
  parameter pwszKLID   :: <LPSTR>;
  result value :: <BOOL>;
  c-name: "GetKeyboardLayoutNameA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetKeyboardLayoutList
  parameter nBuff      :: <C-int>;
  parameter lpList     :: <LPHKL>;
  result value :: <C-int>;
  c-name: "GetKeyboardLayoutList", c-modifiers: "__stdcall";
end;

define inline-only C-function GetKeyboardLayout
  parameter dwLayout   :: <DWORD>;
  result value :: <HKL>;
  c-name: "GetKeyboardLayout", c-modifiers: "__stdcall";
end;
define inline-only constant $DESKTOP-READOBJECTS        = #x0001;
define inline-only constant $DESKTOP-CREATEWINDOW       = #x0002;
define inline-only constant $DESKTOP-CREATEMENU         = #x0004;
define inline-only constant $DESKTOP-HOOKCONTROL        = #x0008;
define inline-only constant $DESKTOP-JOURNALRECORD      = #x0010;
define inline-only constant $DESKTOP-JOURNALPLAYBACK    = #x0020;
define inline-only constant $DESKTOP-ENUMERATE          = #x0040;
define inline-only constant $DESKTOP-WRITEOBJECTS       = #x0080;
define inline-only constant $DESKTOP-SWITCHDESKTOP      = #x0100;
define inline-only constant $DF-ALLOWOTHERACCOUNTHOOK   = #x0001;
define inline-only constant $WINSTA-ENUMDESKTOPS        = #x0001;
define inline-only constant $WINSTA-READATTRIBUTES      = #x0002;
define inline-only constant $WINSTA-ACCESSCLIPBOARD     = #x0004;
define inline-only constant $WINSTA-CREATEDESKTOP       = #x0008;
define inline-only constant $WINSTA-WRITEATTRIBUTES     = #x0010;
define inline-only constant $WINSTA-ACCESSGLOBALATOMS   = #x0020;
define inline-only constant $WINSTA-EXITWINDOWS         = #x0040;
define inline-only constant $WINSTA-ENUMERATE           = #x0100;
define inline-only constant $WINSTA-READSCREEN          = #x0200;
define inline-only constant $WSF-VISIBLE                = #x0001;
define inline-only constant $UOI-FLAGS                  =    1;
define inline-only constant $UOI-NAME                   =    2;
define inline-only constant $UOI-TYPE                   =    3;
define inline-only constant $UOI-USER-SID               =    4;

define C-struct <USEROBJECTFLAGS>
  sealed inline-only slot fInherit-value :: <BOOL>;
  sealed inline-only slot fReserved      :: <BOOL>;
  sealed inline-only slot dwFlags-value  :: <DWORD>;
  pointer-type-name: <LPUSEROBJECTFLAGS>;
  c-name: "struct tagUSEROBJECTFLAGS";
end C-struct <USEROBJECTFLAGS>;
define inline constant <PUSEROBJECTFLAGS> = <LPUSEROBJECTFLAGS>;

define C-struct <WNDCLASSEXA>
  sealed inline-only slot cbSize-value   :: <UINT>;
  sealed inline-only slot style-value    :: <UINT>;
  sealed inline-only slot lpfnWndProc-value :: <WNDPROC>;
  sealed inline-only slot cbClsExtra-value :: <C-int>;
  sealed inline-only slot cbWndExtra-value :: <C-int>;
  sealed inline-only slot hInstance-value :: <HINSTANCE>;
  sealed inline-only slot hIcon-value    :: <HICON>;
  sealed inline-only slot hCursor-value  :: <HCURSOR>;
  sealed inline-only slot hbrBackground-value :: <HBRUSH>;
  sealed inline-only slot lpszMenuName-value :: <LPCSTR>;
  sealed inline-only slot lpszClassName-value :: <LPCSTR>;
  sealed inline-only slot hIconSm-value  :: <HICON>;
  pointer-type-name: <LPWNDCLASSEXA>;
  c-name: "struct tagWNDCLASSEXA";
end C-struct <WNDCLASSEXA>;
define inline constant <PWNDCLASSEXA> = <LPWNDCLASSEXA>;
define inline constant <WNDCLASSEX> = <WNDCLASSEXA>;
define inline constant <PWNDCLASSEX> = <PWNDCLASSEXA>;
define inline constant <LPWNDCLASSEX> = <LPWNDCLASSEXA>;

define C-struct <WNDCLASSA>
  sealed inline-only slot style-value    :: <UINT>;
  sealed inline-only slot lpfnWndProc-value :: <WNDPROC>;
  sealed inline-only slot cbClsExtra-value :: <C-int>;
  sealed inline-only slot cbWndExtra-value :: <C-int>;
  sealed inline-only slot hInstance-value :: <HINSTANCE>;
  sealed inline-only slot hIcon-value    :: <HICON>;
  sealed inline-only slot hCursor-value  :: <HCURSOR>;
  sealed inline-only slot hbrBackground-value :: <HBRUSH>;
  sealed inline-only slot lpszMenuName-value :: <LPCSTR>;
  sealed inline-only slot lpszClassName-value :: <LPCSTR>;
  pointer-type-name: <LPWNDCLASSA>;
  c-name: "struct tagWNDCLASSA";
end C-struct <WNDCLASSA>;
define inline constant <PWNDCLASSA> = <LPWNDCLASSA>;
define inline constant <WNDCLASS> = <WNDCLASSA>;
define inline constant <PWNDCLASS> = <PWNDCLASSA>;
define inline constant <LPWNDCLASS> = <LPWNDCLASSA>;

define C-struct <MSG>
  sealed inline-only slot hwnd-value     :: <HWND>;
  sealed inline-only slot message-value  :: <UINT>;
  sealed inline-only slot wParam-value   :: <WPARAM>;
  sealed inline-only slot lParam-value   :: <LPARAM>;
  sealed inline-only slot time-value     :: <DWORD>;
  sealed inline-only slot pt-value       :: <POINT>;
  pointer-type-name: <LPMSG>;
  c-name: "struct tagMSG";
end C-struct <MSG>;
define inline constant <PMSG> = <LPMSG>;
define inline-only constant $GWL-WNDPROC                =   -4;
define inline-only constant $GWL-HINSTANCE              =   -6;
define inline-only constant $GWL-HWNDPARENT             =   -8;
define inline-only constant $GWL-STYLE                  =  -16;
define inline-only constant $GWL-EXSTYLE                =  -20;
define inline-only constant $GWL-USERDATA               =  -21;
define inline-only constant $GWL-ID                     =  -12;
define inline-only constant $GCL-MENUNAME               =   -8;
define inline-only constant $GCL-HBRBACKGROUND          =  -10;
define inline-only constant $GCL-HCURSOR                =  -12;
define inline-only constant $GCL-HICON                  =  -14;
define inline-only constant $GCL-HMODULE                =  -16;
define inline-only constant $GCL-CBWNDEXTRA             =  -18;
define inline-only constant $GCL-CBCLSEXTRA             =  -20;
define inline-only constant $GCL-WNDPROC                =  -24;
define inline-only constant $GCL-STYLE                  =  -26;
define inline-only constant $GCW-ATOM                   =  -32;
define inline-only constant $GCL-HICONSM                =  -34;
define inline-only constant $WM-NULL                    = #x0000;
define inline-only constant $WM-CREATE                  = #x0001;
define inline-only constant $WM-DESTROY                 = #x0002;
define inline-only constant $WM-MOVE                    = #x0003;
define inline-only constant $WM-SIZE                    = #x0005;
define inline-only constant $WM-ACTIVATE                = #x0006;
define inline-only constant $WA-INACTIVE                =    0;
define inline-only constant $WA-ACTIVE                  =    1;
define inline-only constant $WA-CLICKACTIVE             =    2;
define inline-only constant $WM-SETFOCUS                = #x0007;
define inline-only constant $WM-KILLFOCUS               = #x0008;
define inline-only constant $WM-ENABLE                  = #x000A;
define inline-only constant $WM-SETREDRAW               = #x000B;
define inline-only constant $WM-SETTEXT                 = #x000C;
define inline-only constant $WM-GETTEXT                 = #x000D;
define inline-only constant $WM-GETTEXTLENGTH           = #x000E;
define inline-only constant $WM-PAINT                   = #x000F;
define inline-only constant $WM-CLOSE                   = #x0010;
define inline-only constant $WM-QUERYENDSESSION         = #x0011;
define inline-only constant $WM-QUIT                    = #x0012;
define inline-only constant $WM-QUERYOPEN               = #x0013;
define inline-only constant $WM-ERASEBKGND              = #x0014;
define inline-only constant $WM-SYSCOLORCHANGE          = #x0015;
define inline-only constant $WM-ENDSESSION              = #x0016;
define inline-only constant $WM-SHOWWINDOW              = #x0018;
define inline-only constant $WM-WININICHANGE            = #x001A;
define inline-only constant $WM-DEVMODECHANGE           = #x001B;
define inline-only constant $WM-ACTIVATEAPP             = #x001C;
define inline-only constant $WM-FONTCHANGE              = #x001D;
define inline-only constant $WM-TIMECHANGE              = #x001E;
define inline-only constant $WM-CANCELMODE              = #x001F;
define inline-only constant $WM-SETCURSOR               = #x0020;
define inline-only constant $WM-MOUSEACTIVATE           = #x0021;
define inline-only constant $WM-CHILDACTIVATE           = #x0022;
define inline-only constant $WM-QUEUESYNC               = #x0023;
define inline-only constant $WM-GETMINMAXINFO           = #x0024;

define C-struct <MINMAXINFO>
  sealed inline-only slot ptReserved     :: <POINT>;
  sealed inline-only slot ptMaxSize-value :: <POINT>;
  sealed inline-only slot ptMaxPosition-value :: <POINT>;
  sealed inline-only slot ptMinTrackSize-value :: <POINT>;
  sealed inline-only slot ptMaxTrackSize-value :: <POINT>;
  pointer-type-name: <LPMINMAXINFO>;
  c-name: "struct tagMINMAXINFO";
end C-struct <MINMAXINFO>;
define inline constant <PMINMAXINFO> = <LPMINMAXINFO>;
define inline-only constant $WM-PAINTICON               = #x0026;
define inline-only constant $WM-ICONERASEBKGND          = #x0027;
define inline-only constant $WM-NEXTDLGCTL              = #x0028;
define inline-only constant $WM-SPOOLERSTATUS           = #x002A;
define inline-only constant $WM-DRAWITEM                = #x002B;
define inline-only constant $WM-MEASUREITEM             = #x002C;
define inline-only constant $WM-DELETEITEM              = #x002D;
define inline-only constant $WM-VKEYTOITEM              = #x002E;
define inline-only constant $WM-CHARTOITEM              = #x002F;
define inline-only constant $WM-SETFONT                 = #x0030;
define inline-only constant $WM-GETFONT                 = #x0031;
define inline-only constant $WM-SETHOTKEY               = #x0032;
define inline-only constant $WM-GETHOTKEY               = #x0033;
define inline-only constant $WM-QUERYDRAGICON           = #x0037;
define inline-only constant $WM-COMPAREITEM             = #x0039;
define inline-only constant $WM-COMPACTING              = #x0041;
define inline-only constant $WM-COMMNOTIFY              = #x0044;
define inline-only constant $WM-WINDOWPOSCHANGING       = #x0046;
define inline-only constant $WM-WINDOWPOSCHANGED        = #x0047;
define inline-only constant $PWR-OK                     =    1;
define inline-only constant $PWR-FAIL                   =   -1;
define inline-only constant $PWR-SUSPENDREQUEST         =    1;
define inline-only constant $PWR-SUSPENDRESUME          =    2;
define inline-only constant $PWR-CRITICALRESUME         =    3;
define inline-only constant $WM-COPYDATA                = #x004A;
define inline-only constant $WM-CANCELJOURNAL           = #x004B;

define C-struct <COPYDATASTRUCT>
  sealed inline-only slot dwData-value   :: <DWORD>;
  sealed inline-only slot cbData-value   :: <DWORD>;
  sealed inline-only slot lpData-value   :: <PVOID>;
  pointer-type-name: <LPCOPYDATASTRUCT>;
  c-name: "struct tagCOPYDATASTRUCT";
end C-struct <COPYDATASTRUCT>;
define inline constant <PCOPYDATASTRUCT> = <LPCOPYDATASTRUCT>;
define inline-only constant $WM-NOTIFY                  = #x004E;
define inline-only constant $WM-INPUTLANGCHANGEREQUEST  = #x0050;
define inline-only constant $WM-INPUTLANGCHANGE         = #x0051;
define inline-only constant $WM-TCARD                   = #x0052;
define inline-only constant $WM-HELP                    = #x0053;
define inline-only constant $WM-USERCHANGED             = #x0054;
define inline-only constant $WM-NOTIFYFORMAT            = #x0055;
define inline-only constant $NFR-ANSI                   =    1;
define inline-only constant $NFR-UNICODE                =    2;
define inline-only constant $NF-QUERY                   =    3;
define inline-only constant $NF-REQUERY                 =    4;
define inline-only constant $WM-CONTEXTMENU             = #x007B;
define inline-only constant $WM-STYLECHANGING           = #x007C;
define inline-only constant $WM-STYLECHANGED            = #x007D;
define inline-only constant $WM-DISPLAYCHANGE           = #x007E;
define inline-only constant $WM-GETICON                 = #x007F;
define inline-only constant $WM-SETICON                 = #x0080;
define inline-only constant $WM-NCCREATE                = #x0081;
define inline-only constant $WM-NCDESTROY               = #x0082;
define inline-only constant $WM-NCCALCSIZE              = #x0083;
define inline-only constant $WM-NCHITTEST               = #x0084;
define inline-only constant $WM-NCPAINT                 = #x0085;
define inline-only constant $WM-NCACTIVATE              = #x0086;
define inline-only constant $WM-GETDLGCODE              = #x0087;
define inline-only constant $WM-SYNCPAINT               = #x0088;
define inline-only constant $WM-NCMOUSEMOVE             = #x00A0;
define inline-only constant $WM-NCLBUTTONDOWN           = #x00A1;
define inline-only constant $WM-NCLBUTTONUP             = #x00A2;
define inline-only constant $WM-NCLBUTTONDBLCLK         = #x00A3;
define inline-only constant $WM-NCRBUTTONDOWN           = #x00A4;
define inline-only constant $WM-NCRBUTTONUP             = #x00A5;
define inline-only constant $WM-NCRBUTTONDBLCLK         = #x00A6;
define inline-only constant $WM-NCMBUTTONDOWN           = #x00A7;
define inline-only constant $WM-NCMBUTTONUP             = #x00A8;
define inline-only constant $WM-NCMBUTTONDBLCLK         = #x00A9;
define inline-only constant $WM-KEYFIRST                = #x0100;
define inline-only constant $WM-KEYDOWN                 = #x0100;
define inline-only constant $WM-KEYUP                   = #x0101;
define inline-only constant $WM-CHAR                    = #x0102;
define inline-only constant $WM-DEADCHAR                = #x0103;
define inline-only constant $WM-SYSKEYDOWN              = #x0104;
define inline-only constant $WM-SYSKEYUP                = #x0105;
define inline-only constant $WM-SYSCHAR                 = #x0106;
define inline-only constant $WM-SYSDEADCHAR             = #x0107;
define inline-only constant $WM-KEYLAST                 = #x0108;
define inline-only constant $WM-IME-STARTCOMPOSITION    = #x010D;
define inline-only constant $WM-IME-ENDCOMPOSITION      = #x010E;
define inline-only constant $WM-IME-COMPOSITION         = #x010F;
define inline-only constant $WM-IME-KEYLAST             = #x010F;
define inline-only constant $WM-INITDIALOG              = #x0110;
define inline-only constant $WM-COMMAND                 = #x0111;
define inline-only constant $WM-SYSCOMMAND              = #x0112;
define inline-only constant $WM-TIMER                   = #x0113;
define inline-only constant $WM-HSCROLL                 = #x0114;
define inline-only constant $WM-VSCROLL                 = #x0115;
define inline-only constant $WM-INITMENU                = #x0116;
define inline-only constant $WM-INITMENUPOPUP           = #x0117;
define inline-only constant $WM-MENUSELECT              = #x011F;
define inline-only constant $WM-MENUCHAR                = #x0120;
define inline-only constant $WM-ENTERIDLE               = #x0121;
define inline-only constant $WM-CTLCOLORMSGBOX          = #x0132;
define inline-only constant $WM-CTLCOLOREDIT            = #x0133;
define inline-only constant $WM-CTLCOLORLISTBOX         = #x0134;
define inline-only constant $WM-CTLCOLORBTN             = #x0135;
define inline-only constant $WM-CTLCOLORDLG             = #x0136;
define inline-only constant $WM-CTLCOLORSCROLLBAR       = #x0137;
define inline-only constant $WM-CTLCOLORSTATIC          = #x0138;
define inline-only constant $WM-MOUSEFIRST              = #x0200;
define inline-only constant $WM-MOUSEMOVE               = #x0200;
define inline-only constant $WM-LBUTTONDOWN             = #x0201;
define inline-only constant $WM-LBUTTONUP               = #x0202;
define inline-only constant $WM-LBUTTONDBLCLK           = #x0203;
define inline-only constant $WM-RBUTTONDOWN             = #x0204;
define inline-only constant $WM-RBUTTONUP               = #x0205;
define inline-only constant $WM-RBUTTONDBLCLK           = #x0206;
define inline-only constant $WM-MBUTTONDOWN             = #x0207;
define inline-only constant $WM-MBUTTONUP               = #x0208;
define inline-only constant $WM-MBUTTONDBLCLK           = #x0209;
define inline-only constant $WM-MOUSELAST               = #x0209;
define inline-only constant $WM-PARENTNOTIFY            = #x0210;
define inline-only constant $WM-ENTERMENULOOP           = #x0211;
define inline-only constant $WM-EXITMENULOOP            = #x0212;
define inline-only constant $WM-NEXTMENU                = #x0213;

define C-struct <MDINEXTMENU>
  sealed inline-only slot hmenuIn-value  :: <HMENU>;
  sealed inline-only slot hmenuNext-value :: <HMENU>;
  sealed inline-only slot hwndNext-value :: <HWND>;
  pointer-type-name: <LPMDINEXTMENU>;
  c-name: "struct tagMDINEXTMENU";
end C-struct <MDINEXTMENU>;
define inline constant <PMDINEXTMENU> = <LPMDINEXTMENU>;
define inline-only constant $WM-SIZING                  = #x0214;
define inline-only constant $WM-CAPTURECHANGED          = #x0215;
define inline-only constant $WM-MOVING                  = #x0216;
define inline-only constant $WM-POWERBROADCAST          = #x0218;
define inline-only constant $PBT-APMQUERYSUSPEND        = #x0000;
define inline-only constant $PBT-APMQUERYSTANDBY        = #x0001;
define inline-only constant $PBT-APMQUERYSUSPENDFAILED  = #x0002;
define inline-only constant $PBT-APMQUERYSTANDBYFAILED  = #x0003;
define inline-only constant $PBT-APMSUSPEND             = #x0004;
define inline-only constant $PBT-APMSTANDBY             = #x0005;
define inline-only constant $PBT-APMRESUMECRITICAL      = #x0006;
define inline-only constant $PBT-APMRESUMESUSPEND       = #x0007;
define inline-only constant $PBT-APMRESUMESTANDBY       = #x0008;
define inline-only constant $PBTF-APMRESUMEFROMFAILURE  = #x00000001;
define inline-only constant $PBT-APMBATTERYLOW          = #x0009;
define inline-only constant $PBT-APMPOWERSTATUSCHANGE   = #x000A;
define inline-only constant $PBT-APMOEMEVENT            = #x000B;
define inline-only constant $PBT-APMRESUMEAUTOMATIC     = #x0012;
define inline-only constant $WM-DEVICECHANGE            = #x0219;
define inline-only constant $WM-MDICREATE               = #x0220;
define inline-only constant $WM-MDIDESTROY              = #x0221;
define inline-only constant $WM-MDIACTIVATE             = #x0222;
define inline-only constant $WM-MDIRESTORE              = #x0223;
define inline-only constant $WM-MDINEXT                 = #x0224;
define inline-only constant $WM-MDIMAXIMIZE             = #x0225;
define inline-only constant $WM-MDITILE                 = #x0226;
define inline-only constant $WM-MDICASCADE              = #x0227;
define inline-only constant $WM-MDIICONARRANGE          = #x0228;
define inline-only constant $WM-MDIGETACTIVE            = #x0229;
define inline-only constant $WM-MDISETMENU              = #x0230;
define inline-only constant $WM-ENTERSIZEMOVE           = #x0231;
define inline-only constant $WM-EXITSIZEMOVE            = #x0232;
define inline-only constant $WM-DROPFILES               = #x0233;
define inline-only constant $WM-MDIREFRESHMENU          = #x0234;
define inline-only constant $WM-IME-SETCONTEXT          = #x0281;
define inline-only constant $WM-IME-NOTIFY              = #x0282;
define inline-only constant $WM-IME-CONTROL             = #x0283;
define inline-only constant $WM-IME-COMPOSITIONFULL     = #x0284;
define inline-only constant $WM-IME-SELECT              = #x0285;
define inline-only constant $WM-IME-CHAR                = #x0286;
define inline-only constant $WM-IME-KEYDOWN             = #x0290;
define inline-only constant $WM-IME-KEYUP               = #x0291;
define inline-only constant $WM-CUT                     = #x0300;
define inline-only constant $WM-COPY                    = #x0301;
define inline-only constant $WM-PASTE                   = #x0302;
define inline-only constant $WM-CLEAR                   = #x0303;
define inline-only constant $WM-UNDO                    = #x0304;
define inline-only constant $WM-RENDERFORMAT            = #x0305;
define inline-only constant $WM-RENDERALLFORMATS        = #x0306;
define inline-only constant $WM-DESTROYCLIPBOARD        = #x0307;
define inline-only constant $WM-DRAWCLIPBOARD           = #x0308;
define inline-only constant $WM-PAINTCLIPBOARD          = #x0309;
define inline-only constant $WM-VSCROLLCLIPBOARD        = #x030A;
define inline-only constant $WM-SIZECLIPBOARD           = #x030B;
define inline-only constant $WM-ASKCBFORMATNAME         = #x030C;
define inline-only constant $WM-CHANGECBCHAIN           = #x030D;
define inline-only constant $WM-HSCROLLCLIPBOARD        = #x030E;
define inline-only constant $WM-QUERYNEWPALETTE         = #x030F;
define inline-only constant $WM-PALETTEISCHANGING       = #x0310;
define inline-only constant $WM-PALETTECHANGED          = #x0311;
define inline-only constant $WM-HOTKEY                  = #x0312;
define inline-only constant $WM-PRINT                   = #x0317;
define inline-only constant $WM-PRINTCLIENT             = #x0318;
define inline-only constant $WM-HANDHELDFIRST           = #x0358;
define inline-only constant $WM-HANDHELDLAST            = #x035F;
define inline-only constant $WM-AFXFIRST                = #x0360;
define inline-only constant $WM-AFXLAST                 = #x037F;
define inline-only constant $WM-PENWINFIRST             = #x0380;
define inline-only constant $WM-PENWINLAST              = #x038F;
define inline-only constant $WM-APP                     = #x8000;
define inline-only constant $WM-USER                    = #x0400;
define inline-only constant $WMSZ-LEFT                  =    1;
define inline-only constant $WMSZ-RIGHT                 =    2;
define inline-only constant $WMSZ-TOP                   =    3;
define inline-only constant $WMSZ-TOPLEFT               =    4;
define inline-only constant $WMSZ-TOPRIGHT              =    5;
define inline-only constant $WMSZ-BOTTOM                =    6;
define inline-only constant $WMSZ-BOTTOMLEFT            =    7;
define inline-only constant $WMSZ-BOTTOMRIGHT           =    8;
define inline-only constant $HTERROR                    =   -2;
define inline-only constant $HTTRANSPARENT              =   -1;
define inline-only constant $HTNOWHERE                  =    0;
define inline-only constant $HTCLIENT                   =    1;
define inline-only constant $HTCAPTION                  =    2;
define inline-only constant $HTSYSMENU                  =    3;
define inline-only constant $HTGROWBOX                  =    4;
define inline-only constant $HTMENU                     =    5;
define inline-only constant $HTHSCROLL                  =    6;
define inline-only constant $HTVSCROLL                  =    7;
define inline-only constant $HTMINBUTTON                =    8;
define inline-only constant $HTMAXBUTTON                =    9;
define inline-only constant $HTLEFT                     =   10;
define inline-only constant $HTRIGHT                    =   11;
define inline-only constant $HTTOP                      =   12;
define inline-only constant $HTTOPLEFT                  =   13;
define inline-only constant $HTTOPRIGHT                 =   14;
define inline-only constant $HTBOTTOM                   =   15;
define inline-only constant $HTBOTTOMLEFT               =   16;
define inline-only constant $HTBOTTOMRIGHT              =   17;
define inline-only constant $HTBORDER                   =   18;
define inline-only constant $HTOBJECT                   =   19;
define inline-only constant $HTCLOSE                    =   20;
define inline-only constant $HTHELP                     =   21;
define inline-only constant $SMTO-NORMAL                = #x0000;
define inline-only constant $SMTO-BLOCK                 = #x0001;
define inline-only constant $SMTO-ABORTIFHUNG           = #x0002;
define inline-only constant $MA-ACTIVATE                =    1;
define inline-only constant $MA-ACTIVATEANDEAT          =    2;
define inline-only constant $MA-NOACTIVATE              =    3;
define inline-only constant $MA-NOACTIVATEANDEAT        =    4;
define inline-only constant $ICON-SMALL                 =    0;
define inline-only constant $ICON-BIG                   =    1;

define inline-only C-function RegisterWindowMessage
  parameter lpString   :: <LPCSTR>;
  result value :: <UINT>;
  c-name: "RegisterWindowMessageA", c-modifiers: "__stdcall";
end;
define inline-only constant $SIZE-RESTORED              =    0;
define inline-only constant $SIZE-MINIMIZED             =    1;
define inline-only constant $SIZE-MAXIMIZED             =    2;
define inline-only constant $SIZE-MAXSHOW               =    3;
define inline-only constant $SIZE-MAXHIDE               =    4;

define C-struct <WINDOWPOS>
  sealed inline-only slot hwnd-value     :: <HWND>;
  sealed inline-only slot hwndInsertAfter-value :: <HWND>;
  sealed inline-only slot x-value        :: <C-int>;
  sealed inline-only slot y-value        :: <C-int>;
  sealed inline-only slot cx-value       :: <C-int>;
  sealed inline-only slot cy-value       :: <C-int>;
  sealed inline-only slot flags-value    :: <UINT>;
  pointer-type-name: <LPWINDOWPOS>;
  c-name: "struct tagWINDOWPOS";
end C-struct <WINDOWPOS>;
define inline constant <PWINDOWPOS> = <LPWINDOWPOS>;

define C-struct <NCCALCSIZE-PARAMS>
  sealed inline-only array slot rgrc-array :: <RECT>, length: 3,
	address-getter: rgrc-value;
  sealed inline-only slot lppos-value    :: <PWINDOWPOS>;
  pointer-type-name: <LPNCCALCSIZE-PARAMS>;
  c-name: "struct tagNCCALCSIZE_PARAMS";
end C-struct <NCCALCSIZE-PARAMS>;
define inline-only constant $WVR-ALIGNTOP               = #x0010;
define inline-only constant $WVR-ALIGNLEFT              = #x0020;
define inline-only constant $WVR-ALIGNBOTTOM            = #x0040;
define inline-only constant $WVR-ALIGNRIGHT             = #x0080;
define inline-only constant $WVR-HREDRAW                = #x0100;
define inline-only constant $WVR-VREDRAW                = #x0200;
define inline-only constant $WVR-REDRAW                 =
	logior($WVR-HREDRAW, $WVR-VREDRAW);
define inline-only constant $WVR-VALIDRECTS             = #x0400;
define inline-only constant $MK-LBUTTON                 = #x0001;
define inline-only constant $MK-RBUTTON                 = #x0002;
define inline-only constant $MK-SHIFT                   = #x0004;
define inline-only constant $MK-CONTROL                 = #x0008;
define inline-only constant $MK-MBUTTON                 = #x0010;
define inline-only constant $WS-OVERLAPPED              = #x00000000;
define inline-only constant $WS-POPUP                   =
	as(<machine-word>, #x80000000);
define inline-only constant $WS-CHILD                   =
	as(<machine-word>, #x40000000);
define inline-only constant $WS-MINIMIZE                =
	as(<machine-word>, #x20000000);
define inline-only constant $WS-VISIBLE                 =
	as(<machine-word>, #x10000000);
define inline-only constant $WS-DISABLED                = #x08000000;
define inline-only constant $WS-CLIPSIBLINGS            = #x04000000;
define inline-only constant $WS-CLIPCHILDREN            = #x02000000;
define inline-only constant $WS-MAXIMIZE                = #x01000000;
define inline-only constant $WS-CAPTION                 = #x00C00000;
define inline-only constant $WS-BORDER                  = #x00800000;
define inline-only constant $WS-DLGFRAME                = #x00400000;
define inline-only constant $WS-VSCROLL                 = #x00200000;
define inline-only constant $WS-HSCROLL                 = #x00100000;
define inline-only constant $WS-SYSMENU                 = #x00080000;
define inline-only constant $WS-THICKFRAME              = #x00040000;
define inline-only constant $WS-GROUP                   = #x00020000;
define inline-only constant $WS-TABSTOP                 = #x00010000;
define inline-only constant $WS-MINIMIZEBOX             = #x00020000;
define inline-only constant $WS-MAXIMIZEBOX             = #x00010000;
define inline-only constant $WS-OVERLAPPEDWINDOW        =
	logior($WS-OVERLAPPED, $WS-CAPTION, $WS-SYSMENU, $WS-THICKFRAME, $WS-MINIMIZEBOX, $WS-MAXIMIZEBOX);
define inline-only constant $WS-POPUPWINDOW             =
	%logior($WS-POPUP,  $WS-BORDER, $WS-SYSMENU);
define inline-only constant $WS-CHILDWINDOW             = $WS-CHILD;
define inline-only constant $WS-EX-DLGMODALFRAME        = #x00000001;
define inline-only constant $WS-EX-NOPARENTNOTIFY       = #x00000004;
define inline-only constant $WS-EX-TOPMOST              = #x00000008;
define inline-only constant $WS-EX-ACCEPTFILES          = #x00000010;
define inline-only constant $WS-EX-TRANSPARENT          = #x00000020;
define inline-only constant $WS-EX-MDICHILD             = #x00000040;
define inline-only constant $WS-EX-TOOLWINDOW           = #x00000080;
define inline-only constant $WS-EX-WINDOWEDGE           = #x00000100;
define inline-only constant $WS-EX-CLIENTEDGE           = #x00000200;
define inline-only constant $WS-EX-CONTEXTHELP          = #x00000400;
define inline-only constant $WS-EX-RIGHT                = #x00001000;
define inline-only constant $WS-EX-LEFT                 = #x00000000;
define inline-only constant $WS-EX-RTLREADING           = #x00002000;
define inline-only constant $WS-EX-LTRREADING           = #x00000000;
define inline-only constant $WS-EX-LEFTSCROLLBAR        = #x00004000;
define inline-only constant $WS-EX-RIGHTSCROLLBAR       = #x00000000;
define inline-only constant $WS-EX-CONTROLPARENT        = #x00010000;
define inline-only constant $WS-EX-STATICEDGE           = #x00020000;
define inline-only constant $WS-EX-APPWINDOW            = #x00040000;
define inline-only constant $WS-EX-OVERLAPPEDWINDOW     =
	logior($WS-EX-WINDOWEDGE, $WS-EX-CLIENTEDGE);
define inline-only constant $WS-EX-PALETTEWINDOW        =
	logior($WS-EX-WINDOWEDGE, $WS-EX-TOOLWINDOW, $WS-EX-TOPMOST);
define inline-only constant $CS-VREDRAW                 = #x0001;
define inline-only constant $CS-HREDRAW                 = #x0002;
define inline-only constant $CS-DBLCLKS                 = #x0008;
define inline-only constant $CS-OWNDC                   = #x0020;
define inline-only constant $CS-CLASSDC                 = #x0040;
define inline-only constant $CS-PARENTDC                = #x0080;
define inline-only constant $CS-NOCLOSE                 = #x0200;
define inline-only constant $CS-SAVEBITS                = #x0800;
define inline-only constant $CS-BYTEALIGNCLIENT         = #x1000;
define inline-only constant $CS-BYTEALIGNWINDOW         = #x2000;
define inline-only constant $CS-GLOBALCLASS             = #x4000;
define inline-only constant $CS-IME                     = #x00010000;
define inline-only constant $PRF-CHECKVISIBLE           = #x00000001;
define inline-only constant $PRF-NONCLIENT              = #x00000002;
define inline-only constant $PRF-CLIENT                 = #x00000004;
define inline-only constant $PRF-ERASEBKGND             = #x00000008;
define inline-only constant $PRF-CHILDREN               = #x00000010;
define inline-only constant $PRF-OWNED                  = #x00000020;
define inline-only constant $BDR-RAISEDOUTER            = #x0001;
define inline-only constant $BDR-SUNKENOUTER            = #x0002;
define inline-only constant $BDR-RAISEDINNER            = #x0004;
define inline-only constant $BDR-SUNKENINNER            = #x0008;
define inline-only constant $BDR-OUTER                  = #x0003;
define inline-only constant $BDR-INNER                  = #x000c;
define inline-only constant $EDGE-RAISED                =
	logior($BDR-RAISEDOUTER, $BDR-RAISEDINNER);
define inline-only constant $EDGE-SUNKEN                =
	logior($BDR-SUNKENOUTER, $BDR-SUNKENINNER);
define inline-only constant $EDGE-ETCHED                =
	logior($BDR-SUNKENOUTER, $BDR-RAISEDINNER);
define inline-only constant $EDGE-BUMP                  =
	logior($BDR-RAISEDOUTER, $BDR-SUNKENINNER);
define inline-only constant $BF-LEFT                    = #x0001;
define inline-only constant $BF-TOP                     = #x0002;
define inline-only constant $BF-RIGHT                   = #x0004;
define inline-only constant $BF-BOTTOM                  = #x0008;
define inline-only constant $BF-TOPLEFT                 =
	logior($BF-TOP, $BF-LEFT);
define inline-only constant $BF-TOPRIGHT                =
	logior($BF-TOP, $BF-RIGHT);
define inline-only constant $BF-BOTTOMLEFT              =
	logior($BF-BOTTOM, $BF-LEFT);
define inline-only constant $BF-BOTTOMRIGHT             =
	logior($BF-BOTTOM, $BF-RIGHT);
define inline-only constant $BF-RECT                    =
	logior($BF-LEFT, $BF-TOP, $BF-RIGHT, $BF-BOTTOM);
define inline-only constant $BF-DIAGONAL                = #x0010;
define inline-only constant $BF-DIAGONAL-ENDTOPRIGHT    =
	logior($BF-DIAGONAL, $BF-TOP, $BF-RIGHT);
define inline-only constant $BF-DIAGONAL-ENDTOPLEFT     =
	logior($BF-DIAGONAL, $BF-TOP, $BF-LEFT);
define inline-only constant $BF-DIAGONAL-ENDBOTTOMLEFT  =
	logior($BF-DIAGONAL, $BF-BOTTOM, $BF-LEFT);
define inline-only constant $BF-DIAGONAL-ENDBOTTOMRIGHT =
	logior($BF-DIAGONAL, $BF-BOTTOM, $BF-RIGHT);
define inline-only constant $BF-MIDDLE                  = #x0800;
define inline-only constant $BF-SOFT                    = #x1000;
define inline-only constant $BF-ADJUST                  = #x2000;
define inline-only constant $BF-FLAT                    = #x4000;
define inline-only constant $BF-MONO                    = #x8000;

define inline-only C-function DrawEdge
  parameter hdc        :: <HDC>;
  parameter qrc        :: <LPRECT>;
  parameter edge       :: <UINT>;
  parameter grfFlags   :: <UINT>;
  result value :: <BOOL>;
  c-name: "DrawEdge", c-modifiers: "__stdcall";
end;
define inline-only constant $DFC-CAPTION                =    1;
define inline-only constant $DFC-MENU                   =    2;
define inline-only constant $DFC-SCROLL                 =    3;
define inline-only constant $DFC-BUTTON                 =    4;
define inline-only constant $DFCS-CAPTIONCLOSE          = #x0000;
define inline-only constant $DFCS-CAPTIONMIN            = #x0001;
define inline-only constant $DFCS-CAPTIONMAX            = #x0002;
define inline-only constant $DFCS-CAPTIONRESTORE        = #x0003;
define inline-only constant $DFCS-CAPTIONHELP           = #x0004;
define inline-only constant $DFCS-MENUARROW             = #x0000;
define inline-only constant $DFCS-MENUCHECK             = #x0001;
define inline-only constant $DFCS-MENUBULLET            = #x0002;
define inline-only constant $DFCS-MENUARROWRIGHT        = #x0004;
define inline-only constant $DFCS-SCROLLUP              = #x0000;
define inline-only constant $DFCS-SCROLLDOWN            = #x0001;
define inline-only constant $DFCS-SCROLLLEFT            = #x0002;
define inline-only constant $DFCS-SCROLLRIGHT           = #x0003;
define inline-only constant $DFCS-SCROLLCOMBOBOX        = #x0005;
define inline-only constant $DFCS-SCROLLSIZEGRIP        = #x0008;
define inline-only constant $DFCS-SCROLLSIZEGRIPRIGHT   = #x0010;
define inline-only constant $DFCS-BUTTONCHECK           = #x0000;
define inline-only constant $DFCS-BUTTONRADIOIMAGE      = #x0001;
define inline-only constant $DFCS-BUTTONRADIOMASK       = #x0002;
define inline-only constant $DFCS-BUTTONRADIO           = #x0004;
define inline-only constant $DFCS-BUTTON3STATE          = #x0008;
define inline-only constant $DFCS-BUTTONPUSH            = #x0010;
define inline-only constant $DFCS-INACTIVE              = #x0100;
define inline-only constant $DFCS-PUSHED                = #x0200;
define inline-only constant $DFCS-CHECKED               = #x0400;
define inline-only constant $DFCS-ADJUSTRECT            = #x2000;
define inline-only constant $DFCS-FLAT                  = #x4000;
define inline-only constant $DFCS-MONO                  = #x8000;

define inline-only C-function DrawFrameControl
  parameter hdc1       :: <HDC>;
  parameter lprect2    :: <LPRECT>;
  parameter uint3      :: <UINT>;
  parameter uint4      :: <UINT>;
  result value :: <BOOL>;
  c-name: "DrawFrameControl", c-modifiers: "__stdcall";
end;
define inline-only constant $DC-ACTIVE                  = #x0001;
define inline-only constant $DC-SMALLCAP                = #x0002;
define inline-only constant $DC-ICON                    = #x0004;
define inline-only constant $DC-TEXT                    = #x0008;
define inline-only constant $DC-INBUTTON                = #x0010;

define inline-only C-function DrawCaption
  parameter hwnd1      :: <HWND>;
  parameter hdc2       :: <HDC>;
  parameter lprect3    ::  /* const */ <LPRECT>;
  parameter uint4      :: <UINT>;
  result value :: <BOOL>;
  c-name: "DrawCaption", c-modifiers: "__stdcall";
end;
define inline-only constant $IDANI-OPEN                 =    1;
define inline-only constant $IDANI-CLOSE                =    2;
define inline-only constant $IDANI-CAPTION              =    3;

define inline-only C-function DrawAnimatedRects
  parameter hwnd       :: <HWND>;
  parameter idAni      :: <C-int>;
  parameter lprcFrom   ::  /* const */ <LPRECT>;
  parameter lprcTo     ::  /* const */ <LPRECT>;
  result value :: <BOOL>;
  c-name: "DrawAnimatedRects", c-modifiers: "__stdcall";
end;
define inline-only constant $CF-TEXT                    =    1;
define inline-only constant $CF-BITMAP                  =    2;
define inline-only constant $CF-METAFILEPICT            =    3;
define inline-only constant $CF-SYLK                    =    4;
define inline-only constant $CF-DIF                     =    5;
define inline-only constant $CF-TIFF                    =    6;
define inline-only constant $CF-OEMTEXT                 =    7;
define inline-only constant $CF-DIB                     =    8;
define inline-only constant $CF-PALETTE                 =    9;
define inline-only constant $CF-PENDATA                 =   10;
define inline-only constant $CF-RIFF                    =   11;
define inline-only constant $CF-WAVE                    =   12;
define inline-only constant $CF-UNICODETEXT             =   13;
define inline-only constant $CF-ENHMETAFILE             =   14;
define inline-only constant $CF-HDROP                   =   15;
define inline-only constant $CF-LOCALE                  =   16;
define inline-only constant $CF-MAX                     =   17;
define inline-only constant $CF-OWNERDISPLAY            = #x0080;
define inline-only constant $CF-DSPTEXT                 = #x0081;
define inline-only constant $CF-DSPBITMAP               = #x0082;
define inline-only constant $CF-DSPMETAFILEPICT         = #x0083;
define inline-only constant $CF-DSPENHMETAFILE          = #x008E;
define inline-only constant $CF-PRIVATEFIRST            = #x0200;
define inline-only constant $CF-PRIVATELAST             = #x02FF;
define inline-only constant $CF-GDIOBJFIRST             = #x0300;
define inline-only constant $CF-GDIOBJLAST              = #x03FF;
define inline-only constant $FVIRTKEY                   =    1;
define inline-only constant $FNOINVERT                  = #x02;
define inline-only constant $FSHIFT                     = #x04;
define inline-only constant $FCONTROL                   = #x08;
define inline-only constant $FALT                       = #x10;

define C-struct <ACCEL>
  sealed inline-only slot fVirt-value    :: <C-BYTE>;
  sealed inline-only slot key-value      :: <WORD>;
  sealed inline-only slot cmd-value      :: <WORD>;
  pointer-type-name: <LPACCEL>;
  c-name: "struct tagACCEL";
end C-struct <ACCEL>;

define C-struct <PAINTSTRUCT>
  sealed inline-only slot hdc-value      :: <HDC>;
  sealed inline-only slot fErase-value   :: <BOOL>;
  sealed inline-only slot rcPaint-value  :: <RECT>;
  sealed inline-only slot fRestore-value :: <BOOL>;
  sealed inline-only slot fIncUpdate-value :: <BOOL>;
  sealed inline-only array slot rgbReserved-array :: <C-BYTE>,
	length: 32, address-getter: rgbReserved-value;
  pointer-type-name: <LPPAINTSTRUCT>;
  c-name: "struct tagPAINTSTRUCT";
end C-struct <PAINTSTRUCT>;
define inline constant <PPAINTSTRUCT> = <LPPAINTSTRUCT>;

define C-struct <CREATESTRUCTA>
  sealed inline-only slot lpCreateParams-value :: <LPVOID>;
  sealed inline-only slot hInstance-value :: <HINSTANCE>;
  sealed inline-only slot hMenu-value    :: <HMENU>;
  sealed inline-only slot hwndParent-value :: <HWND>;
  sealed inline-only slot cy-value       :: <C-int>;
  sealed inline-only slot cx-value       :: <C-int>;
  sealed inline-only slot y-value        :: <C-int>;
  sealed inline-only slot x-value        :: <C-int>;
  sealed inline-only slot style-value    :: <LONG>;
  sealed inline-only slot lpszName-value :: <LPCSTR>;
  sealed inline-only slot lpszClass-value :: <LPCSTR>;
  sealed inline-only slot dwExStyle-value :: <DWORD>;
  pointer-type-name: <LPCREATESTRUCTA>;
  c-name: "struct tagCREATESTRUCTA";
end C-struct <CREATESTRUCTA>;
define inline constant <CREATESTRUCT> = <CREATESTRUCTA>;
define inline constant <LPCREATESTRUCT> = <LPCREATESTRUCTA>;

define C-struct <WINDOWPLACEMENT>
  sealed inline-only slot length-value   :: <UINT>;
  sealed inline-only slot flags-value    :: <UINT>;
  sealed inline-only slot showCmd-value  :: <UINT>;
  sealed inline-only slot ptMinPosition-value :: <POINT>;
  sealed inline-only slot ptMaxPosition-value :: <POINT>;
  sealed inline-only slot rcNormalPosition-value :: <RECT>;
  pointer-type-name: <LPWINDOWPLACEMENT>;
  c-name: "struct tagWINDOWPLACEMENT";
end C-struct <WINDOWPLACEMENT>;
define inline constant <PWINDOWPLACEMENT> = <LPWINDOWPLACEMENT>;
define inline-only constant $WPF-SETMINPOSITION         = #x0001;
define inline-only constant $WPF-RESTORETOMAXIMIZED     = #x0002;

define C-struct <NMHDR>
  sealed inline-only slot hwndFrom-value :: <HWND>;
  sealed inline-only slot idFrom-value   :: <UINT>;
  sealed inline-only slot code-value     :: <UINT>;
  pointer-type-name: <LPNMHDR>;
  c-name: "struct tagNMHDR";
end C-struct <NMHDR>;

define C-struct <STYLESTRUCT>
  sealed inline-only slot styleOld-value :: <DWORD>;
  sealed inline-only slot styleNew-value :: <DWORD>;
  pointer-type-name: <LPSTYLESTRUCT>;
  c-name: "struct tagSTYLESTRUCT";
end C-struct <STYLESTRUCT>;
define inline-only constant $ODT-MENU                   =    1;
define inline-only constant $ODT-LISTBOX                =    2;
define inline-only constant $ODT-COMBOBOX               =    3;
define inline-only constant $ODT-BUTTON                 =    4;
define inline-only constant $ODT-STATIC                 =    5;
define inline-only constant $ODA-DRAWENTIRE             = #x0001;
define inline-only constant $ODA-SELECT                 = #x0002;
define inline-only constant $ODA-FOCUS                  = #x0004;
define inline-only constant $ODS-SELECTED               = #x0001;
define inline-only constant $ODS-GRAYED                 = #x0002;
define inline-only constant $ODS-DISABLED               = #x0004;
define inline-only constant $ODS-CHECKED                = #x0008;
define inline-only constant $ODS-FOCUS                  = #x0010;
define inline-only constant $ODS-DEFAULT                = #x0020;
define inline-only constant $ODS-COMBOBOXEDIT           = #x1000;

define C-struct <MEASUREITEMSTRUCT>
  sealed inline-only slot CtlType-value  :: <UINT>;
  sealed inline-only slot CtlID-value    :: <UINT>;
  sealed inline-only slot itemID-value   :: <UINT>;
  sealed inline-only slot itemWidth-value :: <UINT>;
  sealed inline-only slot itemHeight-value :: <UINT>;
  sealed inline-only slot itemData-value :: <DWORD>;
  pointer-type-name: <LPMEASUREITEMSTRUCT>;
  c-name: "struct tagMEASUREITEMSTRUCT";
end C-struct <MEASUREITEMSTRUCT>;
define inline constant <PMEASUREITEMSTRUCT> = <LPMEASUREITEMSTRUCT>;

define C-struct <DRAWITEMSTRUCT>
  sealed inline-only slot CtlType-value  :: <UINT>;
  sealed inline-only slot CtlID-value    :: <UINT>;
  sealed inline-only slot itemID-value   :: <UINT>;
  sealed inline-only slot itemAction-value :: <UINT>;
  sealed inline-only slot itemState-value :: <UINT>;
  sealed inline-only slot hwndItem-value :: <HWND>;
  sealed inline-only slot hDC-value      :: <HDC>;
  sealed inline-only slot rcItem-value   :: <RECT>;
  sealed inline-only slot itemData-value :: <DWORD>;
  pointer-type-name: <LPDRAWITEMSTRUCT>;
  c-name: "struct tagDRAWITEMSTRUCT";
end C-struct <DRAWITEMSTRUCT>;
define inline constant <PDRAWITEMSTRUCT> = <LPDRAWITEMSTRUCT>;

define C-struct <DELETEITEMSTRUCT>
  sealed inline-only slot CtlType-value  :: <UINT>;
  sealed inline-only slot CtlID-value    :: <UINT>;
  sealed inline-only slot itemID-value   :: <UINT>;
  sealed inline-only slot hwndItem-value :: <HWND>;
  sealed inline-only slot itemData-value :: <UINT>;
  pointer-type-name: <LPDELETEITEMSTRUCT>;
  c-name: "struct tagDELETEITEMSTRUCT";
end C-struct <DELETEITEMSTRUCT>;
define inline constant <PDELETEITEMSTRUCT> = <LPDELETEITEMSTRUCT>;

define C-struct <COMPAREITEMSTRUCT>
  sealed inline-only slot CtlType-value  :: <UINT>;
  sealed inline-only slot CtlID-value    :: <UINT>;
  sealed inline-only slot hwndItem-value :: <HWND>;
  sealed inline-only slot itemID1-value  :: <UINT>;
  sealed inline-only slot itemData1-value :: <DWORD>;
  sealed inline-only slot itemID2-value  :: <UINT>;
  sealed inline-only slot itemData2-value :: <DWORD>;
  sealed inline-only slot dwLocaleId-value :: <DWORD>;
  pointer-type-name: <LPCOMPAREITEMSTRUCT>;
  c-name: "struct tagCOMPAREITEMSTRUCT";
end C-struct <COMPAREITEMSTRUCT>;
define inline constant <PCOMPAREITEMSTRUCT> = <LPCOMPAREITEMSTRUCT>;

define inline-only C-function GetMessage
  parameter lpMsg      :: <LPMSG>;
  parameter hWnd       :: <HWND>;
  parameter wMsgFilterMin :: <UINT>;
  parameter wMsgFilterMax :: <UINT>;
  result value :: <BOOL>;
  c-name: "GetMessageA", c-modifiers: "__stdcall";
end;

define inline-only C-function TranslateMessage
  parameter lpMsg      ::  /* const */ <LPMSG>;
  result value :: <BOOL>;
  c-name: "TranslateMessage", c-modifiers: "__stdcall";
end;

define inline-only C-function DispatchMessage
  parameter lpMsg      ::  /* const */ <LPMSG>;
  result value :: <LONG>;
  c-name: "DispatchMessageA", c-modifiers: "__stdcall";
end;

define inline-only C-function PeekMessage
  parameter lpMsg      :: <LPMSG>;
  parameter hWnd       :: <HWND>;
  parameter wMsgFilterMin :: <UINT>;
  parameter wMsgFilterMax :: <UINT>;
  parameter wRemoveMsg :: <UINT>;
  result value :: <BOOL>;
  c-name: "PeekMessageA", c-modifiers: "__stdcall";
end;
define inline-only constant $PM-NOREMOVE                = #x0000;
define inline-only constant $PM-REMOVE                  = #x0001;
define inline-only constant $PM-NOYIELD                 = #x0002;

define inline-only C-function RegisterHotKey
  parameter hWnd       :: <HWND>;
  parameter id         :: <C-int>;
  parameter fsModifiers :: <UINT>;
  parameter vk         :: <UINT>;
  result value :: <BOOL>;
  c-name: "RegisterHotKey", c-modifiers: "__stdcall";
end;

define inline-only C-function UnregisterHotKey
  parameter hWnd       :: <HWND>;
  parameter id         :: <C-int>;
  result value :: <BOOL>;
  c-name: "UnregisterHotKey", c-modifiers: "__stdcall";
end;
define inline-only constant $MOD-ALT                    = #x0001;
define inline-only constant $MOD-CONTROL                = #x0002;
define inline-only constant $MOD-SHIFT                  = #x0004;
define inline-only constant $MOD-WIN                    = #x0008;
define inline-only constant $IDHOT-SNAPWINDOW           =   -1;
define inline-only constant $IDHOT-SNAPDESKTOP          =   -2;
define inline-only constant $ENDSESSION-LOGOFF          =
	as(<machine-word>, #x80000000);
define inline-only constant $EWX-LOGOFF                 =    0;
define inline-only constant $EWX-SHUTDOWN               = #x00000001;
define inline-only constant $EWX-REBOOT                 = #x00000002;
define inline-only constant $EWX-FORCE                  = #x00000004;
define inline-only constant $EWX-POWEROFF               = #x00000008;

define inline-only C-function ExitWindowsEx
  parameter uFlags     :: <UINT>;
  parameter dwReserved :: <DWORD>;
  result value :: <BOOL>;
  c-name: "ExitWindowsEx", c-modifiers: "__stdcall";
end;

define inline-only C-function SwapMouseButton
  parameter fSwap      :: <BOOL>;
  result value :: <BOOL>;
  c-name: "SwapMouseButton", c-modifiers: "__stdcall";
end;

define inline-only C-function GetMessagePos
  result value :: <DWORD>;
  c-name: "GetMessagePos", c-modifiers: "__stdcall";
end;

define inline-only C-function GetMessageTime
  result value :: <LONG>;
  c-name: "GetMessageTime", c-modifiers: "__stdcall";
end;

define inline-only C-function GetMessageExtraInfo
  result value :: <LONG>;
  c-name: "GetMessageExtraInfo", c-modifiers: "__stdcall";
end;

define inline-only C-function SetMessageExtraInfo
  parameter lParam     :: <LPARAM>;
  result value :: <LPARAM>;
  c-name: "SetMessageExtraInfo", c-modifiers: "__stdcall";
end;

define inline-only C-function SendMessage
  parameter hWnd       :: <HWND>;
  parameter Msg        :: <UINT>;
  parameter wParam     :: <WPARAM>;
  parameter lParam     :: <LPARAM>;
  result value :: <LRESULT>;
  c-name: "SendMessageA", c-modifiers: "__stdcall";
end;

define inline-only C-function SendMessageTimeout
  parameter hWnd       :: <HWND>;
  parameter Msg        :: <UINT>;
  parameter wParam     :: <WPARAM>;
  parameter lParam     :: <LPARAM>;
  parameter fuFlags    :: <UINT>;
  parameter uTimeout   :: <UINT>;
  output parameter lpdwResult :: <LPDWORD>;
  result value :: <LRESULT>;
  c-name: "SendMessageTimeoutA", c-modifiers: "__stdcall";
end;

define inline-only C-function SendNotifyMessage
  parameter hWnd       :: <HWND>;
  parameter Msg        :: <UINT>;
  parameter wParam     :: <WPARAM>;
  parameter lParam     :: <LPARAM>;
  result value :: <BOOL>;
  c-name: "SendNotifyMessageA", c-modifiers: "__stdcall";
end;

define inline-only C-function SendMessageCallback
  parameter hWnd       :: <HWND>;
  parameter Msg        :: <UINT>;
  parameter wParam     :: <WPARAM>;
  parameter lParam     :: <LPARAM>;
  parameter lpResultCallBack :: <SENDASYNCPROC>;
  parameter dwData :: <C-both-unsigned-long>;
  result value :: <BOOL>;
  c-name: "SendMessageCallbackA", c-modifiers: "__stdcall";
end;

define inline-only C-function BroadcastSystemMessage
  parameter dword1     :: <DWORD>;
  parameter lpdword2   :: <LPDWORD>;
  parameter uint3      :: <UINT>;
  parameter wparam4    :: <WPARAM>;
  parameter lparam5    :: <LPARAM>;
  result value :: <C-both-long>;
  c-name: "BroadcastSystemMessage", c-modifiers: "__stdcall";
end;
define inline-only constant $BSM-ALLCOMPONENTS          = #x00000000;
define inline-only constant $BSM-VXDS                   = #x00000001;
define inline-only constant $BSM-NETDRIVER              = #x00000002;
define inline-only constant $BSM-INSTALLABLEDRIVERS     = #x00000004;
define inline-only constant $BSM-APPLICATIONS           = #x00000008;
define inline-only constant $BSM-ALLDESKTOPS            = #x00000010;
define inline-only constant $BSF-QUERY                  = #x00000001;
define inline-only constant $BSF-IGNORECURRENTTASK      = #x00000002;
define inline-only constant $BSF-FLUSHDISK              = #x00000004;
define inline-only constant $BSF-NOHANG                 = #x00000008;
define inline-only constant $BSF-POSTMESSAGE            = #x00000010;
define inline-only constant $BSF-FORCEIFHUNG            = #x00000020;
define inline-only constant $BSF-NOTIMEOUTIFNOTHUNG     = #x00000040;
define inline-only constant $BROADCAST-QUERY-DENY       =
	as(<machine-word>, #x424D5144);

define inline-only C-function PostMessage
  parameter hWnd       :: <HWND>;
  parameter Msg        :: <UINT>;
  parameter wParam     :: <WPARAM>;
  parameter lParam     :: <LPARAM>;
  result value :: <BOOL>;
  c-name: "PostMessageA", c-modifiers: "__stdcall";
end;
define inline-only constant $HWND-BROADCAST             =
	make(<HWND>, address: #xffff);

define inline-only C-function ReplyMessage
  parameter lResult    :: <LRESULT>;
  result value :: <BOOL>;
  c-name: "ReplyMessage", c-modifiers: "__stdcall";
end;

define inline-only C-function WaitMessage
  result value :: <BOOL>;
  c-name: "WaitMessage", c-modifiers: "__stdcall";
end;

define inline-only C-function WaitForInputIdle
  parameter hProcess   :: <HANDLE>;
  parameter dwMilliseconds :: <DWORD>;
  result value :: <DWORD>;
  c-name: "WaitForInputIdle", c-modifiers: "__stdcall";
end;

define inline-only C-function DefWindowProc
  parameter hWnd       :: <HWND>;
  parameter Msg        :: <UINT>;
  parameter wParam     :: <WPARAM>;
  parameter lParam     :: <LPARAM>;
  result value :: <LRESULT>;
  c-name: "DefWindowProcA", c-modifiers: "__stdcall";
end;

define inline-only C-function PostQuitMessage
  parameter nExitCode  :: <C-int>;
  c-name: "PostQuitMessage", c-modifiers: "__stdcall";
end;

define inline-only C-function CallWindowProc
  parameter lpPrevWndFunc :: <WNDPROC>;
  parameter hWnd       :: <HWND>;
  parameter Msg        :: <UINT>;
  parameter wParam     :: <WPARAM>;
  parameter lParam     :: <LPARAM>;
  result value :: <LRESULT>;
  c-name: "CallWindowProcA", c-modifiers: "__stdcall";
end;

define inline-only C-function InSendMessage
  result value :: <BOOL>;
  c-name: "InSendMessage", c-modifiers: "__stdcall";
end;

define inline-only C-function GetDoubleClickTime
  result value :: <UINT>;
  c-name: "GetDoubleClickTime", c-modifiers: "__stdcall";
end;

define inline-only C-function SetDoubleClickTime
  parameter uint1      :: <UINT>;
  result value :: <BOOL>;
  c-name: "SetDoubleClickTime", c-modifiers: "__stdcall";
end;

define inline-only C-function RegisterClass
  parameter lpWndClass ::  /* const */ <LPWNDCLASSA>;
  result value :: <ATOM>;
  c-name: "RegisterClassA", c-modifiers: "__stdcall";
end;

define inline-only C-function UnregisterClass
  parameter lpClassName :: <LPCSTR>;
  parameter hInstance  :: <HINSTANCE>;
  result value :: <BOOL>;
  c-name: "UnregisterClassA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetClassInfo
  parameter hInstance  :: <HINSTANCE>;
  parameter lpClassName :: <LPCSTR>;
  parameter lpWndClass :: <LPWNDCLASSA>;
  result value :: <BOOL>;
  c-name: "GetClassInfoA", c-modifiers: "__stdcall";
end;

define inline-only C-function RegisterClassEx
  parameter lpwndclassexa1 ::  /* const */ <LPWNDCLASSEXA>;
  result value :: <ATOM>;
  c-name: "RegisterClassExA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetClassInfoEx
  parameter hinstance1 :: <HINSTANCE>;
  parameter lpcstr2    :: <LPCSTR>;
  parameter lpwndclassexa3 :: <LPWNDCLASSEXA>;
  result value :: <BOOL>;
  c-name: "GetClassInfoExA", c-modifiers: "__stdcall";
end;
define inline-only constant $CW-USEDEFAULT              =
	as(<machine-word>, #x80000000);
define inline-only constant $HWND-DESKTOP               =
	make(<HWND>, address: 0);

define inline-only C-function IsWindow
  parameter hWnd       :: <HWND>;
  result value :: <BOOL>;
  c-name: "IsWindow", c-modifiers: "__stdcall";
end;

define inline-only C-function IsMenu
  parameter hMenu      :: <HMENU>;
  result value :: <BOOL>;
  c-name: "IsMenu", c-modifiers: "__stdcall";
end;

define inline-only C-function IsChild
  parameter hWndParent :: <HWND>;
  parameter hWnd       :: <HWND>;
  result value :: <BOOL>;
  c-name: "IsChild", c-modifiers: "__stdcall";
end;

define inline-only C-function DestroyWindow
  parameter hWnd       :: <HWND>;
  result value :: <BOOL>;
  c-name: "DestroyWindow", c-modifiers: "__stdcall";
end;

define inline-only C-function ShowWindow
  parameter hWnd       :: <HWND>;
  parameter nCmdShow   :: <C-int>;
  result value :: <BOOL>;
  c-name: "ShowWindow", c-modifiers: "__stdcall";
end;

define inline-only C-function ShowWindowAsync
  parameter hWnd       :: <HWND>;
  parameter nCmdShow   :: <C-int>;
  result value :: <BOOL>;
  c-name: "ShowWindowAsync", c-modifiers: "__stdcall";
end;

define inline-only C-function FlashWindow
  parameter hWnd       :: <HWND>;
  parameter bInvert    :: <BOOL>;
  result value :: <BOOL>;
  c-name: "FlashWindow", c-modifiers: "__stdcall";
end;

define inline-only C-function ShowOwnedPopups
  parameter hWnd       :: <HWND>;
  parameter fShow      :: <BOOL>;
  result value :: <BOOL>;
  c-name: "ShowOwnedPopups", c-modifiers: "__stdcall";
end;

define inline-only C-function OpenIcon
  parameter hWnd       :: <HWND>;
  result value :: <BOOL>;
  c-name: "OpenIcon", c-modifiers: "__stdcall";
end;

define inline-only C-function CloseWindow
  parameter hWnd       :: <HWND>;
  result value :: <BOOL>;
  c-name: "CloseWindow", c-modifiers: "__stdcall";
end;

define inline-only C-function MoveWindow
  parameter hWnd       :: <HWND>;
  parameter X          :: <C-int>;
  parameter Y          :: <C-int>;
  parameter nWidth     :: <C-int>;
  parameter nHeight    :: <C-int>;
  parameter bRepaint   :: <BOOL>;
  result value :: <BOOL>;
  c-name: "MoveWindow", c-modifiers: "__stdcall";
end;

define inline-only C-function SetWindowPos
  parameter hWnd       :: <HWND>;
  parameter hWndInsertAfter :: <HWND>;
  parameter X          :: <C-int>;
  parameter Y          :: <C-int>;
  parameter cx         :: <C-int>;
  parameter cy         :: <C-int>;
  parameter uFlags     :: <UINT>;
  result value :: <BOOL>;
  c-name: "SetWindowPos", c-modifiers: "__stdcall";
end;

define inline-only C-function GetWindowPlacement
  parameter hWnd       :: <HWND>;
  parameter lpwndpl    :: <LPWINDOWPLACEMENT>;
  result value :: <BOOL>;
  c-name: "GetWindowPlacement", c-modifiers: "__stdcall";
end;

define inline-only C-function SetWindowPlacement
  parameter hWnd       :: <HWND>;
  parameter lpwndpl    ::  /* const */ <LPWINDOWPLACEMENT>;
  result value :: <BOOL>;
  c-name: "SetWindowPlacement", c-modifiers: "__stdcall";
end;

define inline-only C-function BeginDeferWindowPos
  parameter nNumWindows :: <C-int>;
  result value :: <HDWP>;
  c-name: "BeginDeferWindowPos", c-modifiers: "__stdcall";
end;

define inline-only C-function DeferWindowPos
  parameter hWinPosInfo :: <HDWP>;
  parameter hWnd       :: <HWND>;
  parameter hWndInsertAfter :: <HWND>;
  parameter x          :: <C-int>;
  parameter y          :: <C-int>;
  parameter cx         :: <C-int>;
  parameter cy         :: <C-int>;
  parameter uFlags     :: <UINT>;
  result value :: <HDWP>;
  c-name: "DeferWindowPos", c-modifiers: "__stdcall";
end;

define inline-only C-function EndDeferWindowPos
  parameter hWinPosInfo :: <HDWP>;
  result value :: <BOOL>;
  c-name: "EndDeferWindowPos", c-modifiers: "__stdcall";
end;

define inline-only C-function IsWindowVisible
  parameter hWnd       :: <HWND>;
  result value :: <BOOL>;
  c-name: "IsWindowVisible", c-modifiers: "__stdcall";
end;

define inline-only C-function IsIconic
  parameter hWnd       :: <HWND>;
  result value :: <BOOL>;
  c-name: "IsIconic", c-modifiers: "__stdcall";
end;

define inline-only C-function AnyPopup
  result value :: <BOOL>;
  c-name: "AnyPopup", c-modifiers: "__stdcall";
end;

define inline-only C-function BringWindowToTop
  parameter hWnd       :: <HWND>;
  result value :: <BOOL>;
  c-name: "BringWindowToTop", c-modifiers: "__stdcall";
end;

define inline-only C-function IsZoomed
  parameter hWnd       :: <HWND>;
  result value :: <BOOL>;
  c-name: "IsZoomed", c-modifiers: "__stdcall";
end;
define inline-only constant $SWP-NOSIZE                 = #x0001;
define inline-only constant $SWP-NOMOVE                 = #x0002;
define inline-only constant $SWP-NOZORDER               = #x0004;
define inline-only constant $SWP-NOREDRAW               = #x0008;
define inline-only constant $SWP-NOACTIVATE             = #x0010;
define inline-only constant $SWP-FRAMECHANGED           = #x0020;
define inline-only constant $SWP-SHOWWINDOW             = #x0040;
define inline-only constant $SWP-HIDEWINDOW             = #x0080;
define inline-only constant $SWP-NOCOPYBITS             = #x0100;
define inline-only constant $SWP-NOOWNERZORDER          = #x0200;
define inline-only constant $SWP-NOSENDCHANGING         = #x0400;
define inline-only constant $SWP-DEFERERASE             = #x2000;
define inline-only constant $SWP-ASYNCWINDOWPOS         = #x4000;
define inline-only constant $HWND-TOP                   =
	make(<HWND>, address: 0);
define inline-only constant $HWND-BOTTOM                =
	make(<HWND>, address: 1);
define inline-only constant $HWND-TOPMOST               =
	make(<HWND>, address: -1);
define inline-only constant $HWND-NOTOPMOST             =
	make(<HWND>, address: -2);

define C-struct <DLGTEMPLATE>
  sealed inline-only slot style-value    :: <DWORD>;
  sealed inline-only slot dwExtendedStyle-value :: <DWORD>;
  sealed inline-only slot cdit-value     :: <WORD>;
  sealed inline-only slot x-value        :: <C-short>;
  sealed inline-only slot y-value        :: <C-short>;
  sealed inline-only slot cx-value       :: <C-short>;
  sealed inline-only slot cy-value       :: <C-short>;
  pack: 2;
  pointer-type-name: <LPDLGTEMPLATE>;
end C-struct <DLGTEMPLATE>;
define inline constant <LPCDLGTEMPLATEA> =  /* const */ <LPDLGTEMPLATE>;
define inline constant <LPCDLGTEMPLATE> = <LPCDLGTEMPLATEA>;

define C-struct <DLGITEMTEMPLATE>
  sealed inline-only slot style-value    :: <DWORD>;
  sealed inline-only slot dwExtendedStyle-value :: <DWORD>;
  sealed inline-only slot x-value        :: <C-short>;
  sealed inline-only slot y-value        :: <C-short>;
  sealed inline-only slot cx-value       :: <C-short>;
  sealed inline-only slot cy-value       :: <C-short>;
  sealed inline-only slot id-value       :: <WORD>;
  pack: 2;
  pointer-type-name: <LPDLGITEMTEMPLATE>;
end C-struct <DLGITEMTEMPLATE>;
define C-pointer-type <PDLGITEMTEMPLATEA> => <DLGITEMTEMPLATE>;
define inline constant <PDLGITEMTEMPLATE> = <PDLGITEMTEMPLATEA>;

define inline-only C-function CreateDialogParam
  parameter hInstance  :: <HINSTANCE>;
  parameter lpTemplateName :: <LPCSTR>;
  parameter hWndParent :: <HWND>;
  parameter lpDialogFunc :: <DLGPROC>;
  parameter dwInitParam :: <LPARAM>;
  result value :: <HWND>;
  c-name: "CreateDialogParamA", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateDialogIndirectParam
  parameter hInstance  :: <HINSTANCE>;
  parameter lpTemplate :: <LPCDLGTEMPLATEA>;
  parameter hWndParent :: <HWND>;
  parameter lpDialogFunc :: <DLGPROC>;
  parameter dwInitParam :: <LPARAM>;
  result value :: <HWND>;
  c-name: "CreateDialogIndirectParamA", c-modifiers: "__stdcall";
end;

define inline-only C-function DialogBoxParam
  parameter hInstance  :: <HINSTANCE>;
  parameter lpTemplateName :: <LPCSTR>;
  parameter hWndParent :: <HWND>;
  parameter lpDialogFunc :: <DLGPROC>;
  parameter dwInitParam :: <LPARAM>;
  result value :: <C-int>;
  c-name: "DialogBoxParamA", c-modifiers: "__stdcall";
end;

define inline-only C-function DialogBoxIndirectParam
  parameter hInstance  :: <HINSTANCE>;
  parameter hDialogTemplate :: <LPCDLGTEMPLATEA>;
  parameter hWndParent :: <HWND>;
  parameter lpDialogFunc :: <DLGPROC>;
  parameter dwInitParam :: <LPARAM>;
  result value :: <C-int>;
  c-name: "DialogBoxIndirectParamA", c-modifiers: "__stdcall";
end;

define inline-only C-function EndDialog
  parameter hDlg       :: <HWND>;
  parameter nResult    :: <C-int>;
  result value :: <BOOL>;
  c-name: "EndDialog", c-modifiers: "__stdcall";
end;

define inline-only C-function GetDlgItem
  parameter hDlg       :: <HWND>;
  parameter nIDDlgItem :: <C-int>;
  result value :: <HWND>;
  c-name: "GetDlgItem", c-modifiers: "__stdcall";
end;

define inline-only C-function SetDlgItemInt
  parameter hDlg       :: <HWND>;
  parameter nIDDlgItem :: <C-int>;
  parameter uValue     :: <UINT>;
  parameter bSigned    :: <BOOL>;
  result value :: <BOOL>;
  c-name: "SetDlgItemInt", c-modifiers: "__stdcall";
end;

define inline-only C-function GetDlgItemInt
  parameter hDlg       :: <HWND>;
  parameter nIDDlgItem :: <C-int>;
  output parameter lpTranslated :: <LPBOOL>;
  parameter bSigned    :: <BOOL>;
  result value :: <UINT>;
  c-name: "GetDlgItemInt", c-modifiers: "__stdcall";
end;

define inline-only C-function SetDlgItemText
  parameter hDlg       :: <HWND>;
  parameter nIDDlgItem :: <C-int>;
  parameter lpString   :: <LPCSTR>;
  result value :: <BOOL>;
  c-name: "SetDlgItemTextA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetDlgItemText
  parameter hDlg       :: <HWND>;
  parameter nIDDlgItem :: <C-int>;
  parameter lpString   :: <LPSTR>;
  parameter nMaxCount  :: <C-int>;
  result value :: <UINT>;
  c-name: "GetDlgItemTextA", c-modifiers: "__stdcall";
end;

define inline-only C-function CheckDlgButton
  parameter hDlg       :: <HWND>;
  parameter nIDButton  :: <C-int>;
  parameter uCheck     :: <UINT>;
  result value :: <BOOL>;
  c-name: "CheckDlgButton", c-modifiers: "__stdcall";
end;

define inline-only C-function CheckRadioButton
  parameter hDlg       :: <HWND>;
  parameter nIDFirstButton :: <C-int>;
  parameter nIDLastButton :: <C-int>;
  parameter nIDCheckButton :: <C-int>;
  result value :: <BOOL>;
  c-name: "CheckRadioButton", c-modifiers: "__stdcall";
end;

define inline-only C-function IsDlgButtonChecked
  parameter hDlg       :: <HWND>;
  parameter nIDButton  :: <C-int>;
  result value :: <UINT>;
  c-name: "IsDlgButtonChecked", c-modifiers: "__stdcall";
end;

define inline-only C-function SendDlgItemMessage
  parameter hDlg       :: <HWND>;
  parameter nIDDlgItem :: <C-int>;
  parameter Msg        :: <UINT>;
  parameter wParam     :: <WPARAM>;
  parameter lParam     :: <LPARAM>;
  result value :: <LONG>;
  c-name: "SendDlgItemMessageA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetNextDlgGroupItem
  parameter hDlg       :: <HWND>;
  parameter hCtl       :: <HWND>;
  parameter bPrevious  :: <BOOL>;
  result value :: <HWND>;
  c-name: "GetNextDlgGroupItem", c-modifiers: "__stdcall";
end;

define inline-only C-function GetNextDlgTabItem
  parameter hDlg       :: <HWND>;
  parameter hCtl       :: <HWND>;
  parameter bPrevious  :: <BOOL>;
  result value :: <HWND>;
  c-name: "GetNextDlgTabItem", c-modifiers: "__stdcall";
end;

define inline-only C-function GetDlgCtrlID
  parameter hWnd       :: <HWND>;
  result value :: <C-int>;
  c-name: "GetDlgCtrlID", c-modifiers: "__stdcall";
end;

define inline-only C-function GetDialogBaseUnits
  result value :: <C-both-long>;
  c-name: "GetDialogBaseUnits", c-modifiers: "__stdcall";
end;

define inline-only C-function DefDlgProc
  parameter hDlg       :: <HWND>;
  parameter Msg        :: <UINT>;
  parameter wParam     :: <WPARAM>;
  parameter lParam     :: <LPARAM>;
  result value :: <LRESULT>;
  c-name: "DefDlgProcA", c-modifiers: "__stdcall";
end;
define inline-only constant $DLGWINDOWEXTRA             =   30;

define inline-only C-function CallMsgFilter
  parameter lpMsg      :: <LPMSG>;
  parameter nCode      :: <C-int>;
  result value :: <BOOL>;
  c-name: "CallMsgFilterA", c-modifiers: "__stdcall";
end;

define inline-only C-function OpenClipboard
  parameter hWndNewOwner :: <HWND>;
  result value :: <BOOL>;
  c-name: "OpenClipboard", c-modifiers: "__stdcall";
end;

define inline-only C-function CloseClipboard
  result value :: <BOOL>;
  c-name: "CloseClipboard", c-modifiers: "__stdcall";
end;

define inline-only C-function GetClipboardOwner
  result value :: <HWND>;
  c-name: "GetClipboardOwner", c-modifiers: "__stdcall";
end;

define inline-only C-function SetClipboardViewer
  parameter hWndNewViewer :: <HWND>;
  result value :: <HWND>;
  c-name: "SetClipboardViewer", c-modifiers: "__stdcall";
end;

define inline-only C-function GetClipboardViewer
  result value :: <HWND>;
  c-name: "GetClipboardViewer", c-modifiers: "__stdcall";
end;

define inline-only C-function ChangeClipboardChain
  parameter hWndRemove :: <HWND>;
  parameter hWndNewNext :: <HWND>;
  result value :: <BOOL>;
  c-name: "ChangeClipboardChain", c-modifiers: "__stdcall";
end;

define inline-only C-function SetClipboardData
  parameter uFormat    :: <UINT>;
  parameter hMem       :: <HANDLE>;
  result value :: <HANDLE>;
  c-name: "SetClipboardData", c-modifiers: "__stdcall";
end;

define inline-only C-function GetClipboardData
  parameter uFormat    :: <UINT>;
  result value :: <HANDLE>;
  c-name: "GetClipboardData", c-modifiers: "__stdcall";
end;

define inline-only C-function RegisterClipboardFormat
  parameter lpszFormat :: <LPCSTR>;
  result value :: <UINT>;
  c-name: "RegisterClipboardFormatA", c-modifiers: "__stdcall";
end;

define inline-only C-function CountClipboardFormats
  result value :: <C-int>;
  c-name: "CountClipboardFormats", c-modifiers: "__stdcall";
end;

define inline-only C-function EnumClipboardFormats
  parameter format     :: <UINT>;
  result value :: <UINT>;
  c-name: "EnumClipboardFormats", c-modifiers: "__stdcall";
end;

define inline-only C-function GetClipboardFormatName
  parameter format     :: <UINT>;
  parameter lpszFormatName :: <LPSTR>;
  parameter cchMaxCount :: <C-int>;
  result value :: <C-int>;
  c-name: "GetClipboardFormatNameA", c-modifiers: "__stdcall";
end;

define inline-only C-function EmptyClipboard
  result value :: <BOOL>;
  c-name: "EmptyClipboard", c-modifiers: "__stdcall";
end;

define inline-only C-function IsClipboardFormatAvailable
  parameter format     :: <UINT>;
  result value :: <BOOL>;
  c-name: "IsClipboardFormatAvailable", c-modifiers: "__stdcall";
end;

define inline-only C-function GetPriorityClipboardFormat
  parameter paFormatPriorityList :: <LPUINT>;
  parameter cFormats   :: <C-int>;
  result value :: <C-int>;
  c-name: "GetPriorityClipboardFormat", c-modifiers: "__stdcall";
end;

define inline-only C-function GetOpenClipboardWindow
  result value :: <HWND>;
  c-name: "GetOpenClipboardWindow", c-modifiers: "__stdcall";
end;

define inline-only C-function CharToOem
  parameter lpszSrc    :: <LPCSTR>;
  parameter lpszDst    :: <LPSTR>;
  result value :: <BOOL>;
  c-name: "CharToOemA", c-modifiers: "__stdcall";
end;

define inline-only C-function OemToChar
  parameter lpszSrc    :: <LPCSTR>;
  parameter lpszDst    :: <LPSTR>;
  result value :: <BOOL>;
  c-name: "OemToCharA", c-modifiers: "__stdcall";
end;

define inline-only C-function CharToOemBuff
  parameter lpszSrc    :: <LPCSTR>;
  parameter lpszDst    :: <LPSTR>;
  parameter cchDstLength :: <DWORD>;
  result value :: <BOOL>;
  c-name: "CharToOemBuffA", c-modifiers: "__stdcall";
end;

define inline-only C-function OemToCharBuff
  parameter lpszSrc    :: <LPCSTR>;
  parameter lpszDst    :: <LPSTR>;
  parameter cchDstLength :: <DWORD>;
  result value :: <BOOL>;
  c-name: "OemToCharBuffA", c-modifiers: "__stdcall";
end;

define inline-only C-function CharUpper
  parameter lpsz       :: <LPSTR>;
  result value :: <LPSTR>;
  c-name: "CharUpperA", c-modifiers: "__stdcall";
end;

define inline-only C-function CharUpperBuff
  parameter lpsz       :: <LPSTR>;
  parameter cchLength  :: <DWORD>;
  result value :: <DWORD>;
  c-name: "CharUpperBuffA", c-modifiers: "__stdcall";
end;

define inline-only C-function CharLower
  parameter lpsz       :: <LPSTR>;
  result value :: <LPSTR>;
  c-name: "CharLowerA", c-modifiers: "__stdcall";
end;

define inline-only C-function CharLowerBuff
  parameter lpsz       :: <LPSTR>;
  parameter cchLength  :: <DWORD>;
  result value :: <DWORD>;
  c-name: "CharLowerBuffA", c-modifiers: "__stdcall";
end;

define inline-only C-function CharNext
  parameter lpsz       :: <LPCSTR>;
  result value :: <LPSTR>;
  c-name: "CharNextA", c-modifiers: "__stdcall";
end;

define inline-only C-function CharPrev
  parameter lpszStart  :: <LPCSTR>;
  parameter lpszCurrent :: <LPCSTR>;
  result value :: <LPSTR>;
  c-name: "CharPrevA", c-modifiers: "__stdcall";
end;

define inline-only C-function CharNextEx
  parameter CodePage   :: <WORD>;
  parameter lpCurrentChar :: <LPCSTR>;
  parameter dwFlags    :: <DWORD>;
  result value :: <LPSTR>;
  c-name: "CharNextExA", c-modifiers: "__stdcall";
end;

define inline-only C-function CharPrevEx
  parameter CodePage   :: <WORD>;
  parameter lpStart    :: <LPCSTR>;
  parameter lpCurrentChar :: <LPCSTR>;
  parameter dwFlags    :: <DWORD>;
  result value :: <LPSTR>;
  c-name: "CharPrevExA", c-modifiers: "__stdcall";
end;

define inline-only C-function IsCharAlpha
  parameter ch         :: <CHAR>;
  result value :: <BOOL>;
  c-name: "IsCharAlphaA", c-modifiers: "__stdcall";
end;

define inline-only C-function IsCharAlphaNumeric
  parameter ch         :: <CHAR>;
  result value :: <BOOL>;
  c-name: "IsCharAlphaNumericA", c-modifiers: "__stdcall";
end;

define inline-only C-function IsCharUpper
  parameter ch         :: <CHAR>;
  result value :: <BOOL>;
  c-name: "IsCharUpperA", c-modifiers: "__stdcall";
end;

define inline-only C-function IsCharLower
  parameter ch         :: <CHAR>;
  result value :: <BOOL>;
  c-name: "IsCharLowerA", c-modifiers: "__stdcall";
end;

define inline-only C-function SetFocus
  parameter hWnd       :: <HWND>;
  result value :: <HWND>;
  c-name: "SetFocus", c-modifiers: "__stdcall";
end;

define inline-only C-function GetActiveWindow
  result value :: <HWND>;
  c-name: "GetActiveWindow", c-modifiers: "__stdcall";
end;

define inline-only C-function GetFocus
  result value :: <HWND>;
  c-name: "GetFocus", c-modifiers: "__stdcall";
end;

define inline-only C-function GetKeyState
  parameter nVirtKey   :: <C-int>;
  result value :: <SHORT>;
  c-name: "GetKeyState", c-modifiers: "__stdcall";
end;

define inline-only C-function GetAsyncKeyState
  parameter vKey       :: <C-int>;
  result value :: <SHORT>;
  c-name: "GetAsyncKeyState", c-modifiers: "__stdcall";
end;

define inline-only C-function GetKeyboardState
  parameter lpKeyState :: <PBYTE>;
  result value :: <BOOL>;
  c-name: "GetKeyboardState", c-modifiers: "__stdcall";
end;

define inline-only C-function SetKeyboardState
  parameter lpKeyState :: <LPBYTE>;
  result value :: <BOOL>;
  c-name: "SetKeyboardState", c-modifiers: "__stdcall";
end;

define inline-only C-function GetKeyNameText
  parameter lParam     :: <LONG>;
  parameter lpString   :: <LPSTR>;
  parameter nSize      :: <C-int>;
  result value :: <C-int>;
  c-name: "GetKeyNameTextA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetKeyboardType
  parameter nTypeFlag  :: <C-int>;
  result value :: <C-int>;
  c-name: "GetKeyboardType", c-modifiers: "__stdcall";
end;

define inline-only C-function ToAscii
  parameter uVirtKey   :: <UINT>;
  parameter uScanCode  :: <UINT>;
  parameter lpKeyState :: <PBYTE>;
  parameter lpChar     :: <LPWORD>;
  parameter uFlags     :: <UINT>;
  result value :: <C-int>;
  c-name: "ToAscii", c-modifiers: "__stdcall";
end;

define inline-only C-function ToAsciiEx
  parameter uVirtKey   :: <UINT>;
  parameter uScanCode  :: <UINT>;
  parameter lpKeyState :: <PBYTE>;
  parameter lpChar     :: <LPWORD>;
  parameter uFlags     :: <UINT>;
  parameter dwhkl      :: <HKL>;
  result value :: <C-int>;
  c-name: "ToAsciiEx", c-modifiers: "__stdcall";
end;

define inline-only C-function ToUnicode
  parameter wVirtKey   :: <UINT>;
  parameter wScanCode  :: <UINT>;
  parameter lpKeyState :: <PBYTE>;
  parameter pwszBuff   :: <LPWSTR>;
  parameter cchBuff    :: <C-int>;
  parameter wFlags     :: <UINT>;
  result value :: <C-int>;
  c-name: "ToUnicode", c-modifiers: "__stdcall";
end;

define inline-only C-function OemKeyScan
  parameter wOemChar   :: <WORD>;
  result value :: <DWORD>;
  c-name: "OemKeyScan", c-modifiers: "__stdcall";
end;

define inline-only C-function VkKeyScan
  parameter ch         :: <CHAR>;
  result value :: <SHORT>;
  c-name: "VkKeyScanA", c-modifiers: "__stdcall";
end;

define inline-only C-function VkKeyScanEx
  parameter ch         :: <CHAR>;
  parameter dwhkl      :: <HKL>;
  result value :: <SHORT>;
  c-name: "VkKeyScanExA", c-modifiers: "__stdcall";
end;
define inline-only constant $KEYEVENTF-EXTENDEDKEY      = #x0001;
define inline-only constant $KEYEVENTF-KEYUP            = #x0002;

define inline-only C-function keybd-event
  parameter bVk        :: <C-BYTE>;
  parameter bScan      :: <C-BYTE>;
  parameter dwFlags    :: <DWORD>;
  parameter dwExtraInfo :: <DWORD>;
  c-name: "keybd_event", c-modifiers: "__stdcall";
end;
define inline-only constant $MOUSEEVENTF-MOVE           = #x0001;
define inline-only constant $MOUSEEVENTF-LEFTDOWN       = #x0002;
define inline-only constant $MOUSEEVENTF-LEFTUP         = #x0004;
define inline-only constant $MOUSEEVENTF-RIGHTDOWN      = #x0008;
define inline-only constant $MOUSEEVENTF-RIGHTUP        = #x0010;
define inline-only constant $MOUSEEVENTF-MIDDLEDOWN     = #x0020;
define inline-only constant $MOUSEEVENTF-MIDDLEUP       = #x0040;
define inline-only constant $MOUSEEVENTF-WHEEL          = #x0800;
define inline-only constant $MOUSEEVENTF-ABSOLUTE       = #x8000;

define inline-only C-function mouse-event
  parameter dwFlags    :: <DWORD>;
  parameter dx         :: <DWORD>;
  parameter dy         :: <DWORD>;
  parameter dwData :: <C-both-unsigned-long>;
  parameter dwExtraInfo :: <DWORD>;
  c-name: "mouse_event", c-modifiers: "__stdcall";
end;

define inline-only C-function MapVirtualKey
  parameter uCode      :: <UINT>;
  parameter uMapType   :: <UINT>;
  result value :: <UINT>;
  c-name: "MapVirtualKeyA", c-modifiers: "__stdcall";
end;

define inline-only C-function MapVirtualKeyEx
  parameter uCode      :: <UINT>;
  parameter uMapType   :: <UINT>;
  parameter dwhkl      :: <HKL>;
  result value :: <UINT>;
  c-name: "MapVirtualKeyExA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetInputState
  result value :: <BOOL>;
  c-name: "GetInputState", c-modifiers: "__stdcall";
end;

define inline-only C-function GetQueueStatus
  parameter flags      :: <UINT>;
  result value :: <DWORD>;
  c-name: "GetQueueStatus", c-modifiers: "__stdcall";
end;

define inline-only C-function GetCapture
  result value :: <HWND>;
  c-name: "GetCapture", c-modifiers: "__stdcall";
end;

define inline-only C-function SetCapture
  parameter hWnd       :: <HWND>;
  result value :: <HWND>;
  c-name: "SetCapture", c-modifiers: "__stdcall";
end;

define inline-only C-function ReleaseCapture
  result value :: <BOOL>;
  c-name: "ReleaseCapture", c-modifiers: "__stdcall";
end;

define inline-only C-function MsgWaitForMultipleObjects
  parameter nCount     :: <DWORD>;
  parameter pHandles   :: <LPHANDLE>;
  parameter fWaitAll   :: <BOOL>;
  parameter dwMilliseconds :: <DWORD>;
  parameter dwWakeMask :: <DWORD>;
  result value :: <DWORD>;
  c-name: "MsgWaitForMultipleObjects", c-modifiers: "__stdcall";
end;
define inline-only constant $MWMO-WAITALL               = #x0001;
define inline-only constant $MWMO-ALERTABLE             = #x0002;
define inline-only constant $MWMO-INPUTAVAILABLE        = #x0004;
define inline-only constant $QS-KEY                     = #x0001;
define inline-only constant $QS-MOUSEMOVE               = #x0002;
define inline-only constant $QS-MOUSEBUTTON             = #x0004;
define inline-only constant $QS-POSTMESSAGE             = #x0008;
define inline-only constant $QS-TIMER                   = #x0010;
define inline-only constant $QS-PAINT                   = #x0020;
define inline-only constant $QS-SENDMESSAGE             = #x0040;
define inline-only constant $QS-HOTKEY                  = #x0080;
define inline-only constant $QS-ALLPOSTMESSAGE          = #x0100;
define inline-only constant $QS-MOUSE                   =
	logior($QS-MOUSEMOVE, $QS-MOUSEBUTTON);
define inline-only constant $QS-INPUT                   =
	logior($QS-MOUSE, $QS-KEY);
define inline-only constant $QS-ALLEVENTS               =
	logior($QS-INPUT, $QS-POSTMESSAGE, $QS-TIMER, $QS-PAINT, $QS-HOTKEY);
define inline-only constant $QS-ALLINPUT                =
	logior($QS-INPUT, $QS-POSTMESSAGE, $QS-TIMER, $QS-PAINT, $QS-HOTKEY, $QS-SENDMESSAGE);

define inline-only C-function SetTimer
  parameter hWnd       :: <HWND>;
  parameter nIDEvent   :: <UINT>;
  parameter uElapse    :: <UINT>;
  parameter lpTimerFunc :: <TIMERPROC>;
  result value :: <UINT>;
  c-name: "SetTimer", c-modifiers: "__stdcall";
end;

define inline-only C-function KillTimer
  parameter hWnd       :: <HWND>;
  parameter uIDEvent   :: <UINT>;
  result value :: <BOOL>;
  c-name: "KillTimer", c-modifiers: "__stdcall";
end;

define inline-only C-function IsWindowUnicode
  parameter hWnd       :: <HWND>;
  result value :: <BOOL>;
  c-name: "IsWindowUnicode", c-modifiers: "__stdcall";
end;

define inline-only C-function EnableWindow
  parameter hWnd       :: <HWND>;
  parameter bEnable    :: <BOOL>;
  result value :: <BOOL>;
  c-name: "EnableWindow", c-modifiers: "__stdcall";
end;

define inline-only C-function IsWindowEnabled
  parameter hWnd       :: <HWND>;
  result value :: <BOOL>;
  c-name: "IsWindowEnabled", c-modifiers: "__stdcall";
end;

define inline-only C-function LoadAccelerators
  parameter hInstance  :: <HINSTANCE>;
  parameter lpTableName :: <LPCSTR>;
  result value :: <HACCEL>;
  c-name: "LoadAcceleratorsA", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateAcceleratorTable
  parameter lpaccel1   :: <LPACCEL>;
  parameter int2       :: <C-int>;
  result value :: <HACCEL>;
  c-name: "CreateAcceleratorTableA", c-modifiers: "__stdcall";
end;

define inline-only C-function DestroyAcceleratorTable
  parameter hAccel     :: <HACCEL>;
  result value :: <BOOL>;
  c-name: "DestroyAcceleratorTable", c-modifiers: "__stdcall";
end;

define inline-only C-function CopyAcceleratorTable
  parameter hAccelSrc  :: <HACCEL>;
  parameter lpAccelDst :: <LPACCEL>;
  parameter cAccelEntries :: <C-int>;
  result value :: <C-int>;
  c-name: "CopyAcceleratorTableA", c-modifiers: "__stdcall";
end;

define inline-only C-function TranslateAccelerator
  parameter hWnd       :: <HWND>;
  parameter hAccTable  :: <HACCEL>;
  parameter lpMsg      :: <LPMSG>;
  result value :: <C-int>;
  c-name: "TranslateAcceleratorA", c-modifiers: "__stdcall";
end;
define inline-only constant $SM-CXSCREEN                =    0;
define inline-only constant $SM-CYSCREEN                =    1;
define inline-only constant $SM-CXVSCROLL               =    2;
define inline-only constant $SM-CYHSCROLL               =    3;
define inline-only constant $SM-CYCAPTION               =    4;
define inline-only constant $SM-CXBORDER                =    5;
define inline-only constant $SM-CYBORDER                =    6;
define inline-only constant $SM-CXDLGFRAME              =    7;
define inline-only constant $SM-CYDLGFRAME              =    8;
define inline-only constant $SM-CYVTHUMB                =    9;
define inline-only constant $SM-CXHTHUMB                =   10;
define inline-only constant $SM-CXICON                  =   11;
define inline-only constant $SM-CYICON                  =   12;
define inline-only constant $SM-CXCURSOR                =   13;
define inline-only constant $SM-CYCURSOR                =   14;
define inline-only constant $SM-CYMENU                  =   15;
define inline-only constant $SM-CXFULLSCREEN            =   16;
define inline-only constant $SM-CYFULLSCREEN            =   17;
define inline-only constant $SM-CYKANJIWINDOW           =   18;
define inline-only constant $SM-MOUSEPRESENT            =   19;
define inline-only constant $SM-CYVSCROLL               =   20;
define inline-only constant $SM-CXHSCROLL               =   21;
define inline-only constant $SM-DEBUG                   =   22;
define inline-only constant $SM-SWAPBUTTON              =   23;
define inline-only constant $SM-RESERVED1               =   24;
define inline-only constant $SM-RESERVED2               =   25;
define inline-only constant $SM-RESERVED3               =   26;
define inline-only constant $SM-RESERVED4               =   27;
define inline-only constant $SM-CXMIN                   =   28;
define inline-only constant $SM-CYMIN                   =   29;
define inline-only constant $SM-CXSIZE                  =   30;
define inline-only constant $SM-CYSIZE                  =   31;
define inline-only constant $SM-CXFRAME                 =   32;
define inline-only constant $SM-CYFRAME                 =   33;
define inline-only constant $SM-CXMINTRACK              =   34;
define inline-only constant $SM-CYMINTRACK              =   35;
define inline-only constant $SM-CXDOUBLECLK             =   36;
define inline-only constant $SM-CYDOUBLECLK             =   37;
define inline-only constant $SM-CXICONSPACING           =   38;
define inline-only constant $SM-CYICONSPACING           =   39;
define inline-only constant $SM-MENUDROPALIGNMENT       =   40;
define inline-only constant $SM-PENWINDOWS              =   41;
define inline-only constant $SM-DBCSENABLED             =   42;
define inline-only constant $SM-CMOUSEBUTTONS           =   43;
define inline-only constant $SM-SECURE                  =   44;
define inline-only constant $SM-CXEDGE                  =   45;
define inline-only constant $SM-CYEDGE                  =   46;
define inline-only constant $SM-CXMINSPACING            =   47;
define inline-only constant $SM-CYMINSPACING            =   48;
define inline-only constant $SM-CXSMICON                =   49;
define inline-only constant $SM-CYSMICON                =   50;
define inline-only constant $SM-CYSMCAPTION             =   51;
define inline-only constant $SM-CXSMSIZE                =   52;
define inline-only constant $SM-CYSMSIZE                =   53;
define inline-only constant $SM-CXMENUSIZE              =   54;
define inline-only constant $SM-CYMENUSIZE              =   55;
define inline-only constant $SM-ARRANGE                 =   56;
define inline-only constant $SM-CXMINIMIZED             =   57;
define inline-only constant $SM-CYMINIMIZED             =   58;
define inline-only constant $SM-CXMAXTRACK              =   59;
define inline-only constant $SM-CYMAXTRACK              =   60;
define inline-only constant $SM-CXMAXIMIZED             =   61;
define inline-only constant $SM-CYMAXIMIZED             =   62;
define inline-only constant $SM-NETWORK                 =   63;
define inline-only constant $SM-CLEANBOOT               =   67;
define inline-only constant $SM-CXDRAG                  =   68;
define inline-only constant $SM-CYDRAG                  =   69;
define inline-only constant $SM-SHOWSOUNDS              =   70;
define inline-only constant $SM-CXMENUCHECK             =   71;
define inline-only constant $SM-CYMENUCHECK             =   72;
define inline-only constant $SM-SLOWMACHINE             =   73;
define inline-only constant $SM-MIDEASTENABLED          =   74;
define inline-only constant $SM-CMETRICS                =   76;

define inline-only C-function GetSystemMetrics
  parameter nIndex     :: <C-int>;
  result value :: <C-int>;
  c-name: "GetSystemMetrics", c-modifiers: "__stdcall";
end;

define inline-only C-function LoadMenu
  parameter hInstance  :: <HINSTANCE>;
  parameter lpMenuName :: <LPCSTR>;
  result value :: <HMENU>;
  c-name: "LoadMenuA", c-modifiers: "__stdcall";
end;

define inline-only C-function LoadMenuIndirect
  parameter lpMenuTemplate ::  /* const */ <LPMENUTEMPLATEA>;
  result value :: <HMENU>;
  c-name: "LoadMenuIndirectA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetMenu
  parameter hWnd       :: <HWND>;
  result value :: <HMENU>;
  c-name: "GetMenu", c-modifiers: "__stdcall";
end;

define inline-only C-function SetMenu
  parameter hWnd       :: <HWND>;
  parameter hMenu      :: <HMENU>;
  result value :: <BOOL>;
  c-name: "SetMenu", c-modifiers: "__stdcall";
end;

define inline-only C-function ChangeMenu
  parameter hMenu      :: <HMENU>;
  parameter cmd        :: <UINT>;
  parameter lpszNewItem :: <LPCSTR>;
  parameter cmdInsert  :: <UINT>;
  parameter flags      :: <UINT>;
  result value :: <BOOL>;
  c-name: "ChangeMenuA", c-modifiers: "__stdcall";
end;

define inline-only C-function HiliteMenuItem
  parameter hWnd       :: <HWND>;
  parameter hMenu      :: <HMENU>;
  parameter uIDHiliteItem :: <UINT>;
  parameter uHilite    :: <UINT>;
  result value :: <BOOL>;
  c-name: "HiliteMenuItem", c-modifiers: "__stdcall";
end;

define inline-only C-function GetMenuString
  parameter hMenu      :: <HMENU>;
  parameter uIDItem    :: <UINT>;
  parameter lpString   :: <LPSTR>;
  parameter nMaxCount  :: <C-int>;
  parameter uFlag      :: <UINT>;
  result value :: <C-int>;
  c-name: "GetMenuStringA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetMenuState
  parameter hMenu      :: <HMENU>;
  parameter uId        :: <UINT>;
  parameter uFlags     :: <UINT>;
  result value :: <UINT>;
  c-name: "GetMenuState", c-modifiers: "__stdcall";
end;

define inline-only C-function DrawMenuBar
  parameter hWnd       :: <HWND>;
  result value :: <BOOL>;
  c-name: "DrawMenuBar", c-modifiers: "__stdcall";
end;

define inline-only C-function GetSystemMenu
  parameter hWnd       :: <HWND>;
  parameter bRevert    :: <BOOL>;
  result value :: <HMENU>;
  c-name: "GetSystemMenu", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateMenu
  result value :: <HMENU>;
  c-name: "CreateMenu", c-modifiers: "__stdcall";
end;

define inline-only C-function CreatePopupMenu
  result value :: <HMENU>;
  c-name: "CreatePopupMenu", c-modifiers: "__stdcall";
end;

define inline-only C-function DestroyMenu
  parameter hMenu      :: <HMENU>;
  result value :: <BOOL>;
  c-name: "DestroyMenu", c-modifiers: "__stdcall";
end;

define inline-only C-function CheckMenuItem
  parameter hMenu      :: <HMENU>;
  parameter uIDCheckItem :: <UINT>;
  parameter uCheck     :: <UINT>;
  result value :: <DWORD>;
  c-name: "CheckMenuItem", c-modifiers: "__stdcall";
end;

define inline-only C-function EnableMenuItem
  parameter hMenu      :: <HMENU>;
  parameter uIDEnableItem :: <UINT>;
  parameter uEnable    :: <UINT>;
  result value :: <BOOL>;
  c-name: "EnableMenuItem", c-modifiers: "__stdcall";
end;

define inline-only C-function GetSubMenu
  parameter hMenu      :: <HMENU>;
  parameter nPos       :: <C-int>;
  result value :: <HMENU>;
  c-name: "GetSubMenu", c-modifiers: "__stdcall";
end;

define inline-only C-function GetMenuItemID
  parameter hMenu      :: <HMENU>;
  parameter nPos       :: <C-int>;
  result value :: <UINT>;
  c-name: "GetMenuItemID", c-modifiers: "__stdcall";
end;

define inline-only C-function GetMenuItemCount
  parameter hMenu      :: <HMENU>;
  result value :: <C-int>;
  c-name: "GetMenuItemCount", c-modifiers: "__stdcall";
end;

define inline-only C-function InsertMenu
  parameter hMenu      :: <HMENU>;
  parameter uPosition  :: <UINT>;
  parameter uFlags     :: <UINT>;
  parameter uIDNewItem :: <UINT>;
  parameter lpNewItem  :: <LPCSTR>;
  result value :: <BOOL>;
  c-name: "InsertMenuA", c-modifiers: "__stdcall";
end;

define inline-only C-function AppendMenu
  parameter hMenu      :: <HMENU>;
  parameter uFlags     :: <UINT>;
  parameter uIDNewItem :: <UINT>;
  parameter lpNewItem  :: <LPCSTR>;
  result value :: <BOOL>;
  c-name: "AppendMenuA", c-modifiers: "__stdcall";
end;

define inline-only C-function ModifyMenu
  parameter hMnu       :: <HMENU>;
  parameter uPosition  :: <UINT>;
  parameter uFlags     :: <UINT>;
  parameter uIDNewItem :: <UINT>;
  parameter lpNewItem  :: <LPCSTR>;
  result value :: <BOOL>;
  c-name: "ModifyMenuA", c-modifiers: "__stdcall";
end;

define inline-only C-function RemoveMenu
  parameter hMenu      :: <HMENU>;
  parameter uPosition  :: <UINT>;
  parameter uFlags     :: <UINT>;
  result value :: <BOOL>;
  c-name: "RemoveMenu", c-modifiers: "__stdcall";
end;

define inline-only C-function DeleteMenu
  parameter hMenu      :: <HMENU>;
  parameter uPosition  :: <UINT>;
  parameter uFlags     :: <UINT>;
  result value :: <BOOL>;
  c-name: "DeleteMenu", c-modifiers: "__stdcall";
end;

define inline-only C-function SetMenuItemBitmaps
  parameter hMenu      :: <HMENU>;
  parameter uPosition  :: <UINT>;
  parameter uFlags     :: <UINT>;
  parameter hBitmapUnchecked :: <HBITMAP>;
  parameter hBitmapChecked :: <HBITMAP>;
  result value :: <BOOL>;
  c-name: "SetMenuItemBitmaps", c-modifiers: "__stdcall";
end;

define inline-only C-function GetMenuCheckMarkDimensions
  result value :: <LONG>;
  c-name: "GetMenuCheckMarkDimensions", c-modifiers: "__stdcall";
end;

define inline-only C-function TrackPopupMenu
  parameter hMenu      :: <HMENU>;
  parameter uFlags     :: <UINT>;
  parameter x          :: <C-int>;
  parameter y          :: <C-int>;
  parameter nReserved  :: <C-int>;
  parameter hWnd       :: <HWND>;
  parameter prcRect    ::  /* const */ <LPRECT>;
  result value :: <BOOL>;
  c-name: "TrackPopupMenu", c-modifiers: "__stdcall";
end;
define inline-only constant $MNC-IGNORE                 =    0;
define inline-only constant $MNC-CLOSE                  =    1;
define inline-only constant $MNC-EXECUTE                =    2;
define inline-only constant $MNC-SELECT                 =    3;

define C-struct <TPMPARAMS>
  sealed inline-only slot cbSize-value   :: <UINT>;
  sealed inline-only slot rcExclude-value :: <RECT>;
  pointer-type-name: <LPTPMPARAMS>;
  c-name: "struct tagTPMPARAMS";
end C-struct <TPMPARAMS>;

define inline-only C-function TrackPopupMenuEx
  parameter hmenu1     :: <HMENU>;
  parameter uint2      :: <UINT>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter hwnd5      :: <HWND>;
  parameter lptpmparams6 :: <LPTPMPARAMS>;
  result value :: <BOOL>;
  c-name: "TrackPopupMenuEx", c-modifiers: "__stdcall";
end;
define inline-only constant $MIIM-STATE                 = #x00000001;
define inline-only constant $MIIM-ID                    = #x00000002;
define inline-only constant $MIIM-SUBMENU               = #x00000004;
define inline-only constant $MIIM-CHECKMARKS            = #x00000008;
define inline-only constant $MIIM-TYPE                  = #x00000010;
define inline-only constant $MIIM-DATA                  = #x00000020;

define C-struct <MENUITEMINFOA>
  sealed inline-only slot cbSize-value   :: <UINT>;
  sealed inline-only slot fMask-value    :: <UINT>;
  sealed inline-only slot fType-value    :: <UINT>;
  sealed inline-only slot fState-value   :: <UINT>;
  sealed inline-only slot wID-value      :: <UINT>;
  sealed inline-only slot hSubMenu-value :: <HMENU>;
  sealed inline-only slot hbmpChecked-value :: <HBITMAP>;
  sealed inline-only slot hbmpUnchecked-value :: <HBITMAP>;
  sealed inline-only slot dwItemData-value :: <DWORD>;
  sealed inline-only slot dwTypeData-value :: <LPSTR>;
  sealed inline-only slot cch-value      :: <UINT>;
  pointer-type-name: <LPMENUITEMINFOA>;
  c-name: "struct tagMENUITEMINFOA";
end C-struct <MENUITEMINFOA>;
define inline constant <MENUITEMINFO> = <MENUITEMINFOA>;
define inline constant <LPMENUITEMINFO> = <LPMENUITEMINFOA>;
define inline constant <LPCMENUITEMINFOA> =
	/* const */ <LPMENUITEMINFOA>;
define inline constant <LPCMENUITEMINFO> = <LPCMENUITEMINFOA>;

define inline-only C-function InsertMenuItem
  parameter hmenu1     :: <HMENU>;
  parameter uint2      :: <UINT>;
  parameter bool3      :: <BOOL>;
  parameter lpcmenuiteminfoa4 :: <LPCMENUITEMINFOA>;
  result value :: <BOOL>;
  c-name: "InsertMenuItemA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetMenuItemInfo
  parameter hmenu1     :: <HMENU>;
  parameter uint2      :: <UINT>;
  parameter bool3      :: <BOOL>;
  parameter lpmenuiteminfoa4 :: <LPMENUITEMINFOA>;
  result value :: <BOOL>;
  c-name: "GetMenuItemInfoA", c-modifiers: "__stdcall";
end;

define inline-only C-function SetMenuItemInfo
  parameter hmenu1     :: <HMENU>;
  parameter uint2      :: <UINT>;
  parameter bool3      :: <BOOL>;
  parameter lpcmenuiteminfoa4 :: <LPCMENUITEMINFOA>;
  result value :: <BOOL>;
  c-name: "SetMenuItemInfoA", c-modifiers: "__stdcall";
end;
define inline-only constant $GMDI-USEDISABLED           = #x0001;
define inline-only constant $GMDI-GOINTOPOPUPS          = #x0002;

define inline-only C-function GetMenuDefaultItem
  parameter hMenu      :: <HMENU>;
  parameter fByPos     :: <UINT>;
  parameter gmdiFlags  :: <UINT>;
  result value :: <UINT>;
  c-name: "GetMenuDefaultItem", c-modifiers: "__stdcall";
end;

define inline-only C-function SetMenuDefaultItem
  parameter hMenu      :: <HMENU>;
  parameter uItem      :: <UINT>;
  parameter fByPos     :: <UINT>;
  result value :: <BOOL>;
  c-name: "SetMenuDefaultItem", c-modifiers: "__stdcall";
end;

define inline-only C-function GetMenuItemRect
  parameter hWnd       :: <HWND>;
  parameter hMenu      :: <HMENU>;
  parameter uItem      :: <UINT>;
  parameter lprcItem   :: <LPRECT>;
  result value :: <BOOL>;
  c-name: "GetMenuItemRect", c-modifiers: "__stdcall";
end;

define inline-only C-function MenuItemFromPoint
  parameter hWnd       :: <HWND>;
  parameter hMenu      :: <HMENU>;
  parameter ptScreen   :: <POINT>;
  result value :: <C-int>;
  c-name: "MenuItemFromPoint", c-modifiers: "__stdcall";
end;
define inline-only constant $TPM-LEFTBUTTON             = #x0000;
define inline-only constant $TPM-RIGHTBUTTON            = #x0002;
define inline-only constant $TPM-LEFTALIGN              = #x0000;
define inline-only constant $TPM-CENTERALIGN            = #x0004;
define inline-only constant $TPM-RIGHTALIGN             = #x0008;
define inline-only constant $TPM-TOPALIGN               = #x0000;
define inline-only constant $TPM-VCENTERALIGN           = #x0010;
define inline-only constant $TPM-BOTTOMALIGN            = #x0020;
define inline-only constant $TPM-HORIZONTAL             = #x0000;
define inline-only constant $TPM-VERTICAL               = #x0040;
define inline-only constant $TPM-NONOTIFY               = #x0080;
define inline-only constant $TPM-RETURNCMD              = #x0100;

define C-struct <DROPSTRUCT>
  sealed inline-only slot hwndSource-value :: <HWND>;
  sealed inline-only slot hwndSink-value :: <HWND>;
  sealed inline-only slot wFmt-value     :: <DWORD>;
  sealed inline-only slot dwData-value   :: <DWORD>;
  sealed inline-only slot ptDrop-value   :: <POINT>;
  sealed inline-only slot dwControlData-value :: <DWORD>;
  pointer-type-name: <LPDROPSTRUCT>;
  c-name: "struct tagDROPSTRUCT";
end C-struct <DROPSTRUCT>;
define inline constant <PDROPSTRUCT> = <LPDROPSTRUCT>;
define inline-only constant $DOF-EXECUTABLE             = #x8001;
define inline-only constant $DOF-DOCUMENT               = #x8002;
define inline-only constant $DOF-DIRECTORY              = #x8003;
define inline-only constant $DOF-MULTIPLE               = #x8004;
define inline-only constant $DOF-PROGMAN                = #x0001;
define inline-only constant $DOF-SHELLDATA              = #x0002;
define inline-only constant $DO-DROPFILE                =
	as(<machine-word>, #x454C4946);
define inline-only constant $DO-PRINTFILE               =
	as(<machine-word>, #x544E5250);

define inline-only C-function DragObject
  parameter hwnd1      :: <HWND>;
  parameter hwnd2      :: <HWND>;
  parameter uint3      :: <UINT>;
  parameter dword4     :: <DWORD>;
  parameter hcursor5   :: <HCURSOR>;
  result value :: <DWORD>;
  c-name: "DragObject", c-modifiers: "__stdcall";
end;

define inline-only C-function DragDetect
  parameter hwnd1      :: <HWND>;
  parameter point2     :: <POINT>;
  result value :: <BOOL>;
  c-name: "DragDetect", c-modifiers: "__stdcall";
end;

define inline-only C-function DrawIcon
  parameter hDC        :: <HDC>;
  parameter X          :: <C-int>;
  parameter Y          :: <C-int>;
  parameter hIcon      :: <HICON>;
  result value :: <BOOL>;
  c-name: "DrawIcon", c-modifiers: "__stdcall";
end;
define inline-only constant $DT-TOP                     = #x00000000;
define inline-only constant $DT-LEFT                    = #x00000000;
define inline-only constant $DT-CENTER                  = #x00000001;
define inline-only constant $DT-RIGHT                   = #x00000002;
define inline-only constant $DT-VCENTER                 = #x00000004;
define inline-only constant $DT-BOTTOM                  = #x00000008;
define inline-only constant $DT-WORDBREAK               = #x00000010;
define inline-only constant $DT-SINGLELINE              = #x00000020;
define inline-only constant $DT-EXPANDTABS              = #x00000040;
define inline-only constant $DT-TABSTOP                 = #x00000080;
define inline-only constant $DT-NOCLIP                  = #x00000100;
define inline-only constant $DT-EXTERNALLEADING         = #x00000200;
define inline-only constant $DT-CALCRECT                = #x00000400;
define inline-only constant $DT-NOPREFIX                = #x00000800;
define inline-only constant $DT-INTERNAL                = #x00001000;
define inline-only constant $DT-EDITCONTROL             = #x00002000;
define inline-only constant $DT-PATH-ELLIPSIS           = #x00004000;
define inline-only constant $DT-END-ELLIPSIS            = #x00008000;
define inline-only constant $DT-MODIFYSTRING            = #x00010000;
define inline-only constant $DT-RTLREADING              = #x00020000;
define inline-only constant $DT-WORD-ELLIPSIS           = #x00040000;

define C-struct <DRAWTEXTPARAMS>
  sealed inline-only slot cbSize-value   :: <UINT>;
  sealed inline-only slot iTabLength-value :: <C-int>;
  sealed inline-only slot iLeftMargin-value :: <C-int>;
  sealed inline-only slot iRightMargin-value :: <C-int>;
  sealed inline-only slot uiLengthDrawn-value :: <UINT>;
  pointer-type-name: <LPDRAWTEXTPARAMS>;
  c-name: "struct tagDRAWTEXTPARAMS";
end C-struct <DRAWTEXTPARAMS>;

define inline-only C-function DrawText
  parameter hDC        :: <HDC>;
  parameter lpString   :: <LPCSTR>;
  parameter nCount     :: <C-int>;
  parameter lpRect     :: <LPRECT>;
  parameter uFormat    :: <UINT>;
  result value :: <C-int>;
  c-name: "DrawTextA", c-modifiers: "__stdcall";
end;

define inline-only C-function DrawTextEx
  parameter hdc1       :: <HDC>;
  parameter lpstr2     :: <LPSTR>;
  parameter int3       :: <C-int>;
  parameter lprect4    :: <LPRECT>;
  parameter uint5      :: <UINT>;
  parameter lpdrawtextparams6 :: <LPDRAWTEXTPARAMS>;
  result value :: <C-int>;
  c-name: "DrawTextExA", c-modifiers: "__stdcall";
end;

define inline-only C-function GrayString
  parameter hDC        :: <HDC>;
  parameter hBrush     :: <HBRUSH>;
  parameter lpOutputFunc :: <GRAYSTRINGPROC>;
  parameter lpData     :: <LPARAM>;
  parameter nCount     :: <C-int>;
  parameter X          :: <C-int>;
  parameter Y          :: <C-int>;
  parameter nWidth     :: <C-int>;
  parameter nHeight    :: <C-int>;
  result value :: <BOOL>;
  c-name: "GrayStringA", c-modifiers: "__stdcall";
end;
define inline-only constant $DST-COMPLEX                = #x0000;
define inline-only constant $DST-TEXT                   = #x0001;
define inline-only constant $DST-PREFIXTEXT             = #x0002;
define inline-only constant $DST-ICON                   = #x0003;
define inline-only constant $DST-BITMAP                 = #x0004;
define inline-only constant $DSS-NORMAL                 = #x0000;
define inline-only constant $DSS-UNION                  = #x0010;
define inline-only constant $DSS-DISABLED               = #x0020;
define inline-only constant $DSS-MONO                   = #x0080;
define inline-only constant $DSS-RIGHT                  = #x8000;

define inline-only C-function DrawState
  parameter hdc1       :: <HDC>;
  parameter hbrush2    :: <HBRUSH>;
  parameter drawstateproc3 :: <DRAWSTATEPROC>;
  parameter lparam4    :: <LPARAM>;
  parameter wparam5    :: <WPARAM>;
  parameter int6       :: <C-int>;
  parameter int7       :: <C-int>;
  parameter int8       :: <C-int>;
  parameter int9       :: <C-int>;
  parameter uint10     :: <UINT>;
  result value :: <BOOL>;
  c-name: "DrawStateA", c-modifiers: "__stdcall";
end;

define inline-only C-function TabbedTextOut
  parameter hDC        :: <HDC>;
  parameter X          :: <C-int>;
  parameter Y          :: <C-int>;
  parameter lpString   :: <LPCSTR>;
  parameter nCount     :: <C-int>;
  parameter nTabPositions :: <C-int>;
  parameter lpnTabStopPositions :: <LPINT>;
  parameter nTabOrigin :: <C-int>;
  result value :: <LONG>;
  c-name: "TabbedTextOutA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetTabbedTextExtent
  parameter hDC        :: <HDC>;
  parameter lpString   :: <LPCSTR>;
  parameter nCount     :: <C-int>;
  parameter nTabPositions :: <C-int>;
  parameter lpnTabStopPositions :: <LPINT>;
  result value :: <DWORD>;
  c-name: "GetTabbedTextExtentA", c-modifiers: "__stdcall";
end;

define inline-only C-function UpdateWindow
  parameter hWnd       :: <HWND>;
  result value :: <BOOL>;
  c-name: "UpdateWindow", c-modifiers: "__stdcall";
end;

define inline-only C-function SetActiveWindow
  parameter hWnd       :: <HWND>;
  result value :: <HWND>;
  c-name: "SetActiveWindow", c-modifiers: "__stdcall";
end;

define inline-only C-function GetForegroundWindow
  result value :: <HWND>;
  c-name: "GetForegroundWindow", c-modifiers: "__stdcall";
end;

define inline-only C-function PaintDesktop
  parameter hdc        :: <HDC>;
  result value :: <BOOL>;
  c-name: "PaintDesktop", c-modifiers: "__stdcall";
end;

define inline-only C-function SetForegroundWindow
  parameter hWnd       :: <HWND>;
  result value :: <BOOL>;
  c-name: "SetForegroundWindow", c-modifiers: "__stdcall";
end;

define inline-only C-function WindowFromDC
  parameter hDC        :: <HDC>;
  result value :: <HWND>;
  c-name: "WindowFromDC", c-modifiers: "__stdcall";
end;

define inline-only C-function GetDC
  parameter hWnd       :: <HWND>;
  result value :: <HDC>;
  c-name: "GetDC", c-modifiers: "__stdcall";
end;

define inline-only C-function GetDCEx
  parameter hWnd       :: <HWND>;
  parameter hrgnClip   :: <HRGN>;
  parameter flags      :: <DWORD>;
  result value :: <HDC>;
  c-name: "GetDCEx", c-modifiers: "__stdcall";
end;
define inline-only constant $DCX-WINDOW                 = #x00000001;
define inline-only constant $DCX-CACHE                  = #x00000002;
define inline-only constant $DCX-NORESETATTRS           = #x00000004;
define inline-only constant $DCX-CLIPCHILDREN           = #x00000008;
define inline-only constant $DCX-CLIPSIBLINGS           = #x00000010;
define inline-only constant $DCX-PARENTCLIP             = #x00000020;
define inline-only constant $DCX-EXCLUDERGN             = #x00000040;
define inline-only constant $DCX-INTERSECTRGN           = #x00000080;
define inline-only constant $DCX-EXCLUDEUPDATE          = #x00000100;
define inline-only constant $DCX-INTERSECTUPDATE        = #x00000200;
define inline-only constant $DCX-LOCKWINDOWUPDATE       = #x00000400;
define inline-only constant $DCX-VALIDATE               = #x00200000;

define inline-only C-function GetWindowDC
  parameter hWnd       :: <HWND>;
  result value :: <HDC>;
  c-name: "GetWindowDC", c-modifiers: "__stdcall";
end;

define inline-only C-function ReleaseDC
  parameter hWnd       :: <HWND>;
  parameter hDC        :: <HDC>;
  result value :: <C-int>;
  c-name: "ReleaseDC", c-modifiers: "__stdcall";
end;

define inline-only C-function BeginPaint
  parameter hWnd       :: <HWND>;
  parameter lpPaint    :: <LPPAINTSTRUCT>;
  result value :: <HDC>;
  c-name: "BeginPaint", c-modifiers: "__stdcall";
end;

define inline-only C-function EndPaint
  parameter hWnd       :: <HWND>;
  parameter lpPaint    ::  /* const */ <LPPAINTSTRUCT>;
  result value :: <BOOL>;
  c-name: "EndPaint", c-modifiers: "__stdcall";
end;

define inline-only C-function GetUpdateRect
  parameter hWnd       :: <HWND>;
  parameter lpRect     :: <LPRECT>;
  parameter bErase     :: <BOOL>;
  result value :: <BOOL>;
  c-name: "GetUpdateRect", c-modifiers: "__stdcall";
end;

define inline-only C-function GetUpdateRgn
  parameter hWnd       :: <HWND>;
  parameter hRgn       :: <HRGN>;
  parameter bErase     :: <BOOL>;
  result value :: <C-int>;
  c-name: "GetUpdateRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function SetWindowRgn
  parameter hWnd       :: <HWND>;
  parameter hRgn       :: <HRGN>;
  parameter bRedraw    :: <BOOL>;
  result value :: <C-int>;
  c-name: "SetWindowRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function GetWindowRgn
  parameter hWnd       :: <HWND>;
  parameter hRgn       :: <HRGN>;
  result value :: <C-int>;
  c-name: "GetWindowRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function ExcludeUpdateRgn
  parameter hDC        :: <HDC>;
  parameter hWnd       :: <HWND>;
  result value :: <C-int>;
  c-name: "ExcludeUpdateRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function InvalidateRect
  parameter hWnd       :: <HWND>;
  parameter lpRect     ::  /* const */ <LPRECT>;
  parameter bErase     :: <BOOL>;
  result value :: <BOOL>;
  c-name: "InvalidateRect", c-modifiers: "__stdcall";
end;

define inline-only C-function ValidateRect
  parameter hWnd       :: <HWND>;
  parameter lpRect     ::  /* const */ <LPRECT>;
  result value :: <BOOL>;
  c-name: "ValidateRect", c-modifiers: "__stdcall";
end;

define inline-only C-function InvalidateRgn
  parameter hWnd       :: <HWND>;
  parameter hRgn       :: <HRGN>;
  parameter bErase     :: <BOOL>;
  result value :: <BOOL>;
  c-name: "InvalidateRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function ValidateRgn
  parameter hWnd       :: <HWND>;
  parameter hRgn       :: <HRGN>;
  result value :: <BOOL>;
  c-name: "ValidateRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function RedrawWindow
  parameter hWnd       :: <HWND>;
  parameter lprcUpdate ::  /* const */ <LPRECT>;
  parameter hrgnUpdate :: <HRGN>;
  parameter flags      :: <UINT>;
  result value :: <BOOL>;
  c-name: "RedrawWindow", c-modifiers: "__stdcall";
end;
define inline-only constant $RDW-INVALIDATE             = #x0001;
define inline-only constant $RDW-INTERNALPAINT          = #x0002;
define inline-only constant $RDW-ERASE                  = #x0004;
define inline-only constant $RDW-VALIDATE               = #x0008;
define inline-only constant $RDW-NOINTERNALPAINT        = #x0010;
define inline-only constant $RDW-NOERASE                = #x0020;
define inline-only constant $RDW-NOCHILDREN             = #x0040;
define inline-only constant $RDW-ALLCHILDREN            = #x0080;
define inline-only constant $RDW-UPDATENOW              = #x0100;
define inline-only constant $RDW-ERASENOW               = #x0200;
define inline-only constant $RDW-FRAME                  = #x0400;
define inline-only constant $RDW-NOFRAME                = #x0800;

define inline-only C-function LockWindowUpdate
  parameter hWndLock   :: <HWND>;
  result value :: <BOOL>;
  c-name: "LockWindowUpdate", c-modifiers: "__stdcall";
end;

define inline-only C-function ScrollWindow
  parameter hWnd       :: <HWND>;
  parameter XAmount    :: <C-int>;
  parameter YAmount    :: <C-int>;
  parameter lpRect     ::  /* const */ <LPRECT>;
  parameter lpClipRect ::  /* const */ <LPRECT>;
  result value :: <BOOL>;
  c-name: "ScrollWindow", c-modifiers: "__stdcall";
end;

define inline-only C-function ScrollDC
  parameter hDC        :: <HDC>;
  parameter dx         :: <C-int>;
  parameter dy         :: <C-int>;
  parameter lprcScroll ::  /* const */ <LPRECT>;
  parameter lprcClip   ::  /* const */ <LPRECT>;
  parameter hrgnUpdate :: <HRGN>;
  parameter lprcUpdate :: <LPRECT>;
  result value :: <BOOL>;
  c-name: "ScrollDC", c-modifiers: "__stdcall";
end;

define inline-only C-function ScrollWindowEx
  parameter hWnd       :: <HWND>;
  parameter dx         :: <C-int>;
  parameter dy         :: <C-int>;
  parameter prcScroll  ::  /* const */ <LPRECT>;
  parameter prcClip    ::  /* const */ <LPRECT>;
  parameter hrgnUpdate :: <HRGN>;
  parameter prcUpdate  :: <LPRECT>;
  parameter flags      :: <UINT>;
  result value :: <C-int>;
  c-name: "ScrollWindowEx", c-modifiers: "__stdcall";
end;
define inline-only constant $SW-SCROLLCHILDREN          = #x0001;
define inline-only constant $SW-INVALIDATE              = #x0002;
define inline-only constant $SW-ERASE                   = #x0004;

define inline-only C-function GetScrollPos
  parameter hWnd       :: <HWND>;
  parameter nBar       :: <C-int>;
  result value :: <C-int>;
  c-name: "GetScrollPos", c-modifiers: "__stdcall";
end;

define inline-only C-function GetScrollRange
  parameter hWnd       :: <HWND>;
  parameter nBar       :: <C-int>;
  output parameter lpMinPos :: <LPint>;
  output parameter lpMaxPos :: <LPint>;
  result value :: <BOOL>;
  c-name: "GetScrollRange", c-modifiers: "__stdcall";
end;

define inline-only C-function ShowScrollBar
  parameter hWnd       :: <HWND>;
  parameter wBar       :: <C-int>;
  parameter bShow      :: <BOOL>;
  result value :: <BOOL>;
  c-name: "ShowScrollBar", c-modifiers: "__stdcall";
end;

define inline-only C-function EnableScrollBar
  parameter hWnd       :: <HWND>;
  parameter wSBflags   :: <UINT>;
  parameter wArrows    :: <UINT>;
  result value :: <BOOL>;
  c-name: "EnableScrollBar", c-modifiers: "__stdcall";
end;
define inline-only constant $ESB-ENABLE-BOTH            = #x0000;
define inline-only constant $ESB-DISABLE-BOTH           = #x0003;
define inline-only constant $ESB-DISABLE-LEFT           = #x0001;
define inline-only constant $ESB-DISABLE-RIGHT          = #x0002;
define inline-only constant $ESB-DISABLE-UP             = #x0001;
define inline-only constant $ESB-DISABLE-DOWN           = #x0002;

define inline-only C-function SetProp
  parameter hWnd       :: <HWND>;
  parameter lpString   :: <LPCSTR>;
  parameter hData      :: <HANDLE>;
  result value :: <BOOL>;
  c-name: "SetPropA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetProp
  parameter hWnd       :: <HWND>;
  parameter lpString   :: <LPCSTR>;
  result value :: <HANDLE>;
  c-name: "GetPropA", c-modifiers: "__stdcall";
end;

define inline-only C-function RemoveProp
  parameter hWnd       :: <HWND>;
  parameter lpString   :: <LPCSTR>;
  result value :: <HANDLE>;
  c-name: "RemovePropA", c-modifiers: "__stdcall";
end;

define inline-only C-function EnumPropsEx
  parameter hWnd       :: <HWND>;
  parameter lpEnumFunc :: <PROPENUMPROCEXA>;
  parameter lParam     :: <LPARAM>;
  result value :: <C-int>;
  c-name: "EnumPropsExA", c-modifiers: "__stdcall";
end;

define inline-only C-function EnumProps
  parameter hWnd       :: <HWND>;
  parameter lpEnumFunc :: <PROPENUMPROCA>;
  result value :: <C-int>;
  c-name: "EnumPropsA", c-modifiers: "__stdcall";
end;

define inline-only C-function SetWindowText
  parameter hWnd       :: <HWND>;
  parameter lpString   :: <LPCSTR>;
  result value :: <BOOL>;
  c-name: "SetWindowTextA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetWindowText
  parameter hWnd       :: <HWND>;
  parameter lpString   :: <LPSTR>;
  parameter nMaxCount  :: <C-int>;
  result value :: <C-int>;
  c-name: "GetWindowTextA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetWindowTextLength
  parameter hWnd       :: <HWND>;
  result value :: <C-int>;
  c-name: "GetWindowTextLengthA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetClientRect
  parameter hWnd       :: <HWND>;
  parameter lpRect     :: <LPRECT>;
  result value :: <BOOL>;
  c-name: "GetClientRect", c-modifiers: "__stdcall";
end;

define inline-only C-function GetWindowRect
  parameter hWnd       :: <HWND>;
  parameter lpRect     :: <LPRECT>;
  result value :: <BOOL>;
  c-name: "GetWindowRect", c-modifiers: "__stdcall";
end;

define inline-only C-function AdjustWindowRect
  parameter lpRect     :: <LPRECT>;
  parameter dwStyle    :: <DWORD>;
  parameter bMenu      :: <BOOL>;
  result value :: <BOOL>;
  c-name: "AdjustWindowRect", c-modifiers: "__stdcall";
end;

define inline-only C-function AdjustWindowRectEx
  parameter lpRect     :: <LPRECT>;
  parameter dwStyle    :: <DWORD>;
  parameter bMenu      :: <BOOL>;
  parameter dwExStyle  :: <DWORD>;
  result value :: <BOOL>;
  c-name: "AdjustWindowRectEx", c-modifiers: "__stdcall";
end;
define inline-only constant $HELPINFO-WINDOW            = #x0001;
define inline-only constant $HELPINFO-MENUITEM          = #x0002;

define C-struct <HELPINFO>
  sealed inline-only slot cbSize-value   :: <UINT>;
  sealed inline-only slot iContextType-value :: <C-int>;
  sealed inline-only slot iCtrlId-value  :: <C-int>;
  sealed inline-only slot hItemHandle-value :: <HANDLE>;
  sealed inline-only slot dwContextId-value :: <DWORD>;
  sealed inline-only slot MousePos-value :: <POINT>;
  pointer-type-name: <LPHELPINFO>;
  c-name: "struct tagHELPINFO";
end C-struct <HELPINFO>;

define inline-only C-function SetWindowContextHelpId
  parameter hwnd1      :: <HWND>;
  parameter dword2     :: <DWORD>;
  result value :: <BOOL>;
  c-name: "SetWindowContextHelpId", c-modifiers: "__stdcall";
end;

define inline-only C-function GetWindowContextHelpId
  parameter hwnd1      :: <HWND>;
  result value :: <DWORD>;
  c-name: "GetWindowContextHelpId", c-modifiers: "__stdcall";
end;

define inline-only C-function SetMenuContextHelpId
  parameter hmenu1     :: <HMENU>;
  parameter dword2     :: <DWORD>;
  result value :: <BOOL>;
  c-name: "SetMenuContextHelpId", c-modifiers: "__stdcall";
end;

define inline-only C-function GetMenuContextHelpId
  parameter hmenu1     :: <HMENU>;
  result value :: <DWORD>;
  c-name: "GetMenuContextHelpId", c-modifiers: "__stdcall";
end;
define inline-only constant $MB-OK                      = #x00000000;
define inline-only constant $MB-OKCANCEL                = #x00000001;
define inline-only constant $MB-ABORTRETRYIGNORE        = #x00000002;
define inline-only constant $MB-YESNOCANCEL             = #x00000003;
define inline-only constant $MB-YESNO                   = #x00000004;
define inline-only constant $MB-RETRYCANCEL             = #x00000005;
define inline-only constant $MB-ICONHAND                = #x00000010;
define inline-only constant $MB-ICONQUESTION            = #x00000020;
define inline-only constant $MB-ICONEXCLAMATION         = #x00000030;
define inline-only constant $MB-ICONASTERISK            = #x00000040;
define inline-only constant $MB-USERICON                = #x00000080;
define inline-only constant $MB-DEFBUTTON1              = #x00000000;
define inline-only constant $MB-DEFBUTTON2              = #x00000100;
define inline-only constant $MB-DEFBUTTON3              = #x00000200;
define inline-only constant $MB-DEFBUTTON4              = #x00000300;
define inline-only constant $MB-APPLMODAL               = #x00000000;
define inline-only constant $MB-SYSTEMMODAL             = #x00001000;
define inline-only constant $MB-TASKMODAL               = #x00002000;
define inline-only constant $MB-HELP                    = #x00004000;
define inline-only constant $MB-NOFOCUS                 = #x00008000;
define inline-only constant $MB-SETFOREGROUND           = #x00010000;
define inline-only constant $MB-DEFAULT-DESKTOP-ONLY    = #x00020000;
define inline-only constant $MB-TOPMOST                 = #x00040000;
define inline-only constant $MB-RIGHT                   = #x00080000;
define inline-only constant $MB-RTLREADING              = #x00100000;
define inline-only constant $MB-TYPEMASK                = #x0000000F;
define inline-only constant $MB-ICONMASK                = #x000000F0;
define inline-only constant $MB-DEFMASK                 = #x00000F00;
define inline-only constant $MB-MODEMASK                = #x00003000;
define inline-only constant $MB-MISCMASK                = #x0000C000;

define inline-only C-function MessageBox
  parameter hWnd       :: <HWND>;
  parameter lpText     :: <LPCSTR>;
  parameter lpCaption  :: <LPCSTR>;
  parameter uType      :: <UINT>;
  result value :: <C-int>;
  c-name: "MessageBoxA", c-modifiers: "__stdcall";
end;

define inline-only C-function MessageBoxEx
  parameter hWnd       :: <HWND>;
  parameter lpText     :: <LPCSTR>;
  parameter lpCaption  :: <LPCSTR>;
  parameter uType      :: <UINT>;
  parameter wLanguageId :: <WORD>;
  result value :: <C-int>;
  c-name: "MessageBoxExA", c-modifiers: "__stdcall";
end;
define C-subtype <MSGBOXCALLBACK> ( <C-function-pointer> ) end;

define C-struct <MSGBOXPARAMSA>
  sealed inline-only slot cbSize-value   :: <UINT>;
  sealed inline-only slot hwndOwner-value :: <HWND>;
  sealed inline-only slot hInstance-value :: <HINSTANCE>;
  sealed inline-only slot lpszText-value :: <LPCSTR>;
  sealed inline-only slot lpszCaption-value :: <LPCSTR>;
  sealed inline-only slot dwStyle-value  :: <DWORD>;
  sealed inline-only slot lpszIcon-value :: <LPCSTR>;
  sealed inline-only slot dwContextHelpId-value :: <DWORD>;
  sealed inline-only slot lpfnMsgBoxCallback-value :: <MSGBOXCALLBACK>;
  sealed inline-only slot dwLanguageId-value :: <DWORD>;
  pointer-type-name: <LPMSGBOXPARAMSA>;
  c-name: "struct tagMSGBOXPARAMSA";
end C-struct <MSGBOXPARAMSA>;
define inline constant <PMSGBOXPARAMSA> = <LPMSGBOXPARAMSA>;
define inline constant <MSGBOXPARAMS> = <MSGBOXPARAMSA>;
define inline constant <PMSGBOXPARAMS> = <PMSGBOXPARAMSA>;
define inline constant <LPMSGBOXPARAMS> = <LPMSGBOXPARAMSA>;

define inline-only C-function MessageBoxIndirect
  parameter lpmsgboxparamsa1 :: <LPMSGBOXPARAMSA>;
  result value :: <C-int>;
  c-name: "MessageBoxIndirectA", c-modifiers: "__stdcall";
end;

define inline-only C-function MessageBeep
  parameter uType      :: <UINT>;
  result value :: <BOOL>;
  c-name: "MessageBeep", c-modifiers: "__stdcall";
end;

define inline-only C-function ShowCursor
  parameter bShow      :: <BOOL>;
  result value :: <C-int>;
  c-name: "ShowCursor", c-modifiers: "__stdcall";
end;

define inline-only C-function SetCursorPos
  parameter X          :: <C-int>;
  parameter Y          :: <C-int>;
  result value :: <BOOL>;
  c-name: "SetCursorPos", c-modifiers: "__stdcall";
end;

define inline-only C-function SetCursor
  parameter hCursor    :: <HCURSOR>;
  result value :: <HCURSOR>;
  c-name: "SetCursor", c-modifiers: "__stdcall";
end;

define inline-only C-function GetCursorPos
  parameter lpPoint    :: <LPPOINT>;
  result value :: <BOOL>;
  c-name: "GetCursorPos", c-modifiers: "__stdcall";
end;

define inline-only C-function ClipCursor
  parameter lpRect     ::  /* const */ <LPRECT>;
  result value :: <BOOL>;
  c-name: "ClipCursor", c-modifiers: "__stdcall";
end;

define inline-only C-function GetClipCursor
  parameter lpRect     :: <LPRECT>;
  result value :: <BOOL>;
  c-name: "GetClipCursor", c-modifiers: "__stdcall";
end;

define inline-only C-function GetCursor
  result value :: <HCURSOR>;
  c-name: "GetCursor", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateCaret
  parameter hWnd       :: <HWND>;
  parameter hBitmap    :: <HBITMAP>;
  parameter nWidth     :: <C-int>;
  parameter nHeight    :: <C-int>;
  result value :: <BOOL>;
  c-name: "CreateCaret", c-modifiers: "__stdcall";
end;

define inline-only C-function GetCaretBlinkTime
  result value :: <UINT>;
  c-name: "GetCaretBlinkTime", c-modifiers: "__stdcall";
end;

define inline-only C-function SetCaretBlinkTime
  parameter uMSeconds  :: <UINT>;
  result value :: <BOOL>;
  c-name: "SetCaretBlinkTime", c-modifiers: "__stdcall";
end;

define inline-only C-function DestroyCaret
  result value :: <BOOL>;
  c-name: "DestroyCaret", c-modifiers: "__stdcall";
end;

define inline-only C-function HideCaret
  parameter hWnd       :: <HWND>;
  result value :: <BOOL>;
  c-name: "HideCaret", c-modifiers: "__stdcall";
end;

define inline-only C-function ShowCaret
  parameter hWnd       :: <HWND>;
  result value :: <BOOL>;
  c-name: "ShowCaret", c-modifiers: "__stdcall";
end;

define inline-only C-function SetCaretPos
  parameter X          :: <C-int>;
  parameter Y          :: <C-int>;
  result value :: <BOOL>;
  c-name: "SetCaretPos", c-modifiers: "__stdcall";
end;

define inline-only C-function GetCaretPos
  parameter lpPoint    :: <LPPOINT>;
  result value :: <BOOL>;
  c-name: "GetCaretPos", c-modifiers: "__stdcall";
end;

define inline-only C-function ClientToScreen
  parameter hWnd       :: <HWND>;
  parameter lpPoint    :: <LPPOINT>;
  result value :: <BOOL>;
  c-name: "ClientToScreen", c-modifiers: "__stdcall";
end;

define inline-only C-function ScreenToClient
  parameter hWnd       :: <HWND>;
  parameter lpPoint    :: <LPPOINT>;
  result value :: <BOOL>;
  c-name: "ScreenToClient", c-modifiers: "__stdcall";
end;

define inline-only C-function MapWindowPoints
  parameter hWndFrom   :: <HWND>;
  parameter hWndTo     :: <HWND>;
  parameter lpPoints   :: <LPPOINT>;
  parameter cPoints    :: <UINT>;
  result value :: <C-int>;
  c-name: "MapWindowPoints", c-modifiers: "__stdcall";
end;

define inline-only C-function WindowFromPoint
  parameter Point      :: <POINT>;
  result value :: <HWND>;
  c-name: "WindowFromPoint", c-modifiers: "__stdcall";
end;

define inline-only C-function ChildWindowFromPoint
  parameter hWndParent :: <HWND>;
  parameter Point      :: <POINT>;
  result value :: <HWND>;
  c-name: "ChildWindowFromPoint", c-modifiers: "__stdcall";
end;
define inline-only constant $CWP-ALL                    = #x0000;
define inline-only constant $CWP-SKIPINVISIBLE          = #x0001;
define inline-only constant $CWP-SKIPDISABLED           = #x0002;
define inline-only constant $CWP-SKIPTRANSPARENT        = #x0004;

define inline-only C-function ChildWindowFromPointEx
  parameter hwnd1      :: <HWND>;
  parameter point2     :: <POINT>;
  parameter uint3      :: <UINT>;
  result value :: <HWND>;
  c-name: "ChildWindowFromPointEx", c-modifiers: "__stdcall";
end;
define inline-only constant $CTLCOLOR-MSGBOX            =    0;
define inline-only constant $CTLCOLOR-EDIT              =    1;
define inline-only constant $CTLCOLOR-LISTBOX           =    2;
define inline-only constant $CTLCOLOR-BTN               =    3;
define inline-only constant $CTLCOLOR-DLG               =    4;
define inline-only constant $CTLCOLOR-SCROLLBAR         =    5;
define inline-only constant $CTLCOLOR-STATIC            =    6;
define inline-only constant $CTLCOLOR-MAX               =    7;
define inline-only constant $COLOR-SCROLLBAR            =    0;
define inline-only constant $COLOR-BACKGROUND           =    1;
define inline-only constant $COLOR-ACTIVECAPTION        =    2;
define inline-only constant $COLOR-INACTIVECAPTION      =    3;
define inline-only constant $COLOR-MENU                 =    4;
define inline-only constant $COLOR-WINDOW               =    5;
define inline-only constant $COLOR-WINDOWFRAME          =    6;
define inline-only constant $COLOR-MENUTEXT             =    7;
define inline-only constant $COLOR-WINDOWTEXT           =    8;
define inline-only constant $COLOR-CAPTIONTEXT          =    9;
define inline-only constant $COLOR-ACTIVEBORDER         =   10;
define inline-only constant $COLOR-INACTIVEBORDER       =   11;
define inline-only constant $COLOR-APPWORKSPACE         =   12;
define inline-only constant $COLOR-HIGHLIGHT            =   13;
define inline-only constant $COLOR-HIGHLIGHTTEXT        =   14;
define inline-only constant $COLOR-BTNFACE              =   15;
define inline-only constant $COLOR-BTNSHADOW            =   16;
define inline-only constant $COLOR-GRAYTEXT             =   17;
define inline-only constant $COLOR-BTNTEXT              =   18;
define inline-only constant $COLOR-INACTIVECAPTIONTEXT  =   19;
define inline-only constant $COLOR-BTNHIGHLIGHT         =   20;
define inline-only constant $COLOR-3DDKSHADOW           =   21;
define inline-only constant $COLOR-3DLIGHT              =   22;
define inline-only constant $COLOR-INFOTEXT             =   23;
define inline-only constant $COLOR-INFOBK               =   24;

define inline-only C-function GetSysColor
  parameter nIndex     :: <C-int>;
  result value :: <DWORD>;
  c-name: "GetSysColor", c-modifiers: "__stdcall";
end;

define inline-only C-function GetSysColorBrush
  parameter nIndex     :: <C-int>;
  result value :: <HBRUSH>;
  c-name: "GetSysColorBrush", c-modifiers: "__stdcall";
end;

define inline-only C-function SetSysColors
  parameter cElements  :: <C-int>;
  parameter lpaElements ::  /* const */ <LPINT>;
  parameter lpaRgbValues ::  /* const */ <LPCOLORREF>;
  result value :: <BOOL>;
  c-name: "SetSysColors", c-modifiers: "__stdcall";
end;

define inline-only C-function DrawFocusRect
  parameter hDC        :: <HDC>;
  parameter lprc       ::  /* const */ <LPRECT>;
  result value :: <BOOL>;
  c-name: "DrawFocusRect", c-modifiers: "__stdcall";
end;

define inline-only C-function FillRect
  parameter hDC        :: <HDC>;
  parameter lprc       ::  /* const */ <LPRECT>;
  parameter hbr        :: <HBRUSH>;
  result value :: <C-int>;
  c-name: "FillRect", c-modifiers: "__stdcall";
end;

define inline-only C-function FrameRect
  parameter hDC        :: <HDC>;
  parameter lprc       ::  /* const */ <LPRECT>;
  parameter hbr        :: <HBRUSH>;
  result value :: <C-int>;
  c-name: "FrameRect", c-modifiers: "__stdcall";
end;

define inline-only C-function InvertRect
  parameter hDC        :: <HDC>;
  parameter lprc       ::  /* const */ <LPRECT>;
  result value :: <BOOL>;
  c-name: "InvertRect", c-modifiers: "__stdcall";
end;

define inline-only C-function SetRect
  parameter lprc       :: <LPRECT>;
  parameter xLeft      :: <C-int>;
  parameter yTop       :: <C-int>;
  parameter xRight     :: <C-int>;
  parameter yBottom    :: <C-int>;
  result value :: <BOOL>;
  c-name: "SetRect", c-modifiers: "__stdcall";
end;

define inline-only C-function SetRectEmpty
  parameter lprc       :: <LPRECT>;
  result value :: <BOOL>;
  c-name: "SetRectEmpty", c-modifiers: "__stdcall";
end;

define inline-only C-function CopyRect
  parameter lprcDst    :: <LPRECT>;
  parameter lprcSrc    ::  /* const */ <LPRECT>;
  result value :: <BOOL>;
  c-name: "CopyRect", c-modifiers: "__stdcall";
end;

define inline-only C-function InflateRect
  parameter lprc       :: <LPRECT>;
  parameter dx         :: <C-int>;
  parameter dy         :: <C-int>;
  result value :: <BOOL>;
  c-name: "InflateRect", c-modifiers: "__stdcall";
end;

define inline-only C-function IntersectRect
  parameter lprcDst    :: <LPRECT>;
  parameter lprcSrc1   ::  /* const */ <LPRECT>;
  parameter lprcSrc2   ::  /* const */ <LPRECT>;
  result value :: <BOOL>;
  c-name: "IntersectRect", c-modifiers: "__stdcall";
end;

define inline-only C-function UnionRect
  parameter lprcDst    :: <LPRECT>;
  parameter lprcSrc1   ::  /* const */ <LPRECT>;
  parameter lprcSrc2   ::  /* const */ <LPRECT>;
  result value :: <BOOL>;
  c-name: "UnionRect", c-modifiers: "__stdcall";
end;

define inline-only C-function SubtractRect
  parameter lprcDst    :: <LPRECT>;
  parameter lprcSrc1   ::  /* const */ <LPRECT>;
  parameter lprcSrc2   ::  /* const */ <LPRECT>;
  result value :: <BOOL>;
  c-name: "SubtractRect", c-modifiers: "__stdcall";
end;

define inline-only C-function OffsetRect
  parameter lprc       :: <LPRECT>;
  parameter dx         :: <C-int>;
  parameter dy         :: <C-int>;
  result value :: <BOOL>;
  c-name: "OffsetRect", c-modifiers: "__stdcall";
end;

define inline-only C-function IsRectEmpty
  parameter lprc       ::  /* const */ <LPRECT>;
  result value :: <BOOL>;
  c-name: "IsRectEmpty", c-modifiers: "__stdcall";
end;

define inline-only C-function EqualRect
  parameter lprc1      ::  /* const */ <LPRECT>;
  parameter lprc2      ::  /* const */ <LPRECT>;
  result value :: <BOOL>;
  c-name: "EqualRect", c-modifiers: "__stdcall";
end;

define inline-only C-function PtInRect
  parameter lprc       ::  /* const */ <LPRECT>;
  parameter pt         :: <POINT>;
  result value :: <BOOL>;
  c-name: "PtInRect", c-modifiers: "__stdcall";
end;

define inline-only C-function GetWindowWord
  parameter hWnd       :: <HWND>;
  parameter nIndex     :: <C-int>;
  result value :: <WORD>;
  c-name: "GetWindowWord", c-modifiers: "__stdcall";
end;

define inline-only C-function SetWindowWord
  parameter hWnd       :: <HWND>;
  parameter nIndex     :: <C-int>;
  parameter wNewWord   :: <WORD>;
  result value :: <WORD>;
  c-name: "SetWindowWord", c-modifiers: "__stdcall";
end;

define inline-only C-function GetWindowLong
  parameter hWnd       :: <HWND>;
  parameter nIndex     :: <C-int>;
  result value :: <LONG>;
  c-name: "GetWindowLongA", c-modifiers: "__stdcall";
end;

define inline-only C-function SetWindowLong
  parameter hWnd       :: <HWND>;
  parameter nIndex     :: <C-int>;
  parameter dwNewLong :: <C-both-long>;
  result value :: <LONG>;
  c-name: "SetWindowLongA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetClassWord
  parameter hWnd       :: <HWND>;
  parameter nIndex     :: <C-int>;
  result value :: <WORD>;
  c-name: "GetClassWord", c-modifiers: "__stdcall";
end;

define inline-only C-function SetClassWord
  parameter hWnd       :: <HWND>;
  parameter nIndex     :: <C-int>;
  parameter wNewWord   :: <WORD>;
  result value :: <WORD>;
  c-name: "SetClassWord", c-modifiers: "__stdcall";
end;

define inline-only C-function GetClassLong
  parameter hWnd       :: <HWND>;
  parameter nIndex     :: <C-int>;
  result value :: <DWORD>;
  c-name: "GetClassLongA", c-modifiers: "__stdcall";
end;

define inline-only C-function SetClassLong
  parameter hWnd       :: <HWND>;
  parameter nIndex     :: <C-int>;
  parameter dwNewLong :: <C-both-long>;
  result value :: <DWORD>;
  c-name: "SetClassLongA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetDesktopWindow
  result value :: <HWND>;
  c-name: "GetDesktopWindow", c-modifiers: "__stdcall";
end;

define inline-only C-function GetParent
  parameter hWnd       :: <HWND>;
  result value :: <HWND>;
  c-name: "GetParent", c-modifiers: "__stdcall";
end;

define inline-only C-function SetParent
  parameter hWndChild  :: <HWND>;
  parameter hWndNewParent :: <HWND>;
  result value :: <HWND>;
  c-name: "SetParent", c-modifiers: "__stdcall";
end;

define inline-only C-function EnumChildWindows
  parameter hWndParent :: <HWND>;
  parameter lpEnumFunc :: <WNDENUMPROC>;
  parameter lParam     :: <LPARAM>;
  result value :: <BOOL>;
  c-name: "EnumChildWindows", c-modifiers: "__stdcall";
end;

define inline-only C-function FindWindow
  parameter lpClassName :: <LPCSTR>;
  parameter lpWindowName :: <LPCSTR>;
  result value :: <HWND>;
  c-name: "FindWindowA", c-modifiers: "__stdcall";
end;

define inline-only C-function FindWindowEx
  parameter hwnd1      :: <HWND>;
  parameter hwnd2      :: <HWND>;
  parameter lpcstr3    :: <LPCSTR>;
  parameter lpcstr4    :: <LPCSTR>;
  result value :: <HWND>;
  c-name: "FindWindowExA", c-modifiers: "__stdcall";
end;

define inline-only C-function EnumWindows
  parameter lpEnumFunc :: <WNDENUMPROC>;
  parameter lParam     :: <LPARAM>;
  result value :: <BOOL>;
  c-name: "EnumWindows", c-modifiers: "__stdcall";
end;

define inline-only C-function GetClassName
  parameter hWnd       :: <HWND>;
  parameter lpClassName :: <LPSTR>;
  parameter nMaxCount  :: <C-int>;
  result value :: <C-int>;
  c-name: "GetClassNameA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetTopWindow
  parameter hWnd       :: <HWND>;
  result value :: <HWND>;
  c-name: "GetTopWindow", c-modifiers: "__stdcall";
end;

define inline-only C-function GetLastActivePopup
  parameter hWnd       :: <HWND>;
  result value :: <HWND>;
  c-name: "GetLastActivePopup", c-modifiers: "__stdcall";
end;
define inline-only constant $GW-HWNDFIRST               =    0;
define inline-only constant $GW-HWNDLAST                =    1;
define inline-only constant $GW-HWNDNEXT                =    2;
define inline-only constant $GW-HWNDPREV                =    3;
define inline-only constant $GW-OWNER                   =    4;
define inline-only constant $GW-CHILD                   =    5;
define inline-only constant $GW-MAX                     =    5;

define inline-only C-function GetWindow
  parameter hWnd       :: <HWND>;
  parameter uCmd       :: <UINT>;
  result value :: <HWND>;
  c-name: "GetWindow", c-modifiers: "__stdcall";
end;

define inline-only C-function SetWindowsHookEx
  parameter idHook     :: <C-int>;
  parameter lpfn       :: <HOOKPROC>;
  parameter hmod       :: <HINSTANCE>;
  parameter dwThreadId :: <DWORD>;
  result value :: <HHOOK>;
  c-name: "SetWindowsHookExA", c-modifiers: "__stdcall";
end;

define inline-only C-function UnhookWindowsHookEx
  parameter hhk        :: <HHOOK>;
  result value :: <BOOL>;
  c-name: "UnhookWindowsHookEx", c-modifiers: "__stdcall";
end;

define inline-only C-function CallNextHookEx
  parameter hhk        :: <HHOOK>;
  parameter nCode      :: <C-int>;
  parameter wParam     :: <WPARAM>;
  parameter lParam     :: <LPARAM>;
  result value :: <LRESULT>;
  c-name: "CallNextHookEx", c-modifiers: "__stdcall";
end;
define inline-only constant $MF-INSERT                  = #x00000000;
define inline-only constant $MF-CHANGE                  = #x00000080;
define inline-only constant $MF-APPEND                  = #x00000100;
define inline-only constant $MF-DELETE                  = #x00000200;
define inline-only constant $MF-REMOVE                  = #x00001000;
define inline-only constant $MF-BYCOMMAND               = #x00000000;
define inline-only constant $MF-BYPOSITION              = #x00000400;
define inline-only constant $MF-SEPARATOR               = #x00000800;
define inline-only constant $MF-ENABLED                 = #x00000000;
define inline-only constant $MF-GRAYED                  = #x00000001;
define inline-only constant $MF-DISABLED                = #x00000002;
define inline-only constant $MF-UNCHECKED               = #x00000000;
define inline-only constant $MF-CHECKED                 = #x00000008;
define inline-only constant $MF-USECHECKBITMAPS         = #x00000200;
define inline-only constant $MF-STRING                  = #x00000000;
define inline-only constant $MF-BITMAP                  = #x00000004;
define inline-only constant $MF-OWNERDRAW               = #x00000100;
define inline-only constant $MF-POPUP                   = #x00000010;
define inline-only constant $MF-MENUBARBREAK            = #x00000020;
define inline-only constant $MF-MENUBREAK               = #x00000040;
define inline-only constant $MF-UNHILITE                = #x00000000;
define inline-only constant $MF-HILITE                  = #x00000080;
define inline-only constant $MF-DEFAULT                 = #x00001000;
define inline-only constant $MF-SYSMENU                 = #x00002000;
define inline-only constant $MF-HELP                    = #x00004000;
define inline-only constant $MF-RIGHTJUSTIFY            = #x00004000;
define inline-only constant $MF-MOUSESELECT             = #x00008000;
define inline-only constant $MFT-RADIOCHECK             = #x00000200;
define inline-only constant $MFT-RIGHTORDER             = #x00002000;
define inline-only constant $MFS-GRAYED                 = #x00000003;

define inline-only C-function CheckMenuRadioItem
  parameter hmenu1     :: <HMENU>;
  parameter uint2      :: <UINT>;
  parameter uint3      :: <UINT>;
  parameter uint4      :: <UINT>;
  parameter uint5      :: <UINT>;
  result value :: <BOOL>;
  c-name: "CheckMenuRadioItem", c-modifiers: "__stdcall";
end;

define C-struct <MENUITEMTEMPLATEHEADER>
  sealed inline-only slot versionNumber-value :: <WORD>;
  sealed inline-only slot offset-value   :: <WORD>;
  pointer-type-name: <LPMENUITEMTEMPLATEHEADER>;
end C-struct <MENUITEMTEMPLATEHEADER>;
define inline constant <PMENUITEMTEMPLATEHEADER> = <LPMENUITEMTEMPLATEHEADER>;

define C-struct <MENUITEMTEMPLATE>
  sealed inline-only slot mtOption-value :: <WORD>;
  sealed inline-only slot mtID-value     :: <WORD>;
  sealed inline-only array slot mtString-array :: <WCHAR>, length: 1,
	address-getter: mtString-value;
  pointer-type-name: <LPMENUITEMTEMPLATE>;
end C-struct <MENUITEMTEMPLATE>;
define inline constant <PMENUITEMTEMPLATE> = <LPMENUITEMTEMPLATE>;
define inline-only constant $MF-END                     = #x00000080;
define inline-only constant $SC-SIZE                    = #xF000;
define inline-only constant $SC-MOVE                    = #xF010;
define inline-only constant $SC-MINIMIZE                = #xF020;
define inline-only constant $SC-MAXIMIZE                = #xF030;
define inline-only constant $SC-NEXTWINDOW              = #xF040;
define inline-only constant $SC-PREVWINDOW              = #xF050;
define inline-only constant $SC-CLOSE                   = #xF060;
define inline-only constant $SC-VSCROLL                 = #xF070;
define inline-only constant $SC-HSCROLL                 = #xF080;
define inline-only constant $SC-MOUSEMENU               = #xF090;
define inline-only constant $SC-KEYMENU                 = #xF100;
define inline-only constant $SC-ARRANGE                 = #xF110;
define inline-only constant $SC-RESTORE                 = #xF120;
define inline-only constant $SC-TASKLIST                = #xF130;
define inline-only constant $SC-SCREENSAVE              = #xF140;
define inline-only constant $SC-HOTKEY                  = #xF150;
define inline-only constant $SC-DEFAULT                 = #xF160;
define inline-only constant $SC-MONITORPOWER            = #xF170;
define inline-only constant $SC-CONTEXTHELP             = #xF180;
define inline-only constant $SC-SEPARATOR               = #xF00F;

define inline-only C-function LoadBitmap
  parameter hInstance  :: <HINSTANCE>;
  parameter lpBitmapName :: <LPCSTR>;
  result value :: <HBITMAP>;
  c-name: "LoadBitmapA", c-modifiers: "__stdcall";
end;

define inline-only C-function LoadCursor
  parameter hInstance  :: <HINSTANCE>;
  parameter lpCursorName :: <LPCSTR>;
  result value :: <HCURSOR>;
  c-name: "LoadCursorA", c-modifiers: "__stdcall";
end;

define inline-only C-function LoadCursorFromFile
  parameter lpFileName :: <LPCSTR>;
  result value :: <HCURSOR>;
  c-name: "LoadCursorFromFileA", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateCursor
  parameter hInst      :: <HINSTANCE>;
  parameter xHotSpot   :: <C-int>;
  parameter yHotSpot   :: <C-int>;
  parameter nWidth     :: <C-int>;
  parameter nHeight    :: <C-int>;
  parameter pvANDPlane ::  /* const */ <C-void*>;
  parameter pvXORPlane ::  /* const */ <C-void*>;
  result value :: <HCURSOR>;
  c-name: "CreateCursor", c-modifiers: "__stdcall";
end;

define inline-only C-function DestroyCursor
  parameter hCursor    :: <HCURSOR>;
  result value :: <BOOL>;
  c-name: "DestroyCursor", c-modifiers: "__stdcall";
end;
define inline-only constant $IDC-ARROW                  =
	MAKEINTRESOURCE(32512);
define inline-only constant $IDC-IBEAM                  =
	MAKEINTRESOURCE(32513);
define inline-only constant $IDC-WAIT                   =
	MAKEINTRESOURCE(32514);
define inline-only constant $IDC-CROSS                  =
	MAKEINTRESOURCE(32515);
define inline-only constant $IDC-UPARROW                =
	MAKEINTRESOURCE(32516);
define inline-only constant $IDC-SIZE                   =
	MAKEINTRESOURCE(32640);
define inline-only constant $IDC-ICON                   =
	MAKEINTRESOURCE(32641);
define inline-only constant $IDC-SIZENWSE               =
	MAKEINTRESOURCE(32642);
define inline-only constant $IDC-SIZENESW               =
	MAKEINTRESOURCE(32643);
define inline-only constant $IDC-SIZEWE                 =
	MAKEINTRESOURCE(32644);
define inline-only constant $IDC-SIZENS                 =
	MAKEINTRESOURCE(32645);
define inline-only constant $IDC-SIZEALL                =
	MAKEINTRESOURCE(32646);
define inline-only constant $IDC-NO                     =
	MAKEINTRESOURCE(32648);
define inline-only constant $IDC-APPSTARTING            =
	MAKEINTRESOURCE(32650);
define inline-only constant $IDC-HELP                   =
	MAKEINTRESOURCE(32651);

define inline-only C-function SetSystemCursor
  parameter hcur       :: <HCURSOR>;
  parameter id         :: <DWORD>;
  result value :: <BOOL>;
  c-name: "SetSystemCursor", c-modifiers: "__stdcall";
end;

define C-struct <ICONINFO>
  sealed inline-only slot fIcon-value    :: <BOOL>;
  sealed inline-only slot xHotspot-value :: <DWORD>;
  sealed inline-only slot yHotspot-value :: <DWORD>;
  sealed inline-only slot hbmMask-value  :: <HBITMAP>;
  sealed inline-only slot hbmColor-value :: <HBITMAP>;
  pointer-type-name: <LPICONINFO>;
  c-name: "struct _ICONINFO";
end C-struct <ICONINFO>;
define inline constant <PICONINFO> = <LPICONINFO>;

define inline-only C-function LoadIcon
  parameter hInstance  :: <HINSTANCE>;
  parameter lpIconName :: <LPCSTR>;
  result value :: <HICON>;
  c-name: "LoadIconA", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateIcon
  parameter hInstance  :: <HINSTANCE>;
  parameter nWidth     :: <C-int>;
  parameter nHeight    :: <C-int>;
  parameter cPlanes    :: <C-BYTE>;
  parameter cBitsPixel :: <C-BYTE>;
  parameter lpbANDbits ::  /* const */ <C-BYTE*>;
  parameter lpbXORbits ::  /* const */ <C-BYTE*>;
  result value :: <HICON>;
  c-name: "CreateIcon", c-modifiers: "__stdcall";
end;

define inline-only C-function DestroyIcon
  parameter hIcon      :: <HICON>;
  result value :: <BOOL>;
  c-name: "DestroyIcon", c-modifiers: "__stdcall";
end;

define inline-only C-function LookupIconIdFromDirectory
  parameter presbits   :: <PBYTE>;
  parameter fIcon      :: <BOOL>;
  result value :: <C-int>;
  c-name: "LookupIconIdFromDirectory", c-modifiers: "__stdcall";
end;

define inline-only C-function LookupIconIdFromDirectoryEx
  parameter presbits   :: <PBYTE>;
  parameter fIcon      :: <BOOL>;
  parameter cxDesired  :: <C-int>;
  parameter cyDesired  :: <C-int>;
  parameter Flags      :: <UINT>;
  result value :: <C-int>;
  c-name: "LookupIconIdFromDirectoryEx", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateIconFromResource
  parameter presbits   :: <PBYTE>;
  parameter dwResSize  :: <DWORD>;
  parameter fIcon      :: <BOOL>;
  parameter dwVer      :: <DWORD>;
  result value :: <HICON>;
  c-name: "CreateIconFromResource", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateIconFromResourceEx
  parameter presbits   :: <PBYTE>;
  parameter dwResSize  :: <DWORD>;
  parameter fIcon      :: <BOOL>;
  parameter dwVer      :: <DWORD>;
  parameter cxDesired  :: <C-int>;
  parameter cyDesired  :: <C-int>;
  parameter Flags      :: <UINT>;
  result value :: <HICON>;
  c-name: "CreateIconFromResourceEx", c-modifiers: "__stdcall";
end;

define C-struct <CURSORSHAPE>
  sealed inline-only slot xHotSpot-value :: <C-int>;
  sealed inline-only slot yHotSpot-value :: <C-int>;
  sealed inline-only slot cx-value       :: <C-int>;
  sealed inline-only slot cy-value       :: <C-int>;
  sealed inline-only slot cbWidth-value  :: <C-int>;
  sealed inline-only slot Planes-value   :: <C-BYTE>;
  sealed inline-only slot BitsPixel-value :: <C-BYTE>;
  pointer-type-name: <LPCURSORSHAPE>;
  c-name: "struct tagCURSORSHAPE";
end C-struct <CURSORSHAPE>;
define inline-only constant $IMAGE-BITMAP               =    0;
define inline-only constant $IMAGE-ICON                 =    1;
define inline-only constant $IMAGE-CURSOR               =    2;
define inline-only constant $IMAGE-ENHMETAFILE          =    3;
define inline-only constant $LR-DEFAULTCOLOR            = #x0000;
define inline-only constant $LR-MONOCHROME              = #x0001;
define inline-only constant $LR-COLOR                   = #x0002;
define inline-only constant $LR-COPYRETURNORG           = #x0004;
define inline-only constant $LR-COPYDELETEORG           = #x0008;
define inline-only constant $LR-LOADFROMFILE            = #x0010;
define inline-only constant $LR-LOADTRANSPARENT         = #x0020;
define inline-only constant $LR-DEFAULTSIZE             = #x0040;
define inline-only constant $LR-VGACOLOR                = #x0080;
define inline-only constant $LR-LOADMAP3DCOLORS         = #x1000;
define inline-only constant $LR-CREATEDIBSECTION        = #x2000;
define inline-only constant $LR-COPYFROMRESOURCE        = #x4000;
define inline-only constant $LR-SHARED                  = #x8000;

define inline-only C-function LoadImage
  parameter hinstance1 :: <HINSTANCE>;
  parameter lpcstr2    :: <LPCSTR>;
  parameter uint3      :: <UINT>;
  parameter int4       :: <C-int>;
  parameter int5       :: <C-int>;
  parameter uint6      :: <UINT>;
  result value :: <HANDLE>;
  c-name: "LoadImageA", c-modifiers: "__stdcall";
end;

define inline-only C-function CopyImage
  parameter handle1    :: <HANDLE>;
  parameter uint2      :: <UINT>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter uint5      :: <UINT>;
  result value :: <HANDLE>;
  c-name: "CopyImage", c-modifiers: "__stdcall";
end;
define inline-only constant $DI-MASK                    = #x0001;
define inline-only constant $DI-IMAGE                   = #x0002;
define inline-only constant $DI-NORMAL                  = #x0003;
define inline-only constant $DI-COMPAT                  = #x0004;
define inline-only constant $DI-DEFAULTSIZE             = #x0008;

define inline-only C-function DrawIconEx
  parameter hdc        :: <HDC>;
  parameter xLeft      :: <C-int>;
  parameter yTop       :: <C-int>;
  parameter hIcon      :: <HICON>;
  parameter cxWidth    :: <C-int>;
  parameter cyWidth    :: <C-int>;
  parameter istepIfAniCur :: <UINT>;
  parameter hbrFlickerFreeDraw :: <HBRUSH>;
  parameter diFlags    :: <UINT>;
  result value :: <BOOL>;
  c-name: "DrawIconEx", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateIconIndirect
  parameter piconinfo  :: <PICONINFO>;
  result value :: <HICON>;
  c-name: "CreateIconIndirect", c-modifiers: "__stdcall";
end;

define inline-only C-function CopyIcon
  parameter hIcon      :: <HICON>;
  result value :: <HICON>;
  c-name: "CopyIcon", c-modifiers: "__stdcall";
end;

define inline-only C-function GetIconInfo
  parameter hIcon      :: <HICON>;
  parameter piconinfo  :: <PICONINFO>;
  result value :: <BOOL>;
  c-name: "GetIconInfo", c-modifiers: "__stdcall";
end;
define inline-only constant $RES-ICON                   =    1;
define inline-only constant $RES-CURSOR                 =    2;
define inline-only constant $OBM-CLOSE                  = 32754;
define inline-only constant $OBM-UPARROW                = 32753;
define inline-only constant $OBM-DNARROW                = 32752;
define inline-only constant $OBM-RGARROW                = 32751;
define inline-only constant $OBM-LFARROW                = 32750;
define inline-only constant $OBM-REDUCE                 = 32749;
define inline-only constant $OBM-ZOOM                   = 32748;
define inline-only constant $OBM-RESTORE                = 32747;
define inline-only constant $OBM-REDUCED                = 32746;
define inline-only constant $OBM-ZOOMD                  = 32745;
define inline-only constant $OBM-RESTORED               = 32744;
define inline-only constant $OBM-UPARROWD               = 32743;
define inline-only constant $OBM-DNARROWD               = 32742;
define inline-only constant $OBM-RGARROWD               = 32741;
define inline-only constant $OBM-LFARROWD               = 32740;
define inline-only constant $OBM-MNARROW                = 32739;
define inline-only constant $OBM-COMBO                  = 32738;
define inline-only constant $OBM-UPARROWI               = 32737;
define inline-only constant $OBM-DNARROWI               = 32736;
define inline-only constant $OBM-RGARROWI               = 32735;
define inline-only constant $OBM-LFARROWI               = 32734;
define inline-only constant $OBM-OLD-CLOSE              = 32767;
define inline-only constant $OBM-SIZE                   = 32766;
define inline-only constant $OBM-OLD-UPARROW            = 32765;
define inline-only constant $OBM-OLD-DNARROW            = 32764;
define inline-only constant $OBM-OLD-RGARROW            = 32763;
define inline-only constant $OBM-OLD-LFARROW            = 32762;
define inline-only constant $OBM-BTSIZE                 = 32761;
define inline-only constant $OBM-CHECK                  = 32760;
define inline-only constant $OBM-CHECKBOXES             = 32759;
define inline-only constant $OBM-BTNCORNERS             = 32758;
define inline-only constant $OBM-OLD-REDUCE             = 32757;
define inline-only constant $OBM-OLD-ZOOM               = 32756;
define inline-only constant $OBM-OLD-RESTORE            = 32755;
define inline-only constant $OCR-NORMAL                 = 32512;
define inline-only constant $OCR-IBEAM                  = 32513;
define inline-only constant $OCR-WAIT                   = 32514;
define inline-only constant $OCR-CROSS                  = 32515;
define inline-only constant $OCR-UP                     = 32516;
define inline-only constant $OCR-SIZE                   = 32640;
define inline-only constant $OCR-ICON                   = 32641;
define inline-only constant $OCR-SIZENWSE               = 32642;
define inline-only constant $OCR-SIZENESW               = 32643;
define inline-only constant $OCR-SIZEWE                 = 32644;
define inline-only constant $OCR-SIZENS                 = 32645;
define inline-only constant $OCR-SIZEALL                = 32646;
define inline-only constant $OCR-ICOCUR                 = 32647;
define inline-only constant $OCR-NO                     = 32648;
define inline-only constant $OCR-APPSTARTING            = 32650;
define inline-only constant $OIC-SAMPLE                 = 32512;
define inline-only constant $OIC-HAND                   = 32513;
define inline-only constant $OIC-QUES                   = 32514;
define inline-only constant $OIC-BANG                   = 32515;
define inline-only constant $OIC-NOTE                   = 32516;
define inline-only constant $OIC-WINLOGO                = 32517;
define inline-only constant $ORD-LANGDRIVER             =    1;
define inline-only constant $IDI-APPLICATION            =
	MAKEINTRESOURCE(32512);
define inline-only constant $IDI-HAND                   =
	MAKEINTRESOURCE(32513);
define inline-only constant $IDI-QUESTION               =
	MAKEINTRESOURCE(32514);
define inline-only constant $IDI-EXCLAMATION            =
	MAKEINTRESOURCE(32515);
define inline-only constant $IDI-ASTERISK               =
	MAKEINTRESOURCE(32516);
define inline-only constant $IDI-WINLOGO                =
	MAKEINTRESOURCE(32517);

define inline-only C-function LoadString
  parameter hInstance  :: <HINSTANCE>;
  parameter uID        :: <UINT>;
  parameter lpBuffer   :: <LPSTR>;
  parameter nBufferMax :: <C-int>;
  result value :: <C-int>;
  c-name: "LoadStringA", c-modifiers: "__stdcall";
end;
define inline-only constant $IDOK                       =    1;
define inline-only constant $IDCANCEL                   =    2;
define inline-only constant $IDABORT                    =    3;
define inline-only constant $IDRETRY                    =    4;
define inline-only constant $IDIGNORE                   =    5;
define inline-only constant $IDYES                      =    6;
define inline-only constant $IDNO                       =    7;
define inline-only constant $IDCLOSE                    =    8;
define inline-only constant $IDHELP                     =    9;
define inline-only constant $ES-LEFT                    = #x0000;
define inline-only constant $ES-CENTER                  = #x0001;
define inline-only constant $ES-RIGHT                   = #x0002;
define inline-only constant $ES-MULTILINE               = #x0004;
define inline-only constant $ES-UPPERCASE               = #x0008;
define inline-only constant $ES-LOWERCASE               = #x0010;
define inline-only constant $ES-PASSWORD                = #x0020;
define inline-only constant $ES-AUTOVSCROLL             = #x0040;
define inline-only constant $ES-AUTOHSCROLL             = #x0080;
define inline-only constant $ES-NOHIDESEL               = #x0100;
define inline-only constant $ES-OEMCONVERT              = #x0400;
define inline-only constant $ES-READONLY                = #x0800;
define inline-only constant $ES-WANTRETURN              = #x1000;
define inline-only constant $ES-NUMBER                  = #x2000;
define inline-only constant $EN-SETFOCUS                = #x0100;
define inline-only constant $EN-KILLFOCUS               = #x0200;
define inline-only constant $EN-CHANGE                  = #x0300;
define inline-only constant $EN-UPDATE                  = #x0400;
define inline-only constant $EN-ERRSPACE                = #x0500;
define inline-only constant $EN-MAXTEXT                 = #x0501;
define inline-only constant $EN-HSCROLL                 = #x0601;
define inline-only constant $EN-VSCROLL                 = #x0602;
define inline-only constant $EC-LEFTMARGIN              = #x0001;
define inline-only constant $EC-RIGHTMARGIN             = #x0002;
define inline-only constant $EC-USEFONTINFO             = #xffff;
define inline-only constant $EM-GETSEL                  = #x00B0;
define inline-only constant $EM-SETSEL                  = #x00B1;
define inline-only constant $EM-GETRECT                 = #x00B2;
define inline-only constant $EM-SETRECT                 = #x00B3;
define inline-only constant $EM-SETRECTNP               = #x00B4;
define inline-only constant $EM-SCROLL                  = #x00B5;
define inline-only constant $EM-LINESCROLL              = #x00B6;
define inline-only constant $EM-SCROLLCARET             = #x00B7;
define inline-only constant $EM-GETMODIFY               = #x00B8;
define inline-only constant $EM-SETMODIFY               = #x00B9;
define inline-only constant $EM-GETLINECOUNT            = #x00BA;
define inline-only constant $EM-LINEINDEX               = #x00BB;
define inline-only constant $EM-SETHANDLE               = #x00BC;
define inline-only constant $EM-GETHANDLE               = #x00BD;
define inline-only constant $EM-GETTHUMB                = #x00BE;
define inline-only constant $EM-LINELENGTH              = #x00C1;
define inline-only constant $EM-REPLACESEL              = #x00C2;
define inline-only constant $EM-GETLINE                 = #x00C4;
define inline-only constant $EM-LIMITTEXT               = #x00C5;
define inline-only constant $EM-CANUNDO                 = #x00C6;
define inline-only constant $EM-UNDO                    = #x00C7;
define inline-only constant $EM-FMTLINES                = #x00C8;
define inline-only constant $EM-LINEFROMCHAR            = #x00C9;
define inline-only constant $EM-SETTABSTOPS             = #x00CB;
define inline-only constant $EM-SETPASSWORDCHAR         = #x00CC;
define inline-only constant $EM-EMPTYUNDOBUFFER         = #x00CD;
define inline-only constant $EM-GETFIRSTVISIBLELINE     = #x00CE;
define inline-only constant $EM-SETREADONLY             = #x00CF;
define inline-only constant $EM-SETWORDBREAKPROC        = #x00D0;
define inline-only constant $EM-GETWORDBREAKPROC        = #x00D1;
define inline-only constant $EM-GETPASSWORDCHAR         = #x00D2;
define inline-only constant $EM-SETMARGINS              = #x00D3;
define inline-only constant $EM-GETMARGINS              = #x00D4;
define inline-only constant $EM-GETLIMITTEXT            = #x00D5;
define inline-only constant $EM-POSFROMCHAR             = #x00D6;
define inline-only constant $EM-CHARFROMPOS             = #x00D7;
define inline-only constant $WB-LEFT                    =    0;
define inline-only constant $WB-RIGHT                   =    1;
define inline-only constant $WB-ISDELIMITER             =    2;
define inline-only constant $BS-PUSHBUTTON              = #x00000000;
define inline-only constant $BS-DEFPUSHBUTTON           = #x00000001;
define inline-only constant $BS-CHECKBOX                = #x00000002;
define inline-only constant $BS-AUTOCHECKBOX            = #x00000003;
define inline-only constant $BS-RADIOBUTTON             = #x00000004;
define inline-only constant $BS-3STATE                  = #x00000005;
define inline-only constant $BS-AUTO3STATE              = #x00000006;
define inline-only constant $BS-GROUPBOX                = #x00000007;
define inline-only constant $BS-AUTORADIOBUTTON         = #x00000009;
define inline-only constant $BS-OWNERDRAW               = #x0000000B;
define inline-only constant $BS-LEFTTEXT                = #x00000020;
define inline-only constant $BS-TEXT                    = #x00000000;
define inline-only constant $BS-ICON                    = #x00000040;
define inline-only constant $BS-BITMAP                  = #x00000080;
define inline-only constant $BS-LEFT                    = #x00000100;
define inline-only constant $BS-RIGHT                   = #x00000200;
define inline-only constant $BS-CENTER                  = #x00000300;
define inline-only constant $BS-TOP                     = #x00000400;
define inline-only constant $BS-BOTTOM                  = #x00000800;
define inline-only constant $BS-VCENTER                 = #x00000C00;
define inline-only constant $BS-PUSHLIKE                = #x00001000;
define inline-only constant $BS-MULTILINE               = #x00002000;
define inline-only constant $BS-NOTIFY                  = #x00004000;
define inline-only constant $BS-FLAT                    = #x00008000;
define inline-only constant $BN-CLICKED                 =    0;
define inline-only constant $BN-DOUBLECLICKED           =    5;
define inline-only constant $BN-SETFOCUS                =    6;
define inline-only constant $BN-KILLFOCUS               =    7;
define inline-only constant $BM-GETCHECK                = #x00F0;
define inline-only constant $BM-SETCHECK                = #x00F1;
define inline-only constant $BM-GETSTATE                = #x00F2;
define inline-only constant $BM-SETSTATE                = #x00F3;
define inline-only constant $BM-SETSTYLE                = #x00F4;
define inline-only constant $BM-CLICK                   = #x00F5;
define inline-only constant $BM-GETIMAGE                = #x00F6;
define inline-only constant $BM-SETIMAGE                = #x00F7;
define inline-only constant $BST-UNCHECKED              = #x0000;
define inline-only constant $BST-CHECKED                = #x0001;
define inline-only constant $BST-INDETERMINATE          = #x0002;
define inline-only constant $BST-PUSHED                 = #x0004;
define inline-only constant $BST-FOCUS                  = #x0008;
define inline-only constant $SS-LEFT                    = #x00000000;
define inline-only constant $SS-CENTER                  = #x00000001;
define inline-only constant $SS-RIGHT                   = #x00000002;
define inline-only constant $SS-ICON                    = #x00000003;
define inline-only constant $SS-BLACKRECT               = #x00000004;
define inline-only constant $SS-GRAYRECT                = #x00000005;
define inline-only constant $SS-WHITERECT               = #x00000006;
define inline-only constant $SS-BLACKFRAME              = #x00000007;
define inline-only constant $SS-GRAYFRAME               = #x00000008;
define inline-only constant $SS-WHITEFRAME              = #x00000009;
define inline-only constant $SS-USERITEM                = #x0000000A;
define inline-only constant $SS-SIMPLE                  = #x0000000B;
define inline-only constant $SS-LEFTNOWORDWRAP          = #x0000000C;
define inline-only constant $SS-OWNERDRAW               = #x0000000D;
define inline-only constant $SS-BITMAP                  = #x0000000E;
define inline-only constant $SS-ENHMETAFILE             = #x0000000F;
define inline-only constant $SS-ETCHEDHORZ              = #x00000010;
define inline-only constant $SS-ETCHEDVERT              = #x00000011;
define inline-only constant $SS-ETCHEDFRAME             = #x00000012;
define inline-only constant $SS-TYPEMASK                = #x0000001F;
define inline-only constant $SS-NOPREFIX                = #x00000080;
define inline-only constant $SS-NOTIFY                  = #x00000100;
define inline-only constant $SS-CENTERIMAGE             = #x00000200;
define inline-only constant $SS-RIGHTJUST               = #x00000400;
define inline-only constant $SS-REALSIZEIMAGE           = #x00000800;
define inline-only constant $SS-SUNKEN                  = #x00001000;
define inline-only constant $SS-ENDELLIPSIS             = #x00004000;
define inline-only constant $SS-PATHELLIPSIS            = #x00008000;
define inline-only constant $SS-WORDELLIPSIS            = #x0000C000;
define inline-only constant $SS-ELLIPSISMASK            = #x0000C000;
define inline-only constant $STM-SETICON                = #x0170;
define inline-only constant $STM-GETICON                = #x0171;
define inline-only constant $STM-SETIMAGE               = #x0172;
define inline-only constant $STM-GETIMAGE               = #x0173;
define inline-only constant $STN-CLICKED                =    0;
define inline-only constant $STN-DBLCLK                 =    1;
define inline-only constant $STN-ENABLE                 =    2;
define inline-only constant $STN-DISABLE                =    3;
define inline-only constant $STM-MSGMAX                 = #x0174;
define inline-only constant $DWL-MSGRESULT              =    0;
define inline-only constant $DWL-DLGPROC                =    4;
define inline-only constant $DWL-USER                   =    8;

define inline-only C-function IsDialogMessage
  parameter hDlg       :: <HWND>;
  parameter lpMsg      :: <LPMSG>;
  result value :: <BOOL>;
  c-name: "IsDialogMessageA", c-modifiers: "__stdcall";
end;

define inline-only C-function MapDialogRect
  parameter hDlg       :: <HWND>;
  parameter lpRect     :: <LPRECT>;
  result value :: <BOOL>;
  c-name: "MapDialogRect", c-modifiers: "__stdcall";
end;

define inline-only C-function DlgDirList
  parameter hDlg       :: <HWND>;
  parameter lpPathSpec :: <LPSTR>;
  parameter nIDListBox :: <C-int>;
  parameter nIDStaticPath :: <C-int>;
  parameter uFileType  :: <UINT>;
  result value :: <C-int>;
  c-name: "DlgDirListA", c-modifiers: "__stdcall";
end;
define inline-only constant $DDL-READWRITE              = #x0000;
define inline-only constant $DDL-READONLY               = #x0001;
define inline-only constant $DDL-HIDDEN                 = #x0002;
define inline-only constant $DDL-SYSTEM                 = #x0004;
define inline-only constant $DDL-DIRECTORY              = #x0010;
define inline-only constant $DDL-ARCHIVE                = #x0020;
define inline-only constant $DDL-POSTMSGS               = #x2000;
define inline-only constant $DDL-DRIVES                 = #x4000;
define inline-only constant $DDL-EXCLUSIVE              = #x8000;

define inline-only C-function DlgDirSelectEx
  parameter hDlg       :: <HWND>;
  parameter lpString   :: <LPSTR>;
  parameter nCount     :: <C-int>;
  parameter nIDListBox :: <C-int>;
  result value :: <BOOL>;
  c-name: "DlgDirSelectExA", c-modifiers: "__stdcall";
end;

define inline-only C-function DlgDirListComboBox
  parameter hDlg       :: <HWND>;
  parameter lpPathSpec :: <LPSTR>;
  parameter nIDComboBox :: <C-int>;
  parameter nIDStaticPath :: <C-int>;
  parameter uFiletype  :: <UINT>;
  result value :: <C-int>;
  c-name: "DlgDirListComboBoxA", c-modifiers: "__stdcall";
end;

define inline-only C-function DlgDirSelectComboBoxEx
  parameter hDlg       :: <HWND>;
  parameter lpString   :: <LPSTR>;
  parameter nCount     :: <C-int>;
  parameter nIDComboBox :: <C-int>;
  result value :: <BOOL>;
  c-name: "DlgDirSelectComboBoxExA", c-modifiers: "__stdcall";
end;
define inline-only constant $DS-ABSALIGN                = #x01;
define inline-only constant $DS-SYSMODAL                = #x02;
define inline-only constant $DS-LOCALEDIT               = #x20;
define inline-only constant $DS-SETFONT                 = #x40;
define inline-only constant $DS-MODALFRAME              = #x80;
define inline-only constant $DS-NOIDLEMSG               = #x100;
define inline-only constant $DS-SETFOREGROUND           = #x200;
define inline-only constant $DS-3DLOOK                  = #x0004;
define inline-only constant $DS-FIXEDSYS                = #x0008;
define inline-only constant $DS-NOFAILCREATE            = #x0010;
define inline-only constant $DS-CONTROL                 = #x0400;
define inline-only constant $DS-CENTER                  = #x0800;
define inline-only constant $DS-CENTERMOUSE             = #x1000;
define inline-only constant $DS-CONTEXTHELP             = #x2000;
define inline-only constant $DM-GETDEFID                =
	$WM-USER + 0;
define inline-only constant $DM-SETDEFID                =
	$WM-USER + 1;
define inline-only constant $DM-REPOSITION              =
	$WM-USER + 2;
define inline-only constant $DC-HASDEFID                = #x534B;
define inline-only constant $DLGC-WANTARROWS            = #x0001;
define inline-only constant $DLGC-WANTTAB               = #x0002;
define inline-only constant $DLGC-WANTALLKEYS           = #x0004;
define inline-only constant $DLGC-WANTMESSAGE           = #x0004;
define inline-only constant $DLGC-HASSETSEL             = #x0008;
define inline-only constant $DLGC-DEFPUSHBUTTON         = #x0010;
define inline-only constant $DLGC-UNDEFPUSHBUTTON       = #x0020;
define inline-only constant $DLGC-RADIOBUTTON           = #x0040;
define inline-only constant $DLGC-WANTCHARS             = #x0080;
define inline-only constant $DLGC-STATIC                = #x0100;
define inline-only constant $DLGC-BUTTON                = #x2000;
define inline-only constant $LB-CTLCODE                 =    0;
define inline-only constant $LB-OKAY                    =    0;
define inline-only constant $LB-ERR                     =   -1;
define inline-only constant $LB-ERRSPACE                =   -2;
define inline-only constant $LBN-ERRSPACE               =   -2;
define inline-only constant $LBN-SELCHANGE              =    1;
define inline-only constant $LBN-DBLCLK                 =    2;
define inline-only constant $LBN-SELCANCEL              =    3;
define inline-only constant $LBN-SETFOCUS               =    4;
define inline-only constant $LBN-KILLFOCUS              =    5;
define inline-only constant $LB-ADDSTRING               = #x0180;
define inline-only constant $LB-INSERTSTRING            = #x0181;
define inline-only constant $LB-DELETESTRING            = #x0182;
define inline-only constant $LB-SELITEMRANGEEX          = #x0183;
define inline-only constant $LB-RESETCONTENT            = #x0184;
define inline-only constant $LB-SETSEL                  = #x0185;
define inline-only constant $LB-SETCURSEL               = #x0186;
define inline-only constant $LB-GETSEL                  = #x0187;
define inline-only constant $LB-GETCURSEL               = #x0188;
define inline-only constant $LB-GETTEXT                 = #x0189;
define inline-only constant $LB-GETTEXTLEN              = #x018A;
define inline-only constant $LB-GETCOUNT                = #x018B;
define inline-only constant $LB-SELECTSTRING            = #x018C;
define inline-only constant $LB-DIR                     = #x018D;
define inline-only constant $LB-GETTOPINDEX             = #x018E;
define inline-only constant $LB-FINDSTRING              = #x018F;
define inline-only constant $LB-GETSELCOUNT             = #x0190;
define inline-only constant $LB-GETSELITEMS             = #x0191;
define inline-only constant $LB-SETTABSTOPS             = #x0192;
define inline-only constant $LB-GETHORIZONTALEXTENT     = #x0193;
define inline-only constant $LB-SETHORIZONTALEXTENT     = #x0194;
define inline-only constant $LB-SETCOLUMNWIDTH          = #x0195;
define inline-only constant $LB-ADDFILE                 = #x0196;
define inline-only constant $LB-SETTOPINDEX             = #x0197;
define inline-only constant $LB-GETITEMRECT             = #x0198;
define inline-only constant $LB-GETITEMDATA             = #x0199;
define inline-only constant $LB-SETITEMDATA             = #x019A;
define inline-only constant $LB-SELITEMRANGE            = #x019B;
define inline-only constant $LB-SETANCHORINDEX          = #x019C;
define inline-only constant $LB-GETANCHORINDEX          = #x019D;
define inline-only constant $LB-SETCARETINDEX           = #x019E;
define inline-only constant $LB-GETCARETINDEX           = #x019F;
define inline-only constant $LB-SETITEMHEIGHT           = #x01A0;
define inline-only constant $LB-GETITEMHEIGHT           = #x01A1;
define inline-only constant $LB-FINDSTRINGEXACT         = #x01A2;
define inline-only constant $LB-SETLOCALE               = #x01A5;
define inline-only constant $LB-GETLOCALE               = #x01A6;
define inline-only constant $LB-SETCOUNT                = #x01A7;
define inline-only constant $LB-INITSTORAGE             = #x01A8;
define inline-only constant $LB-ITEMFROMPOINT           = #x01A9;
define inline-only constant $LB-MSGMAX                  = #x01B0;
define inline-only constant $LBS-NOTIFY                 = #x0001;
define inline-only constant $LBS-SORT                   = #x0002;
define inline-only constant $LBS-NOREDRAW               = #x0004;
define inline-only constant $LBS-MULTIPLESEL            = #x0008;
define inline-only constant $LBS-OWNERDRAWFIXED         = #x0010;
define inline-only constant $LBS-OWNERDRAWVARIABLE      = #x0020;
define inline-only constant $LBS-HASSTRINGS             = #x0040;
define inline-only constant $LBS-USETABSTOPS            = #x0080;
define inline-only constant $LBS-NOINTEGRALHEIGHT       = #x0100;
define inline-only constant $LBS-MULTICOLUMN            = #x0200;
define inline-only constant $LBS-WANTKEYBOARDINPUT      = #x0400;
define inline-only constant $LBS-EXTENDEDSEL            = #x0800;
define inline-only constant $LBS-DISABLENOSCROLL        = #x1000;
define inline-only constant $LBS-NODATA                 = #x2000;
define inline-only constant $LBS-NOSEL                  = #x4000;
define inline-only constant $LBS-STANDARD               =
	logior($LBS-NOTIFY, $LBS-SORT, $WS-VSCROLL, $WS-BORDER);
define inline-only constant $CB-OKAY                    =    0;
define inline-only constant $CB-ERR                     =   -1;
define inline-only constant $CB-ERRSPACE                =   -2;
define inline-only constant $CBN-ERRSPACE               =   -1;
define inline-only constant $CBN-SELCHANGE              =    1;
define inline-only constant $CBN-DBLCLK                 =    2;
define inline-only constant $CBN-SETFOCUS               =    3;
define inline-only constant $CBN-KILLFOCUS              =    4;
define inline-only constant $CBN-EDITCHANGE             =    5;
define inline-only constant $CBN-EDITUPDATE             =    6;
define inline-only constant $CBN-DROPDOWN               =    7;
define inline-only constant $CBN-CLOSEUP                =    8;
define inline-only constant $CBN-SELENDOK               =    9;
define inline-only constant $CBN-SELENDCANCEL           =   10;
define inline-only constant $CBS-SIMPLE                 = #x0001;
define inline-only constant $CBS-DROPDOWN               = #x0002;
define inline-only constant $CBS-DROPDOWNLIST           = #x0003;
define inline-only constant $CBS-OWNERDRAWFIXED         = #x0010;
define inline-only constant $CBS-OWNERDRAWVARIABLE      = #x0020;
define inline-only constant $CBS-AUTOHSCROLL            = #x0040;
define inline-only constant $CBS-OEMCONVERT             = #x0080;
define inline-only constant $CBS-SORT                   = #x0100;
define inline-only constant $CBS-HASSTRINGS             = #x0200;
define inline-only constant $CBS-NOINTEGRALHEIGHT       = #x0400;
define inline-only constant $CBS-DISABLENOSCROLL        = #x0800;
define inline-only constant $CBS-UPPERCASE              = #x2000;
define inline-only constant $CBS-LOWERCASE              = #x4000;
define inline-only constant $CB-GETEDITSEL              = #x0140;
define inline-only constant $CB-LIMITTEXT               = #x0141;
define inline-only constant $CB-SETEDITSEL              = #x0142;
define inline-only constant $CB-ADDSTRING               = #x0143;
define inline-only constant $CB-DELETESTRING            = #x0144;
define inline-only constant $CB-DIR                     = #x0145;
define inline-only constant $CB-GETCOUNT                = #x0146;
define inline-only constant $CB-GETCURSEL               = #x0147;
define inline-only constant $CB-GETLBTEXT               = #x0148;
define inline-only constant $CB-GETLBTEXTLEN            = #x0149;
define inline-only constant $CB-INSERTSTRING            = #x014A;
define inline-only constant $CB-RESETCONTENT            = #x014B;
define inline-only constant $CB-FINDSTRING              = #x014C;
define inline-only constant $CB-SELECTSTRING            = #x014D;
define inline-only constant $CB-SETCURSEL               = #x014E;
define inline-only constant $CB-SHOWDROPDOWN            = #x014F;
define inline-only constant $CB-GETITEMDATA             = #x0150;
define inline-only constant $CB-SETITEMDATA             = #x0151;
define inline-only constant $CB-GETDROPPEDCONTROLRECT   = #x0152;
define inline-only constant $CB-SETITEMHEIGHT           = #x0153;
define inline-only constant $CB-GETITEMHEIGHT           = #x0154;
define inline-only constant $CB-SETEXTENDEDUI           = #x0155;
define inline-only constant $CB-GETEXTENDEDUI           = #x0156;
define inline-only constant $CB-GETDROPPEDSTATE         = #x0157;
define inline-only constant $CB-FINDSTRINGEXACT         = #x0158;
define inline-only constant $CB-SETLOCALE               = #x0159;
define inline-only constant $CB-GETLOCALE               = #x015A;
define inline-only constant $CB-GETTOPINDEX             = #x015b;
define inline-only constant $CB-SETTOPINDEX             = #x015c;
define inline-only constant $CB-GETHORIZONTALEXTENT     = #x015d;
define inline-only constant $CB-SETHORIZONTALEXTENT     = #x015e;
define inline-only constant $CB-GETDROPPEDWIDTH         = #x015f;
define inline-only constant $CB-SETDROPPEDWIDTH         = #x0160;
define inline-only constant $CB-INITSTORAGE             = #x0161;
define inline-only constant $CB-MSGMAX                  = #x0162;
define inline-only constant $SBS-HORZ                   = #x0000;
define inline-only constant $SBS-VERT                   = #x0001;
define inline-only constant $SBS-TOPALIGN               = #x0002;
define inline-only constant $SBS-LEFTALIGN              = #x0002;
define inline-only constant $SBS-BOTTOMALIGN            = #x0004;
define inline-only constant $SBS-RIGHTALIGN             = #x0004;
define inline-only constant $SBS-SIZEBOXTOPLEFTALIGN    = #x0002;
define inline-only constant $SBS-SIZEBOXBOTTOMRIGHTALIGN = #x0004;
define inline-only constant $SBS-SIZEBOX                = #x0008;
define inline-only constant $SBS-SIZEGRIP               = #x0010;
define inline-only constant $SBM-SETPOS                 = #x00E0;
define inline-only constant $SBM-GETPOS                 = #x00E1;
define inline-only constant $SBM-SETRANGE               = #x00E2;
define inline-only constant $SBM-SETRANGEREDRAW         = #x00E6;
define inline-only constant $SBM-GETRANGE               = #x00E3;
define inline-only constant $SBM-ENABLE-ARROWS          = #x00E4;
define inline-only constant $SBM-SETSCROLLINFO          = #x00E9;
define inline-only constant $SBM-GETSCROLLINFO          = #x00EA;
define inline-only constant $SIF-RANGE                  = #x0001;
define inline-only constant $SIF-PAGE                   = #x0002;
define inline-only constant $SIF-POS                    = #x0004;
define inline-only constant $SIF-DISABLENOSCROLL        = #x0008;
define inline-only constant $SIF-TRACKPOS               = #x0010;
define inline-only constant $SIF-ALL                    =
	logior($SIF-RANGE, $SIF-PAGE, $SIF-POS, $SIF-TRACKPOS);

define C-struct <SCROLLINFO>
  sealed inline-only slot cbSize-value   :: <UINT>;
  sealed inline-only slot fMask-value    :: <UINT>;
  sealed inline-only slot nMin-value     :: <C-int>;
  sealed inline-only slot nMax-value     :: <C-int>;
  sealed inline-only slot nPage-value    :: <UINT>;
  sealed inline-only slot nPos-value     :: <C-int>;
  sealed inline-only slot nTrackPos-value :: <C-int>;
  pointer-type-name: <LPSCROLLINFO>;
  c-name: "struct tagSCROLLINFO";
end C-struct <SCROLLINFO>;
define inline constant <LPCSCROLLINFO> = /* const */ <LPSCROLLINFO>;

define inline-only C-function SetScrollInfo
  parameter hwnd1      :: <HWND>;
  parameter int2       :: <C-int>;
  parameter lpcscrollinfo3 :: <LPCSCROLLINFO>;
  parameter bool4      :: <BOOL>;
  result value :: <C-int>;
  c-name: "SetScrollInfo", c-modifiers: "__stdcall";
end;

define inline-only C-function GetScrollInfo
  parameter hwnd1      :: <HWND>;
  parameter int2       :: <C-int>;
  parameter lpscrollinfo3 :: <LPSCROLLINFO>;
  result value :: <BOOL>;
  c-name: "GetScrollInfo", c-modifiers: "__stdcall";
end;
define inline-only constant $MDIS-ALLCHILDSTYLES        = #x0001;
define inline-only constant $MDITILE-VERTICAL           = #x0000;
define inline-only constant $MDITILE-HORIZONTAL         = #x0001;
define inline-only constant $MDITILE-SKIPDISABLED       = #x0002;

define C-struct <MDICREATESTRUCTA>
  sealed inline-only slot szClass-value  :: <LPCSTR>;
  sealed inline-only slot szTitle-value  :: <LPCSTR>;
  sealed inline-only slot hOwner-value   :: <HANDLE>;
  sealed inline-only slot x-value        :: <C-int>;
  sealed inline-only slot y-value        :: <C-int>;
  sealed inline-only slot cx-value       :: <C-int>;
  sealed inline-only slot cy-value       :: <C-int>;
  sealed inline-only slot style-value    :: <DWORD>;
  sealed inline-only slot lParam-value   :: <LPARAM>;
  pointer-type-name: <LPMDICREATESTRUCTA>;
  c-name: "struct tagMDICREATESTRUCTA";
end C-struct <MDICREATESTRUCTA>;
define inline constant <MDICREATESTRUCT> = <MDICREATESTRUCTA>;
define inline constant <LPMDICREATESTRUCT> = <LPMDICREATESTRUCTA>;

define C-struct <CLIENTCREATESTRUCT>
  sealed inline-only slot hWindowMenu-value :: <HANDLE>;
  sealed inline-only slot idFirstChild-value :: <UINT>;
  pointer-type-name: <LPCLIENTCREATESTRUCT>;
  c-name: "struct tagCLIENTCREATESTRUCT";
end C-struct <CLIENTCREATESTRUCT>;

define inline-only C-function DefFrameProc
  parameter hWnd       :: <HWND>;
  parameter hWndMDIClient :: <HWND>;
  parameter uMsg       :: <UINT>;
  parameter wParam     :: <WPARAM>;
  parameter lParam     :: <LPARAM>;
  result value :: <LRESULT>;
  c-name: "DefFrameProcA", c-modifiers: "__stdcall";
end;

define inline-only C-function DefMDIChildProc
  parameter hWnd       :: <HWND>;
  parameter uMsg       :: <UINT>;
  parameter wParam     :: <WPARAM>;
  parameter lParam     :: <LPARAM>;
  result value :: <LRESULT>;
  c-name: "DefMDIChildProcA", c-modifiers: "__stdcall";
end;

define inline-only C-function TranslateMDISysAccel
  parameter hWndClient :: <HWND>;
  parameter lpMsg      :: <LPMSG>;
  result value :: <BOOL>;
  c-name: "TranslateMDISysAccel", c-modifiers: "__stdcall";
end;

define inline-only C-function ArrangeIconicWindows
  parameter hWnd       :: <HWND>;
  result value :: <UINT>;
  c-name: "ArrangeIconicWindows", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateMDIWindow
  parameter lpClassName :: <LPSTR>;
  parameter lpWindowName :: <LPSTR>;
  parameter dwStyle    :: <DWORD>;
  parameter X          :: <C-int>;
  parameter Y          :: <C-int>;
  parameter nWidth     :: <C-int>;
  parameter nHeight    :: <C-int>;
  parameter hWndParent :: <HWND>;
  parameter hInstance  :: <HINSTANCE>;
  parameter lParam     :: <LPARAM>;
  result value :: <HWND>;
  c-name: "CreateMDIWindowA", c-modifiers: "__stdcall";
end;

define inline-only C-function TileWindows
  parameter hwndParent :: <HWND>;
  parameter wHow       :: <UINT>;
  parameter lpRect     ::  /* const */ <LPRECT>;
  parameter cKids      :: <UINT>;
  parameter lpKids     ::  /* const */ <LPHWND>;
  result value :: <WORD>;
  c-name: "TileWindows", c-modifiers: "__stdcall";
end;

define inline-only C-function CascadeWindows
  parameter hwndParent :: <HWND>;
  parameter wHow       :: <UINT>;
  parameter lpRect     ::  /* const */ <LPRECT>;
  parameter cKids      :: <UINT>;
  parameter lpKids     ::  /* const */ <LPHWND>;
  result value :: <WORD>;
  c-name: "CascadeWindows", c-modifiers: "__stdcall";
end;
define inline constant <HELPPOLY> = <DWORD>;

define C-struct <MULTIKEYHELPA>
  sealed inline-only slot mkSize-value   :: <DWORD>;
  sealed inline-only slot mkKeylist-value :: <CHAR>;
  sealed inline-only array slot szKeyphrase-array :: <CHAR>,
	length: 1, address-getter: szKeyphrase-value;
  pointer-type-name: <LPMULTIKEYHELPA>;
  c-name: "struct tagMULTIKEYHELPA";
end C-struct <MULTIKEYHELPA>;
define inline constant <PMULTIKEYHELPA> = <LPMULTIKEYHELPA>;
define inline constant <MULTIKEYHELP> = <MULTIKEYHELPA>;
define inline constant <PMULTIKEYHELP> = <PMULTIKEYHELPA>;
define inline constant <LPMULTIKEYHELP> = <LPMULTIKEYHELPA>;

define C-struct <HELPWININFOA>
  sealed inline-only slot wStructSize-value :: <C-int>;
  sealed inline-only slot x-value        :: <C-int>;
  sealed inline-only slot y-value        :: <C-int>;
  sealed inline-only slot dx-value       :: <C-int>;
  sealed inline-only slot dy-value       :: <C-int>;
  sealed inline-only slot wMax-value     :: <C-int>;
  sealed inline-only array slot rgchMember-array :: <CHAR>,
	length: 2, address-getter: rgchMember-value;
  pointer-type-name: <LPHELPWININFOA>;
  c-name: "struct tagHELPWININFOA";
end C-struct <HELPWININFOA>;
define inline constant <PHELPWININFOA> = <LPHELPWININFOA>;
define inline constant <HELPWININFO> = <HELPWININFOA>;
define inline constant <PHELPWININFO> = <PHELPWININFOA>;
define inline constant <LPHELPWININFO> = <LPHELPWININFOA>;
define inline-only constant $HELP-CONTEXT               = #x0001;
define inline-only constant $HELP-QUIT                  = #x0002;
define inline-only constant $HELP-INDEX                 = #x0003;
define inline-only constant $HELP-CONTENTS              = #x0003;
define inline-only constant $HELP-HELPONHELP            = #x0004;
define inline-only constant $HELP-SETINDEX              = #x0005;
define inline-only constant $HELP-SETCONTENTS           = #x0005;
define inline-only constant $HELP-CONTEXTPOPUP          = #x0008;
define inline-only constant $HELP-FORCEFILE             = #x0009;
define inline-only constant $HELP-KEY                   = #x0101;
define inline-only constant $HELP-COMMAND               = #x0102;
define inline-only constant $HELP-PARTIALKEY            = #x0105;
define inline-only constant $HELP-MULTIKEY              = #x0201;
define inline-only constant $HELP-SETWINPOS             = #x0203;
define inline-only constant $HELP-CONTEXTMENU           = #x000a;
define inline-only constant $HELP-FINDER                = #x000b;
define inline-only constant $HELP-WM-HELP               = #x000c;
define inline-only constant $HELP-SETPOPUP-POS          = #x000d;
define inline-only constant $HELP-TCARD                 = #x8000;
define inline-only constant $HELP-TCARD-DATA            = #x0010;
define inline-only constant $HELP-TCARD-OTHER-CALLER    = #x0011;
define inline-only constant $IDH-NO-HELP                = 28440;
define inline-only constant $IDH-MISSING-CONTEXT        = 28441;
define inline-only constant $IDH-GENERIC-HELP-BUTTON    = 28442;
define inline-only constant $IDH-OK                     = 28443;
define inline-only constant $IDH-CANCEL                 = 28444;
define inline-only constant $IDH-HELP                   = 28445;

define inline-only C-function WinHelp
  parameter hWndMain   :: <HWND>;
  parameter lpszHelp   :: <LPCSTR>;
  parameter uCommand   :: <UINT>;
  parameter dwData :: <C-both-unsigned-long>;
  result value :: <BOOL>;
  c-name: "WinHelpA", c-modifiers: "__stdcall";
end;
define inline-only constant $SPI-GETBEEP                =    1;
define inline-only constant $SPI-SETBEEP                =    2;
define inline-only constant $SPI-GETMOUSE               =    3;
define inline-only constant $SPI-SETMOUSE               =    4;
define inline-only constant $SPI-GETBORDER              =    5;
define inline-only constant $SPI-SETBORDER              =    6;
define inline-only constant $SPI-GETKEYBOARDSPEED       =   10;
define inline-only constant $SPI-SETKEYBOARDSPEED       =   11;
define inline-only constant $SPI-LANGDRIVER             =   12;
define inline-only constant $SPI-ICONHORIZONTALSPACING  =   13;
define inline-only constant $SPI-GETSCREENSAVETIMEOUT   =   14;
define inline-only constant $SPI-SETSCREENSAVETIMEOUT   =   15;
define inline-only constant $SPI-GETSCREENSAVEACTIVE    =   16;
define inline-only constant $SPI-SETSCREENSAVEACTIVE    =   17;
define inline-only constant $SPI-GETGRIDGRANULARITY     =   18;
define inline-only constant $SPI-SETGRIDGRANULARITY     =   19;
define inline-only constant $SPI-SETDESKWALLPAPER       =   20;
define inline-only constant $SPI-SETDESKPATTERN         =   21;
define inline-only constant $SPI-GETKEYBOARDDELAY       =   22;
define inline-only constant $SPI-SETKEYBOARDDELAY       =   23;
define inline-only constant $SPI-ICONVERTICALSPACING    =   24;
define inline-only constant $SPI-GETICONTITLEWRAP       =   25;
define inline-only constant $SPI-SETICONTITLEWRAP       =   26;
define inline-only constant $SPI-GETMENUDROPALIGNMENT   =   27;
define inline-only constant $SPI-SETMENUDROPALIGNMENT   =   28;
define inline-only constant $SPI-SETDOUBLECLKWIDTH      =   29;
define inline-only constant $SPI-SETDOUBLECLKHEIGHT     =   30;
define inline-only constant $SPI-GETICONTITLELOGFONT    =   31;
define inline-only constant $SPI-SETDOUBLECLICKTIME     =   32;
define inline-only constant $SPI-SETMOUSEBUTTONSWAP     =   33;
define inline-only constant $SPI-SETICONTITLELOGFONT    =   34;
define inline-only constant $SPI-GETFASTTASKSWITCH      =   35;
define inline-only constant $SPI-SETFASTTASKSWITCH      =   36;
define inline-only constant $SPI-SETDRAGFULLWINDOWS     =   37;
define inline-only constant $SPI-GETDRAGFULLWINDOWS     =   38;
define inline-only constant $SPI-GETNONCLIENTMETRICS    =   41;
define inline-only constant $SPI-SETNONCLIENTMETRICS    =   42;
define inline-only constant $SPI-GETMINIMIZEDMETRICS    =   43;
define inline-only constant $SPI-SETMINIMIZEDMETRICS    =   44;
define inline-only constant $SPI-GETICONMETRICS         =   45;
define inline-only constant $SPI-SETICONMETRICS         =   46;
define inline-only constant $SPI-SETWORKAREA            =   47;
define inline-only constant $SPI-GETWORKAREA            =   48;
define inline-only constant $SPI-SETPENWINDOWS          =   49;
define inline-only constant $SPI-GETHIGHCONTRAST        =   66;
define inline-only constant $SPI-SETHIGHCONTRAST        =   67;
define inline-only constant $SPI-GETKEYBOARDPREF        =   68;
define inline-only constant $SPI-SETKEYBOARDPREF        =   69;
define inline-only constant $SPI-GETSCREENREADER        =   70;
define inline-only constant $SPI-SETSCREENREADER        =   71;
define inline-only constant $SPI-GETANIMATION           =   72;
define inline-only constant $SPI-SETANIMATION           =   73;
define inline-only constant $SPI-GETFONTSMOOTHING       =   74;
define inline-only constant $SPI-SETFONTSMOOTHING       =   75;
define inline-only constant $SPI-SETDRAGWIDTH           =   76;
define inline-only constant $SPI-SETDRAGHEIGHT          =   77;
define inline-only constant $SPI-SETHANDHELD            =   78;
define inline-only constant $SPI-GETLOWPOWERTIMEOUT     =   79;
define inline-only constant $SPI-GETPOWEROFFTIMEOUT     =   80;
define inline-only constant $SPI-SETLOWPOWERTIMEOUT     =   81;
define inline-only constant $SPI-SETPOWEROFFTIMEOUT     =   82;
define inline-only constant $SPI-GETLOWPOWERACTIVE      =   83;
define inline-only constant $SPI-GETPOWEROFFACTIVE      =   84;
define inline-only constant $SPI-SETLOWPOWERACTIVE      =   85;
define inline-only constant $SPI-SETPOWEROFFACTIVE      =   86;
define inline-only constant $SPI-SETCURSORS             =   87;
define inline-only constant $SPI-SETICONS               =   88;
define inline-only constant $SPI-GETDEFAULTINPUTLANG    =   89;
define inline-only constant $SPI-SETDEFAULTINPUTLANG    =   90;
define inline-only constant $SPI-SETLANGTOGGLE          =   91;
define inline-only constant $SPI-GETWINDOWSEXTENSION    =   92;
define inline-only constant $SPI-SETMOUSETRAILS         =   93;
define inline-only constant $SPI-GETMOUSETRAILS         =   94;
define inline-only constant $SPI-SETSCREENSAVERRUNNING  =   97;
define inline-only constant $SPI-GETFILTERKEYS          =   50;
define inline-only constant $SPI-SETFILTERKEYS          =   51;
define inline-only constant $SPI-GETTOGGLEKEYS          =   52;
define inline-only constant $SPI-SETTOGGLEKEYS          =   53;
define inline-only constant $SPI-GETMOUSEKEYS           =   54;
define inline-only constant $SPI-SETMOUSEKEYS           =   55;
define inline-only constant $SPI-GETSHOWSOUNDS          =   56;
define inline-only constant $SPI-SETSHOWSOUNDS          =   57;
define inline-only constant $SPI-GETSTICKYKEYS          =   58;
define inline-only constant $SPI-SETSTICKYKEYS          =   59;
define inline-only constant $SPI-GETACCESSTIMEOUT       =   60;
define inline-only constant $SPI-SETACCESSTIMEOUT       =   61;
define inline-only constant $SPI-GETSERIALKEYS          =   62;
define inline-only constant $SPI-SETSERIALKEYS          =   63;
define inline-only constant $SPI-GETSOUNDSENTRY         =   64;
define inline-only constant $SPI-SETSOUNDSENTRY         =   65;
define inline-only constant $SPIF-UPDATEINIFILE         = #x0001;
define inline-only constant $SPIF-SENDWININICHANGE      = #x0002;
define inline-only constant $METRICS-USEDEFAULT         =   -1;

define C-struct <NONCLIENTMETRICSA>
  sealed inline-only slot cbSize-value   :: <UINT>;
  sealed inline-only slot iBorderWidth-value :: <C-int>;
  sealed inline-only slot iScrollWidth-value :: <C-int>;
  sealed inline-only slot iScrollHeight-value :: <C-int>;
  sealed inline-only slot iCaptionWidth-value :: <C-int>;
  sealed inline-only slot iCaptionHeight-value :: <C-int>;
  sealed inline-only slot lfCaptionFont-value :: <LOGFONTA>;
  sealed inline-only slot iSmCaptionWidth-value :: <C-int>;
  sealed inline-only slot iSmCaptionHeight-value :: <C-int>;
  sealed inline-only slot lfSmCaptionFont-value :: <LOGFONTA>;
  sealed inline-only slot iMenuWidth-value :: <C-int>;
  sealed inline-only slot iMenuHeight-value :: <C-int>;
  sealed inline-only slot lfMenuFont-value :: <LOGFONTA>;
  sealed inline-only slot lfStatusFont-value :: <LOGFONTA>;
  sealed inline-only slot lfMessageFont-value :: <LOGFONTA>;
  pointer-type-name: <LPNONCLIENTMETRICSA>;
  c-name: "struct tagNONCLIENTMETRICSA";
end C-struct <NONCLIENTMETRICSA>;
define inline constant <PNONCLIENTMETRICSA> = <LPNONCLIENTMETRICSA>;
define inline constant <NONCLIENTMETRICS> = <NONCLIENTMETRICSA>;
define inline constant <PNONCLIENTMETRICS> = <PNONCLIENTMETRICSA>;
define inline constant <LPNONCLIENTMETRICS> = <LPNONCLIENTMETRICSA>;
define inline-only constant $ARW-BOTTOMLEFT             = #x0000;
define inline-only constant $ARW-BOTTOMRIGHT            = #x0001;
define inline-only constant $ARW-TOPLEFT                = #x0002;
define inline-only constant $ARW-TOPRIGHT               = #x0003;
define inline-only constant $ARW-STARTMASK              = #x0003;
define inline-only constant $ARW-STARTRIGHT             = #x0001;
define inline-only constant $ARW-STARTTOP               = #x0002;
define inline-only constant $ARW-LEFT                   = #x0000;
define inline-only constant $ARW-RIGHT                  = #x0000;
define inline-only constant $ARW-UP                     = #x0004;
define inline-only constant $ARW-DOWN                   = #x0004;
define inline-only constant $ARW-HIDE                   = #x0008;

define C-struct <MINIMIZEDMETRICS>
  sealed inline-only slot cbSize-value   :: <UINT>;
  sealed inline-only slot iWidth-value   :: <C-int>;
  sealed inline-only slot iHorzGap-value :: <C-int>;
  sealed inline-only slot iVertGap-value :: <C-int>;
  sealed inline-only slot iArrange-value :: <C-int>;
  pointer-type-name: <LPMINIMIZEDMETRICS>;
  c-name: "struct tagMINIMIZEDMETRICS";
end C-struct <MINIMIZEDMETRICS>;
define inline constant <PMINIMIZEDMETRICS> = <LPMINIMIZEDMETRICS>;

define C-struct <ICONMETRICSA>
  sealed inline-only slot cbSize-value   :: <UINT>;
  sealed inline-only slot iHorzSpacing-value :: <C-int>;
  sealed inline-only slot iVertSpacing-value :: <C-int>;
  sealed inline-only slot iTitleWrap-value :: <C-int>;
  sealed inline-only slot lfFont-value   :: <LOGFONTA>;
  pointer-type-name: <LPICONMETRICSA>;
  c-name: "struct tagICONMETRICSA";
end C-struct <ICONMETRICSA>;
define inline constant <PICONMETRICSA> = <LPICONMETRICSA>;
define inline constant <ICONMETRICS> = <ICONMETRICSA>;
define inline constant <PICONMETRICS> = <PICONMETRICSA>;
define inline constant <LPICONMETRICS> = <LPICONMETRICSA>;

define C-struct <ANIMATIONINFO>
  sealed inline-only slot cbSize-value   :: <UINT>;
  sealed inline-only slot iMinAnimate-value :: <C-int>;
  pointer-type-name: <LPANIMATIONINFO>;
  c-name: "struct tagANIMATIONINFO";
end C-struct <ANIMATIONINFO>;

define C-struct <SERIALKEYSA>
  sealed inline-only slot cbSize-value   :: <UINT>;
  sealed inline-only slot dwFlags-value  :: <DWORD>;
  sealed inline-only slot lpszActivePort-value :: <LPSTR>;
  sealed inline-only slot lpszPort-value :: <LPSTR>;
  sealed inline-only slot iBaudRate-value :: <UINT>;
  sealed inline-only slot iPortState-value :: <UINT>;
  sealed inline-only slot iActive-value  :: <UINT>;
  pointer-type-name: <LPSERIALKEYSA>;
  c-name: "struct tagSERIALKEYSA";
end C-struct <SERIALKEYSA>;
define inline constant <SERIALKEYS> = <SERIALKEYSA>;
define inline constant <LPSERIALKEYS> = <LPSERIALKEYSA>;
define inline-only constant $SERKF-SERIALKEYSON         = #x00000001;
define inline-only constant $SERKF-AVAILABLE            = #x00000002;
define inline-only constant $SERKF-INDICATOR            = #x00000004;

define C-struct <HIGHCONTRASTA>
  sealed inline-only slot cbSize-value   :: <UINT>;
  sealed inline-only slot dwFlags-value  :: <DWORD>;
  sealed inline-only slot lpszDefaultScheme-value :: <LPSTR>;
  pointer-type-name: <LPHIGHCONTRASTA>;
  c-name: "struct tagHIGHCONTRASTA";
end C-struct <HIGHCONTRASTA>;
define inline constant <HIGHCONTRAST> = <HIGHCONTRASTA>;
define inline constant <LPHIGHCONTRAST> = <LPHIGHCONTRASTA>;
define inline-only constant $HCF-HIGHCONTRASTON         = #x00000001;
define inline-only constant $HCF-AVAILABLE              = #x00000002;
define inline-only constant $HCF-HOTKEYACTIVE           = #x00000004;
define inline-only constant $HCF-CONFIRMHOTKEY          = #x00000008;
define inline-only constant $HCF-HOTKEYSOUND            = #x00000010;
define inline-only constant $HCF-INDICATOR              = #x00000020;
define inline-only constant $HCF-HOTKEYAVAILABLE        = #x00000040;
define inline-only constant $CDS-UPDATEREGISTRY         = #x00000001;
define inline-only constant $CDS-TEST                   = #x00000002;
define inline-only constant $CDS-FULLSCREEN             = #x00000004;
define inline-only constant $CDS-GLOBAL                 = #x00000008;
define inline-only constant $CDS-SET-PRIMARY            = #x00000010;
define inline-only constant $CDS-RESET                  =
	as(<machine-word>, #x40000000);
define inline-only constant $CDS-SETRECT                =
	as(<machine-word>, #x20000000);
define inline-only constant $CDS-NORESET                =
	as(<machine-word>, #x10000000);
define inline-only constant $DISP-CHANGE-SUCCESSFUL     =    0;
define inline-only constant $DISP-CHANGE-RESTART        =    1;
define inline-only constant $DISP-CHANGE-FAILED         =   -1;
define inline-only constant $DISP-CHANGE-BADMODE        =   -2;
define inline-only constant $DISP-CHANGE-NOTUPDATED     =   -3;
define inline-only constant $DISP-CHANGE-BADFLAGS       =   -4;
define inline-only constant $DISP-CHANGE-BADPARAM       =   -5;

define inline-only C-function ChangeDisplaySettings
  parameter lpDevMode  :: <LPDEVMODEA>;
  parameter dwFlags    :: <DWORD>;
  result value :: <LONG>;
  c-name: "ChangeDisplaySettingsA", c-modifiers: "__stdcall";
end;
define inline-only constant $ENUM-CURRENT-SETTINGS      =   -1;
define inline-only constant $ENUM-REGISTRY-SETTINGS     =   -2;

define inline-only C-function EnumDisplaySettings
  parameter lpszDeviceName :: <LPCSTR>;
  parameter iModeNum   :: <DWORD>;
  parameter lpDevMode  :: <LPDEVMODEA>;
  result value :: <BOOL>;
  c-name: "EnumDisplaySettingsA", c-modifiers: "__stdcall";
end;

define inline-only C-function SystemParametersInfo
  parameter uiAction   :: <UINT>;
  parameter uiParam    :: <UINT>;
  parameter pvParam    :: <PVOID>;
  parameter fWinIni    :: <UINT>;
  result value :: <BOOL>;
  c-name: "SystemParametersInfoA", c-modifiers: "__stdcall";
end;

define C-struct <FILTERKEYS>
  sealed inline-only slot cbSize-value   :: <UINT>;
  sealed inline-only slot dwFlags-value  :: <DWORD>;
  sealed inline-only slot iWaitMSec-value :: <DWORD>;
  sealed inline-only slot iDelayMSec-value :: <DWORD>;
  sealed inline-only slot iRepeatMSec-value :: <DWORD>;
  sealed inline-only slot iBounceMSec-value :: <DWORD>;
  pointer-type-name: <LPFILTERKEYS>;
  c-name: "struct tagFILTERKEYS";
end C-struct <FILTERKEYS>;
define inline-only constant $FKF-FILTERKEYSON           = #x00000001;
define inline-only constant $FKF-AVAILABLE              = #x00000002;
define inline-only constant $FKF-HOTKEYACTIVE           = #x00000004;
define inline-only constant $FKF-CONFIRMHOTKEY          = #x00000008;
define inline-only constant $FKF-HOTKEYSOUND            = #x00000010;
define inline-only constant $FKF-INDICATOR              = #x00000020;
define inline-only constant $FKF-CLICKON                = #x00000040;

define C-struct <STICKYKEYS>
  sealed inline-only slot cbSize-value   :: <UINT>;
  sealed inline-only slot dwFlags-value  :: <DWORD>;
  pointer-type-name: <LPSTICKYKEYS>;
  c-name: "struct tagSTICKYKEYS";
end C-struct <STICKYKEYS>;
define inline-only constant $SKF-STICKYKEYSON           = #x00000001;
define inline-only constant $SKF-AVAILABLE              = #x00000002;
define inline-only constant $SKF-HOTKEYACTIVE           = #x00000004;
define inline-only constant $SKF-CONFIRMHOTKEY          = #x00000008;
define inline-only constant $SKF-HOTKEYSOUND            = #x00000010;
define inline-only constant $SKF-INDICATOR              = #x00000020;
define inline-only constant $SKF-AUDIBLEFEEDBACK        = #x00000040;
define inline-only constant $SKF-TRISTATE               = #x00000080;
define inline-only constant $SKF-TWOKEYSOFF             = #x00000100;

define C-struct <MOUSEKEYS>
  sealed inline-only slot cbSize-value   :: <UINT>;
  sealed inline-only slot dwFlags-value  :: <DWORD>;
  sealed inline-only slot iMaxSpeed-value :: <DWORD>;
  sealed inline-only slot iTimeToMaxSpeed-value :: <DWORD>;
  sealed inline-only slot iCtrlSpeed-value :: <DWORD>;
  sealed inline-only slot dwReserved1    :: <DWORD>;
  sealed inline-only slot dwReserved2    :: <DWORD>;
  pointer-type-name: <LPMOUSEKEYS>;
  c-name: "struct tagMOUSEKEYS";
end C-struct <MOUSEKEYS>;
define inline-only constant $MKF-MOUSEKEYSON            = #x00000001;
define inline-only constant $MKF-AVAILABLE              = #x00000002;
define inline-only constant $MKF-HOTKEYACTIVE           = #x00000004;
define inline-only constant $MKF-CONFIRMHOTKEY          = #x00000008;
define inline-only constant $MKF-HOTKEYSOUND            = #x00000010;
define inline-only constant $MKF-INDICATOR              = #x00000020;
define inline-only constant $MKF-MODIFIERS              = #x00000040;
define inline-only constant $MKF-REPLACENUMBERS         = #x00000080;

define C-struct <ACCESSTIMEOUT>
  sealed inline-only slot cbSize-value   :: <UINT>;
  sealed inline-only slot dwFlags-value  :: <DWORD>;
  sealed inline-only slot iTimeOutMSec-value :: <DWORD>;
  pointer-type-name: <LPACCESSTIMEOUT>;
  c-name: "struct tagACCESSTIMEOUT";
end C-struct <ACCESSTIMEOUT>;
define inline-only constant $ATF-TIMEOUTON              = #x00000001;
define inline-only constant $ATF-ONOFFFEEDBACK          = #x00000002;
define inline-only constant $SSGF-NONE                  =    0;
define inline-only constant $SSGF-DISPLAY               =    3;
define inline-only constant $SSTF-NONE                  =    0;
define inline-only constant $SSTF-CHARS                 =    1;
define inline-only constant $SSTF-BORDER                =    2;
define inline-only constant $SSTF-DISPLAY               =    3;
define inline-only constant $SSWF-NONE                  =    0;
define inline-only constant $SSWF-TITLE                 =    1;
define inline-only constant $SSWF-WINDOW                =    2;
define inline-only constant $SSWF-DISPLAY               =    3;
define inline-only constant $SSWF-CUSTOM                =    4;

define C-struct <SOUNDSENTRYA>
  sealed inline-only slot cbSize-value   :: <UINT>;
  sealed inline-only slot dwFlags-value  :: <DWORD>;
  sealed inline-only slot iFSTextEffect-value :: <DWORD>;
  sealed inline-only slot iFSTextEffectMSec-value :: <DWORD>;
  sealed inline-only slot iFSTextEffectColorBits-value :: <DWORD>;
  sealed inline-only slot iFSGrafEffect-value :: <DWORD>;
  sealed inline-only slot iFSGrafEffectMSec-value :: <DWORD>;
  sealed inline-only slot iFSGrafEffectColor-value :: <DWORD>;
  sealed inline-only slot iWindowsEffect-value :: <DWORD>;
  sealed inline-only slot iWindowsEffectMSec-value :: <DWORD>;
  sealed inline-only slot lpszWindowsEffectDLL-value :: <LPSTR>;
  sealed inline-only slot iWindowsEffectOrdinal-value :: <DWORD>;
  pointer-type-name: <LPSOUNDSENTRYA>;
  c-name: "struct tagSOUNDSENTRYA";
end C-struct <SOUNDSENTRYA>;
define inline constant <SOUNDSENTRY> = <SOUNDSENTRYA>;
define inline constant <LPSOUNDSENTRY> = <LPSOUNDSENTRYA>;
define inline-only constant $SSF-SOUNDSENTRYON          = #x00000001;
define inline-only constant $SSF-AVAILABLE              = #x00000002;
define inline-only constant $SSF-INDICATOR              = #x00000004;

define C-struct <TOGGLEKEYS>
  sealed inline-only slot cbSize-value   :: <UINT>;
  sealed inline-only slot dwFlags-value  :: <DWORD>;
  pointer-type-name: <LPTOGGLEKEYS>;
  c-name: "struct tagTOGGLEKEYS";
end C-struct <TOGGLEKEYS>;
define inline-only constant $TKF-TOGGLEKEYSON           = #x00000001;
define inline-only constant $TKF-AVAILABLE              = #x00000002;
define inline-only constant $TKF-HOTKEYACTIVE           = #x00000004;
define inline-only constant $TKF-CONFIRMHOTKEY          = #x00000008;
define inline-only constant $TKF-HOTKEYSOUND            = #x00000010;
define inline-only constant $TKF-INDICATOR              = #x00000020;
define inline-only constant $SLE-ERROR                  = #x00000001;
define inline-only constant $SLE-MINORERROR             = #x00000002;
define inline-only constant $SLE-WARNING                = #x00000003;

define inline-only C-function SetLastErrorEx
  parameter dwErrCode  :: <DWORD>;
  parameter dwType     :: <DWORD>;
  c-name: "SetLastErrorEx", c-modifiers: "__stdcall";
end;

define inline-only constant $WH-MINHOOK  = $WH-MIN;
define inline-only constant $HC-NOREM    = $HC-NOREMOVE;
define sealed domain make (singleton(<LPCBT-CREATEWNDA>));
define sealed domain initialize (<LPCBT-CREATEWNDA>);
define sealed domain make (singleton(<LPCBTACTIVATESTRUCT>));
define sealed domain initialize (<LPCBTACTIVATESTRUCT>);
define sealed domain make (singleton(<LPEVENTMSG>));
define sealed domain initialize (<LPEVENTMSG>);
define sealed domain make (singleton(<LPCWPSTRUCT>));
define sealed domain initialize (<LPCWPSTRUCT>);
define sealed domain make (singleton(<LPCWPRETSTRUCT>));
define sealed domain initialize (<LPCWPRETSTRUCT>);
define sealed domain make (singleton(<LPMOUSEHOOKSTRUCT>));
define sealed domain initialize (<LPMOUSEHOOKSTRUCT>);
define sealed domain make (singleton(<LPHARDWAREHOOKSTRUCT>));
define sealed domain initialize (<LPHARDWAREHOOKSTRUCT>);
define sealed domain make (singleton(<LPUSEROBJECTFLAGS>));
define sealed domain initialize (<LPUSEROBJECTFLAGS>);
define sealed domain make (singleton(<LPWNDCLASSEXA>));
define sealed domain initialize (<LPWNDCLASSEXA>);
define sealed domain make (singleton(<LPWNDCLASSA>));
define sealed domain initialize (<LPWNDCLASSA>);
define sealed domain make (singleton(<LPMSG>));
define sealed domain initialize (<LPMSG>);
define inline-only constant $WM-SETTINGCHANGE = $WM-WININICHANGE;
define sealed domain make (singleton(<LPMINMAXINFO>));
define sealed domain initialize (<LPMINMAXINFO>);
define sealed domain make (singleton(<LPCOPYDATASTRUCT>));
define sealed domain initialize (<LPCOPYDATASTRUCT>);
define sealed domain make (singleton(<LPMDINEXTMENU>));
define sealed domain initialize (<LPMDINEXTMENU>);
define inline-only constant $SIZENORMAL  = $SIZE-RESTORED;
define inline-only constant $SIZEICONIC  = $SIZE-MINIMIZED;
define inline-only constant $SIZEFULLSCREEN = $SIZE-MAXIMIZED;
define inline-only constant $SIZEZOOMSHOW = $SIZE-MAXSHOW;
define inline-only constant $SIZEZOOMHIDE = $SIZE-MAXHIDE;
define sealed domain make (singleton(<LPWINDOWPOS>));
define sealed domain initialize (<LPWINDOWPOS>);
define sealed domain make (singleton(<LPNCCALCSIZE-PARAMS>));
define sealed domain initialize (<LPNCCALCSIZE-PARAMS>);
define inline-only constant $WS-TILED    = $WS-OVERLAPPED;
define inline-only constant $WS-ICONIC   = $WS-MINIMIZE;
define inline-only constant $WS-SIZEBOX  = $WS-THICKFRAME;
define inline-only constant $WS-TILEDWINDOW = $WS-OVERLAPPEDWINDOW;
define sealed domain make (singleton(<LPACCEL>));
define sealed domain initialize (<LPACCEL>);
define sealed domain make (singleton(<LPPAINTSTRUCT>));
define sealed domain initialize (<LPPAINTSTRUCT>);
define sealed domain make (singleton(<LPCREATESTRUCTA>));
define sealed domain initialize (<LPCREATESTRUCTA>);
define sealed domain make (singleton(<LPWINDOWPLACEMENT>));
define sealed domain initialize (<LPWINDOWPLACEMENT>);
define sealed domain make (singleton(<LPNMHDR>));
define sealed domain initialize (<LPNMHDR>);
define sealed domain make (singleton(<LPSTYLESTRUCT>));
define sealed domain initialize (<LPSTYLESTRUCT>);
define sealed domain make (singleton(<LPMEASUREITEMSTRUCT>));
define sealed domain initialize (<LPMEASUREITEMSTRUCT>);
define sealed domain make (singleton(<LPDRAWITEMSTRUCT>));
define sealed domain initialize (<LPDRAWITEMSTRUCT>);
define sealed domain make (singleton(<LPDELETEITEMSTRUCT>));
define sealed domain initialize (<LPDELETEITEMSTRUCT>);
define sealed domain make (singleton(<LPCOMPAREITEMSTRUCT>));
define sealed domain initialize (<LPCOMPAREITEMSTRUCT>);
define inline-only constant $SWP-DRAWFRAME = $SWP-FRAMECHANGED;
define inline-only constant $SWP-NOREPOSITION = $SWP-NOOWNERZORDER;
define sealed domain make (singleton(<LPDLGTEMPLATE>));
define sealed domain initialize (<LPDLGTEMPLATE>);
define sealed domain make (singleton(<LPDLGITEMTEMPLATE>));
define sealed domain initialize (<LPDLGITEMTEMPLATE>);
define inline-only constant $SM-CXFIXEDFRAME = $SM-CXDLGFRAME;
define inline-only constant $SM-CYFIXEDFRAME = $SM-CYDLGFRAME;
define inline-only constant $SM-CXSIZEFRAME = $SM-CXFRAME;
define inline-only constant $SM-CYSIZEFRAME = $SM-CYFRAME;
define sealed domain make (singleton(<LPTPMPARAMS>));
define sealed domain initialize (<LPTPMPARAMS>);
define sealed domain make (singleton(<LPMENUITEMINFOA>));
define sealed domain initialize (<LPMENUITEMINFOA>);
define sealed domain make (singleton(<LPDROPSTRUCT>));
define sealed domain initialize (<LPDROPSTRUCT>);
define sealed domain make (singleton(<LPDRAWTEXTPARAMS>));
define sealed domain initialize (<LPDRAWTEXTPARAMS>);
define inline-only constant $ESB-DISABLE-LTUP = $ESB-DISABLE-LEFT;
define inline-only constant $ESB-DISABLE-RTDN = $ESB-DISABLE-RIGHT;
define sealed domain make (singleton(<LPHELPINFO>));
define sealed domain initialize (<LPHELPINFO>);
define inline-only constant $MB-ICONWARNING = $MB-ICONEXCLAMATION;
define inline-only constant $MB-ICONERROR = $MB-ICONHAND;
define inline-only constant $MB-ICONINFORMATION = $MB-ICONASTERISK;
define inline-only constant $MB-ICONSTOP = $MB-ICONHAND;
define sealed domain make (singleton(<LPMSGBOXPARAMSA>));
define sealed domain initialize (<LPMSGBOXPARAMSA>);
define inline-only constant $COLOR-DESKTOP = $COLOR-BACKGROUND;
define inline-only constant $COLOR-3DFACE = $COLOR-BTNFACE;
define inline-only constant $COLOR-3DSHADOW = $COLOR-BTNSHADOW;
define inline-only constant $COLOR-3DHIGHLIGHT = $COLOR-BTNHIGHLIGHT;
define inline-only constant $COLOR-3DHILIGHT = $COLOR-BTNHIGHLIGHT;
define inline-only constant $COLOR-BTNHILIGHT = $COLOR-BTNHIGHLIGHT;
define inline-only constant $MFT-STRING  = $MF-STRING;
define inline-only constant $MFT-BITMAP  = $MF-BITMAP;
define inline-only constant $MFT-MENUBARBREAK = $MF-MENUBARBREAK;
define inline-only constant $MFT-MENUBREAK = $MF-MENUBREAK;
define inline-only constant $MFT-OWNERDRAW = $MF-OWNERDRAW;
define inline-only constant $MFT-SEPARATOR = $MF-SEPARATOR;
define inline-only constant $MFT-RIGHTJUSTIFY = $MF-RIGHTJUSTIFY;
define inline-only constant $MFS-DISABLED = $MFS-GRAYED;
define inline-only constant $MFS-CHECKED = $MF-CHECKED;
define inline-only constant $MFS-HILITE  = $MF-HILITE;
define inline-only constant $MFS-ENABLED = $MF-ENABLED;
define inline-only constant $MFS-UNCHECKED = $MF-UNCHECKED;
define inline-only constant $MFS-UNHILITE = $MF-UNHILITE;
define inline-only constant $MFS-DEFAULT = $MF-DEFAULT;
define sealed domain make (singleton(<LPMENUITEMTEMPLATEHEADER>));
define sealed domain initialize (<LPMENUITEMTEMPLATEHEADER>);
define sealed domain make (singleton(<LPMENUITEMTEMPLATE>));
define sealed domain initialize (<LPMENUITEMTEMPLATE>);
define inline-only constant $SC-ICON     = $SC-MINIMIZE;
define inline-only constant $SC-ZOOM     = $SC-MAXIMIZE;
define sealed domain make (singleton(<LPICONINFO>));
define sealed domain initialize (<LPICONINFO>);
define sealed domain make (singleton(<LPCURSORSHAPE>));
define sealed domain initialize (<LPCURSORSHAPE>);
define inline-only constant $OIC-WARNING = $OIC-BANG;
define inline-only constant $OIC-ERROR   = $OIC-HAND;
define inline-only constant $OIC-INFORMATION = $OIC-NOTE;
define inline-only constant $IDI-WARNING = $IDI-EXCLAMATION;
define inline-only constant $IDI-ERROR   = $IDI-HAND;
define inline-only constant $IDI-INFORMATION = $IDI-ASTERISK;
define inline-only constant $EM-SETLIMITTEXT = $EM-LIMITTEXT;
define inline-only constant $BS-RIGHTBUTTON = $BS-LEFTTEXT;
define inline-only constant $BN-DBLCLK   = $BN-DOUBLECLICKED;
define sealed domain make (singleton(<LPSCROLLINFO>));
define sealed domain initialize (<LPSCROLLINFO>);
define sealed domain make (singleton(<LPMDICREATESTRUCTA>));
define sealed domain initialize (<LPMDICREATESTRUCTA>);
define sealed domain make (singleton(<LPCLIENTCREATESTRUCT>));
define sealed domain initialize (<LPCLIENTCREATESTRUCT>);
define sealed domain make (singleton(<LPMULTIKEYHELPA>));
define sealed domain initialize (<LPMULTIKEYHELPA>);
define sealed domain make (singleton(<LPHELPWININFOA>));
define sealed domain initialize (<LPHELPWININFOA>);
define inline-only constant $SPI-SCREENSAVERRUNNING =
	$SPI-SETSCREENSAVERRUNNING;
define inline-only constant $SPIF-SENDCHANGE =
	$SPIF-SENDWININICHANGE;
define sealed domain make (singleton(<LPNONCLIENTMETRICSA>));
define sealed domain initialize (<LPNONCLIENTMETRICSA>);
define sealed domain make (singleton(<LPMINIMIZEDMETRICS>));
define sealed domain initialize (<LPMINIMIZEDMETRICS>);
define sealed domain make (singleton(<LPICONMETRICSA>));
define sealed domain initialize (<LPICONMETRICSA>);
define sealed domain make (singleton(<LPANIMATIONINFO>));
define sealed domain initialize (<LPANIMATIONINFO>);
define sealed domain make (singleton(<LPSERIALKEYSA>));
define sealed domain initialize (<LPSERIALKEYSA>);
define sealed domain make (singleton(<LPHIGHCONTRASTA>));
define sealed domain initialize (<LPHIGHCONTRASTA>);
define sealed domain make (singleton(<LPFILTERKEYS>));
define sealed domain initialize (<LPFILTERKEYS>);
define sealed domain make (singleton(<LPSTICKYKEYS>));
define sealed domain initialize (<LPSTICKYKEYS>);
define sealed domain make (singleton(<LPMOUSEKEYS>));
define sealed domain initialize (<LPMOUSEKEYS>);
define sealed domain make (singleton(<LPACCESSTIMEOUT>));
define sealed domain initialize (<LPACCESSTIMEOUT>);
define sealed domain make (singleton(<LPSOUNDSENTRYA>));
define sealed domain initialize (<LPSOUNDSENTRYA>);
define sealed domain make (singleton(<LPTOGGLEKEYS>));
define sealed domain initialize (<LPTOGGLEKEYS>);
