JwaWinUser.pas
资源名称:win32api.zip [点击查看]
上传用户:davidchvip
上传日期:2009-07-28
资源大小:1749k
文件大小:670k
源码类别:
Windows编程
开发平台:
Delphi
- //
- // Combo Box styles
- //
- CBS_SIMPLE = $0001;
- {$EXTERNALSYM CBS_SIMPLE}
- CBS_DROPDOWN = $0002;
- {$EXTERNALSYM CBS_DROPDOWN}
- CBS_DROPDOWNLIST = $0003;
- {$EXTERNALSYM CBS_DROPDOWNLIST}
- CBS_OWNERDRAWFIXED = $0010;
- {$EXTERNALSYM CBS_OWNERDRAWFIXED}
- CBS_OWNERDRAWVARIABLE = $0020;
- {$EXTERNALSYM CBS_OWNERDRAWVARIABLE}
- CBS_AUTOHSCROLL = $0040;
- {$EXTERNALSYM CBS_AUTOHSCROLL}
- CBS_OEMCONVERT = $0080;
- {$EXTERNALSYM CBS_OEMCONVERT}
- CBS_SORT = $0100;
- {$EXTERNALSYM CBS_SORT}
- CBS_HASSTRINGS = $0200;
- {$EXTERNALSYM CBS_HASSTRINGS}
- CBS_NOINTEGRALHEIGHT = $0400;
- {$EXTERNALSYM CBS_NOINTEGRALHEIGHT}
- CBS_DISABLENOSCROLL = $0800;
- {$EXTERNALSYM CBS_DISABLENOSCROLL}
- CBS_UPPERCASE = $2000;
- {$EXTERNALSYM CBS_UPPERCASE}
- CBS_LOWERCASE = $4000;
- {$EXTERNALSYM CBS_LOWERCASE}
- //
- // Combo Box messages
- //
- CB_GETEDITSEL = $0140;
- {$EXTERNALSYM CB_GETEDITSEL}
- CB_LIMITTEXT = $0141;
- {$EXTERNALSYM CB_LIMITTEXT}
- CB_SETEDITSEL = $0142;
- {$EXTERNALSYM CB_SETEDITSEL}
- CB_ADDSTRING = $0143;
- {$EXTERNALSYM CB_ADDSTRING}
- CB_DELETESTRING = $0144;
- {$EXTERNALSYM CB_DELETESTRING}
- CB_DIR = $0145;
- {$EXTERNALSYM CB_DIR}
- CB_GETCOUNT = $0146;
- {$EXTERNALSYM CB_GETCOUNT}
- CB_GETCURSEL = $0147;
- {$EXTERNALSYM CB_GETCURSEL}
- CB_GETLBTEXT = $0148;
- {$EXTERNALSYM CB_GETLBTEXT}
- CB_GETLBTEXTLEN = $0149;
- {$EXTERNALSYM CB_GETLBTEXTLEN}
- CB_INSERTSTRING = $014A;
- {$EXTERNALSYM CB_INSERTSTRING}
- CB_RESETCONTENT = $014B;
- {$EXTERNALSYM CB_RESETCONTENT}
- CB_FINDSTRING = $014C;
- {$EXTERNALSYM CB_FINDSTRING}
- CB_SELECTSTRING = $014D;
- {$EXTERNALSYM CB_SELECTSTRING}
- CB_SETCURSEL = $014E;
- {$EXTERNALSYM CB_SETCURSEL}
- CB_SHOWDROPDOWN = $014F;
- {$EXTERNALSYM CB_SHOWDROPDOWN}
- CB_GETITEMDATA = $0150;
- {$EXTERNALSYM CB_GETITEMDATA}
- CB_SETITEMDATA = $0151;
- {$EXTERNALSYM CB_SETITEMDATA}
- CB_GETDROPPEDCONTROLRECT = $0152;
- {$EXTERNALSYM CB_GETDROPPEDCONTROLRECT}
- CB_SETITEMHEIGHT = $0153;
- {$EXTERNALSYM CB_SETITEMHEIGHT}
- CB_GETITEMHEIGHT = $0154;
- {$EXTERNALSYM CB_GETITEMHEIGHT}
- CB_SETEXTENDEDUI = $0155;
- {$EXTERNALSYM CB_SETEXTENDEDUI}
- CB_GETEXTENDEDUI = $0156;
- {$EXTERNALSYM CB_GETEXTENDEDUI}
- CB_GETDROPPEDSTATE = $0157;
- {$EXTERNALSYM CB_GETDROPPEDSTATE}
- CB_FINDSTRINGEXACT = $0158;
- {$EXTERNALSYM CB_FINDSTRINGEXACT}
- CB_SETLOCALE = $0159;
- {$EXTERNALSYM CB_SETLOCALE}
- CB_GETLOCALE = $015A;
- {$EXTERNALSYM CB_GETLOCALE}
- CB_GETTOPINDEX = $015b;
- {$EXTERNALSYM CB_GETTOPINDEX}
- CB_SETTOPINDEX = $015c;
- {$EXTERNALSYM CB_SETTOPINDEX}
- CB_GETHORIZONTALEXTENT = $015d;
- {$EXTERNALSYM CB_GETHORIZONTALEXTENT}
- CB_SETHORIZONTALEXTENT = $015e;
- {$EXTERNALSYM CB_SETHORIZONTALEXTENT}
- CB_GETDROPPEDWIDTH = $015f;
- {$EXTERNALSYM CB_GETDROPPEDWIDTH}
- CB_SETDROPPEDWIDTH = $0160;
- {$EXTERNALSYM CB_SETDROPPEDWIDTH}
- CB_INITSTORAGE = $0161;
- {$EXTERNALSYM CB_INITSTORAGE}
- CB_MULTIPLEADDSTRING = $0163;
- {$EXTERNALSYM CB_MULTIPLEADDSTRING}
- CB_GETCOMBOBOXINFO = $0164;
- {$EXTERNALSYM CB_GETCOMBOBOXINFO}
- {$IFDEF WINVER_0400_GREATER}
- CB_MSGMAX = $0165;
- {$EXTERNALSYM CB_MSGMAX}
- {$ELSE}
- {$IFDEF WINVER_0400_GREATER}
- CB_MSGMAX = $0162;
- {$EXTERNALSYM CB_MSGMAX}
- {$ELSE}
- CB_MSGMAX = $015B;
- {$EXTERNALSYM CB_MSGMAX}
- {$ENDIF}
- {$ENDIF}
- //
- // Scroll Bar Styles
- //
- SBS_HORZ = $0000;
- {$EXTERNALSYM SBS_HORZ}
- SBS_VERT = $0001;
- {$EXTERNALSYM SBS_VERT}
- SBS_TOPALIGN = $0002;
- {$EXTERNALSYM SBS_TOPALIGN}
- SBS_LEFTALIGN = $0002;
- {$EXTERNALSYM SBS_LEFTALIGN}
- SBS_BOTTOMALIGN = $0004;
- {$EXTERNALSYM SBS_BOTTOMALIGN}
- SBS_RIGHTALIGN = $0004;
- {$EXTERNALSYM SBS_RIGHTALIGN}
- SBS_SIZEBOXTOPLEFTALIGN = $0002;
- {$EXTERNALSYM SBS_SIZEBOXTOPLEFTALIGN}
- SBS_SIZEBOXBOTTOMRIGHTALIGN = $0004;
- {$EXTERNALSYM SBS_SIZEBOXBOTTOMRIGHTALIGN}
- SBS_SIZEBOX = $0008;
- {$EXTERNALSYM SBS_SIZEBOX}
- SBS_SIZEGRIP = $0010;
- {$EXTERNALSYM SBS_SIZEGRIP}
- //
- // Scroll bar messages
- //
- SBM_SETPOS = $00E0; // not in win3.1
- {$EXTERNALSYM SBM_SETPOS}
- SBM_GETPOS = $00E1; // not in win3.1
- {$EXTERNALSYM SBM_GETPOS}
- SBM_SETRANGE = $00E2; // not in win3.1
- {$EXTERNALSYM SBM_SETRANGE}
- SBM_SETRANGEREDRAW = $00E6; // not in win3.1
- {$EXTERNALSYM SBM_SETRANGEREDRAW}
- SBM_GETRANGE = $00E3; // not in win3.1
- {$EXTERNALSYM SBM_GETRANGE}
- SBM_ENABLE_ARROWS = $00E4; // not in win3.1
- {$EXTERNALSYM SBM_ENABLE_ARROWS}
- SBM_SETSCROLLINFO = $00E9;
- {$EXTERNALSYM SBM_SETSCROLLINFO}
- SBM_GETSCROLLINFO = $00EA;
- {$EXTERNALSYM SBM_GETSCROLLINFO}
- SBM_GETSCROLLBARINFO = $00EB;
- {$EXTERNALSYM SBM_GETSCROLLBARINFO}
- SIF_RANGE = $0001;
- {$EXTERNALSYM SIF_RANGE}
- SIF_PAGE = $0002;
- {$EXTERNALSYM SIF_PAGE}
- SIF_POS = $0004;
- {$EXTERNALSYM SIF_POS}
- SIF_DISABLENOSCROLL = $0008;
- {$EXTERNALSYM SIF_DISABLENOSCROLL}
- SIF_TRACKPOS = $0010;
- {$EXTERNALSYM SIF_TRACKPOS}
- SIF_ALL = (SIF_RANGE or SIF_PAGE or SIF_POS or SIF_TRACKPOS);
- {$EXTERNALSYM SIF_ALL}
- type
- LPSCROLLINFO = ^SCROLLINFO;
- {$EXTERNALSYM LPSCROLLINFO}
- tagSCROLLINFO = record
- cbSize: UINT;
- fMask: UINT;
- nMin: Integer;
- nMax: Integer;
- nPage: UINT;
- nPos: Integer;
- nTrackPos: Integer;
- end;
- {$EXTERNALSYM tagSCROLLINFO}
- SCROLLINFO = tagSCROLLINFO;
- {$EXTERNALSYM SCROLLINFO}
- TScrollInfo = SCROLLINFO;
- PScrollInfo = LPSCROLLINFO;
- function SetScrollInfo(hwnd: HWND; fnBar: Integer; const lpsi: SCROLLINFO;
- fRedraw: BOOL): Integer; stdcall;
- {$EXTERNALSYM SetScrollInfo}
- function GetScrollInfo(hwnd: HWND; fnBar: Integer; var lpsi: SCROLLINFO): BOOL; stdcall;
- {$EXTERNALSYM GetScrollInfo}
- //
- // MDI client style bits
- //
- const
- MDIS_ALLCHILDSTYLES = $0001;
- {$EXTERNALSYM MDIS_ALLCHILDSTYLES}
- //
- // wParam Flags for WM_MDITILE and WM_MDICASCADE messages.
- //
- const
- MDITILE_VERTICAL = $0000; // not in win3.1
- {$EXTERNALSYM MDITILE_VERTICAL}
- MDITILE_HORIZONTAL = $0001; // not in win3.1
- {$EXTERNALSYM MDITILE_HORIZONTAL}
- MDITILE_SKIPDISABLED = $0002; // not in win3.1
- {$EXTERNALSYM MDITILE_SKIPDISABLED}
- MDITILE_ZORDER = $0004;
- {$EXTERNALSYM MDITILE_ZORDER}
- type
- LPMDICREATESTRUCTA = ^MDICREATESTRUCTA;
- {$EXTERNALSYM LPMDICREATESTRUCTA}
- tagMDICREATESTRUCTA = record
- szClass: LPCSTR;
- szTitle: LPCSTR;
- hOwner: HANDLE;
- x: Integer;
- y: Integer;
- cx: Integer;
- cy: Integer;
- style: DWORD;
- lParam: LPARAM; // app-defined stuff//
- end;
- {$EXTERNALSYM tagMDICREATESTRUCTA}
- MDICREATESTRUCTA = tagMDICREATESTRUCTA;
- {$EXTERNALSYM MDICREATESTRUCTA}
- TMdiCreateStructA = MDICREATESTRUCTA;
- PMdiCreateStructA = LPMDICREATESTRUCTA;
- LPMDICREATESTRUCTW = ^MDICREATESTRUCTW;
- {$EXTERNALSYM LPMDICREATESTRUCTW}
- tagMDICREATESTRUCTW = record
- szClass: LPCWSTR;
- szTitle: LPCWSTR;
- hOwner: HANDLE;
- x: Integer;
- y: Integer;
- cx: Integer;
- cy: Integer;
- style: DWORD;
- lParam: LPARAM; // app-defined stuff//
- end;
- {$EXTERNALSYM tagMDICREATESTRUCTW}
- MDICREATESTRUCTW = tagMDICREATESTRUCTW;
- {$EXTERNALSYM MDICREATESTRUCTW}
- TMdiCreateStructW = MDICREATESTRUCTW;
- PMdiCreateStructW = LPMDICREATESTRUCTW;
- {$IFDEF UNICODE}
- MDICREATESTRUCT = MDICREATESTRUCTW;
- {$EXTERNALSYM MDICREATESTRUCT}
- LPMDICREATESTRUCT = LPMDICREATESTRUCTW;
- {$EXTERNALSYM LPMDICREATESTRUCT}
- TMdiCreateStruct = TMdiCreateStructW;
- PMdiCreateStruct = PMdiCreateStructW;
- {$ELSE}
- MDICREATESTRUCT = MDICREATESTRUCTA;
- {$EXTERNALSYM MDICREATESTRUCT}
- LPMDICREATESTRUCT = LPMDICREATESTRUCTA;
- {$EXTERNALSYM LPMDICREATESTRUCT}
- TMdiCreateStruct = TMdiCreateStructA;
- PMdiCreateStruct = PMdiCreateStructA;
- {$ENDIF}
- LPCLIENTCREATESTRUCT = ^CLIENTCREATESTRUCT;
- {$EXTERNALSYM LPCLIENTCREATESTRUCT}
- tagCLIENTCREATESTRUCT = record
- hWindowMenu: HANDLE;
- idFirstChild: UINT;
- end;
- {$EXTERNALSYM tagCLIENTCREATESTRUCT}
- CLIENTCREATESTRUCT = tagCLIENTCREATESTRUCT;
- {$EXTERNALSYM CLIENTCREATESTRUCT}
- TClientCreateStruct = CLIENTCREATESTRUCT;
- PClientCreateStruct = LPCLIENTCREATESTRUCT;
- function DefFrameProcA(hWnd: HWND; hWndMDIClient: HWND; uMsg: UINT;
- wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
- {$EXTERNALSYM DefFrameProcA}
- function DefFrameProcW(hWnd: HWND; hWndMDIClient: HWND; uMsg: UINT;
- wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
- {$EXTERNALSYM DefFrameProcW}
- {$IFDEF UNICODE}
- function DefFrameProc(hWnd: HWND; hWndMDIClient: HWND; uMsg: UINT;
- wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
- {$EXTERNALSYM DefFrameProc}
- {$ELSE}
- function DefFrameProc(hWnd: HWND; hWndMDIClient: HWND; uMsg: UINT;
- wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
- {$EXTERNALSYM DefFrameProc}
- {$ENDIF}
- function DefMDIChildProcA(hWnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
- {$EXTERNALSYM DefMDIChildProcA}
- function DefMDIChildProcW(hWnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
- {$EXTERNALSYM DefMDIChildProcW}
- {$IFDEF UNICODE}
- function DefMDIChildProc(hWnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
- {$EXTERNALSYM DefMDIChildProc}
- {$ELSE}
- function DefMDIChildProc(hWnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
- {$EXTERNALSYM DefMDIChildProc}
- {$ENDIF}
- function TranslateMDISysAccel(hWndClient: HWND; const lpMsg: MSG): BOOL; stdcall;
- {$EXTERNALSYM TranslateMDISysAccel}
- function ArrangeIconicWindows(hWnd: HWND): UINT; stdcall;
- {$EXTERNALSYM ArrangeIconicWindows}
- function CreateMDIWindowA(lpClassName, lpWindowName: LPCSTR; dwStyle: DWORD;
- X, Y, nWidth, nHeight: Integer; hWndParent: HWND; hInstance: HINSTANCE;
- lParam: LPARAM): HWND; stdcall;
- {$EXTERNALSYM CreateMDIWindowA}
- function CreateMDIWindowW(lpClassName, lpWindowName: LPCWSTR; dwStyle: DWORD;
- X, Y, nWidth, nHeight: Integer; hWndParent: HWND; hInstance: HINSTANCE;
- lParam: LPARAM): HWND; stdcall;
- {$EXTERNALSYM CreateMDIWindowW}
- {$IFDEF UNICODE}
- function CreateMDIWindow(lpClassName, lpWindowName: LPCWSTR; dwStyle: DWORD;
- X, Y, nWidth, nHeight: Integer; hWndParent: HWND; hInstance: HINSTANCE;
- lParam: LPARAM): HWND; stdcall;
- {$EXTERNALSYM CreateMDIWindow}
- {$ELSE}
- function CreateMDIWindow(lpClassName, lpWindowName: LPCSTR; dwStyle: DWORD;
- X, Y, nWidth, nHeight: Integer; hWndParent: HWND; hInstance: HINSTANCE;
- lParam: LPARAM): HWND; stdcall;
- {$EXTERNALSYM CreateMDIWindow}
- {$ENDIF}
- function TileWindows(hwndParent: HWND; wHow: UINT; lpRect: LPRECT; cKids: UINT;
- hwnd: HWND; lpKids: LPHWND): WORD; stdcall;
- {$EXTERNALSYM TileWindows}
- function CascadeWindows(hwndParent: HWND; wHow: UINT; lpRect: LPRECT;
- cKids: UINT; lpKids: LPHWND): WORD; stdcall;
- {$EXTERNALSYM CascadeWindows}
- //***** Help support ********************************************************/
- type
- HELPPOLY = DWORD;
- {$EXTERNALSYM HELPPOLY}
- LPMULTIKEYHELPA = ^MULTIKEYHELPA;
- {$EXTERNALSYM LPMULTIKEYHELPA}
- tagMULTIKEYHELPA = record
- mkSize: DWORD;
- mkKeylist: CHAR;
- szKeyphrase: array [0..0] of CHAR;
- end;
- {$EXTERNALSYM tagMULTIKEYHELPA}
- MULTIKEYHELPA = tagMULTIKEYHELPA;
- {$EXTERNALSYM MULTIKEYHELPA}
- TMultiKeyHelpA = MULTIKEYHELPA;
- PMultiKeyHelpA = LPMULTIKEYHELPA;
- LPMULTIKEYHELPW = ^MULTIKEYHELPW;
- {$EXTERNALSYM LPMULTIKEYHELPW}
- tagMULTIKEYHELPW = record
- mkSize: DWORD;
- mkKeylist: WCHAR;
- szKeyphrase: array [0..0] of WCHAR;
- end;
- {$EXTERNALSYM tagMULTIKEYHELPW}
- MULTIKEYHELPW = tagMULTIKEYHELPW;
- {$EXTERNALSYM MULTIKEYHELPW}
- TMultiKeyHelpW = MULTIKEYHELPW;
- PMultiKeyHelpW = LPMULTIKEYHELPW;
- {$IFDEF UNICODE}
- MULTIKEYHELP = MULTIKEYHELPW;
- {$EXTERNALSYM MULTIKEYHELP}
- LPMULTIKEYHELP = LPMULTIKEYHELPW;
- {$EXTERNALSYM LPMULTIKEYHELP}
- TMultiKeyHelp = TMultiKeyHelpW;
- PMultiKeyHelp = PMultiKeyHelpW;
- {$ELSE}
- MULTIKEYHELP = MULTIKEYHELPA;
- {$EXTERNALSYM MULTIKEYHELP}
- LPMULTIKEYHELP = LPMULTIKEYHELPA;
- {$EXTERNALSYM LPMULTIKEYHELP}
- TMultiKeyHelp = TMultiKeyHelpA;
- PMultiKeyHelp = PMultiKeyHelpA;
- {$ENDIF}
- LPHELPWININFOA = ^HELPWININFOA;
- {$EXTERNALSYM LPHELPWININFOA}
- tagHELPWININFOA = record
- wStructSize: Integer;
- x: Integer;
- y: Integer;
- dx: Integer;
- dy: Integer;
- wMax: Integer;
- rgchMember: array [0..1] of CHAR;
- end;
- {$EXTERNALSYM tagHELPWININFOA}
- HELPWININFOA = tagHELPWININFOA;
- {$EXTERNALSYM HELPWININFOA}
- THelpWinInfoA = HELPWININFOA;
- PHelpWinInfoA = LPHELPWININFOA;
- LPHELPWININFOW = ^HELPWININFOW;
- {$EXTERNALSYM LPHELPWININFOW}
- tagHELPWININFOW = record
- wStructSize: Integer;
- x: Integer;
- y: Integer;
- dx: Integer;
- dy: Integer;
- wMax: Integer;
- rgchMember: array [0..1] of WCHAR;
- end;
- {$EXTERNALSYM tagHELPWININFOW}
- HELPWININFOW = tagHELPWININFOW;
- {$EXTERNALSYM HELPWININFOW}
- THelpWinInfoW = HELPWININFOW;
- PHelpWinInfoW = LPHELPWININFOW;
- {$IFDEF UNICODE}
- HELPWININFO = HELPWININFOW;
- {$EXTERNALSYM HELPWININFO}
- LPHELPWININFO = LPHELPWININFOW;
- {$EXTERNALSYM LPHELPWININFO}
- THelpWinInfo = THelpWinInfoW;
- PHelpWinInfo = PHelpWinInfoW;
- {$ELSE}
- HELPWININFO = HELPWININFOA;
- {$EXTERNALSYM HELPWININFO}
- LPHELPWININFO = LPHELPWININFOA;
- {$EXTERNALSYM LPHELPWININFO}
- THelpWinInfo = THelpWinInfoA;
- PHelpWinInfo = PHelpWinInfoA;
- {$ENDIF}
- //
- // Commands to pass to WinHelp()
- //
- const
- HELP_CONTEXT = $0001; // Display topic in ulTopic
- {$EXTERNALSYM HELP_CONTEXT}
- HELP_QUIT = $0002; // Terminate help
- {$EXTERNALSYM HELP_QUIT}
- HELP_INDEX = $0003; // Display index
- {$EXTERNALSYM HELP_INDEX}
- HELP_CONTENTS = $0003;
- {$EXTERNALSYM HELP_CONTENTS}
- HELP_HELPONHELP = $0004; // Display help on using help
- {$EXTERNALSYM HELP_HELPONHELP}
- HELP_SETINDEX = $0005; // Set current Index for multi index help
- {$EXTERNALSYM HELP_SETINDEX}
- HELP_SETCONTENTS = $0005;
- {$EXTERNALSYM HELP_SETCONTENTS}
- HELP_CONTEXTPOPUP = $0008;
- {$EXTERNALSYM HELP_CONTEXTPOPUP}
- HELP_FORCEFILE = $0009;
- {$EXTERNALSYM HELP_FORCEFILE}
- HELP_KEY = $0101; // Display topic for keyword in offabData
- {$EXTERNALSYM HELP_KEY}
- HELP_COMMAND = $0102;
- {$EXTERNALSYM HELP_COMMAND}
- HELP_PARTIALKEY = $0105;
- {$EXTERNALSYM HELP_PARTIALKEY}
- HELP_MULTIKEY = $0201;
- {$EXTERNALSYM HELP_MULTIKEY}
- HELP_SETWINPOS = $0203;
- {$EXTERNALSYM HELP_SETWINPOS}
- HELP_CONTEXTMENU = $000a;
- {$EXTERNALSYM HELP_CONTEXTMENU}
- HELP_FINDER = $000b;
- {$EXTERNALSYM HELP_FINDER}
- HELP_WM_HELP = $000c;
- {$EXTERNALSYM HELP_WM_HELP}
- HELP_SETPOPUP_POS = $000d;
- {$EXTERNALSYM HELP_SETPOPUP_POS}
- HELP_TCARD = $8000;
- {$EXTERNALSYM HELP_TCARD}
- HELP_TCARD_DATA = $0010;
- {$EXTERNALSYM HELP_TCARD_DATA}
- HELP_TCARD_OTHER_CALLER = $0011;
- {$EXTERNALSYM HELP_TCARD_OTHER_CALLER}
- // These are in winhelp.h in Win95.
- IDH_NO_HELP = 28440;
- {$EXTERNALSYM IDH_NO_HELP}
- IDH_MISSING_CONTEXT = 28441; // Control doesn't have matching help context
- {$EXTERNALSYM IDH_MISSING_CONTEXT}
- IDH_GENERIC_HELP_BUTTON = 28442; // Property sheet help button
- {$EXTERNALSYM IDH_GENERIC_HELP_BUTTON}
- IDH_OK = 28443;
- {$EXTERNALSYM IDH_OK}
- IDH_CANCEL = 28444;
- {$EXTERNALSYM IDH_CANCEL}
- IDH_HELP = 28445;
- {$EXTERNALSYM IDH_HELP}
- function WinHelpA(hWndMain: HWND; lpszHelp: LPCSTR; uCommand: UINT; dwData: ULONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM WinHelpA}
- function WinHelpW(hWndMain: HWND; lpszHelp: LPCWSTR; uCommand: UINT; dwData: ULONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM WinHelpW}
- {$IFDEF UNICODE}
- function WinHelp(hWndMain: HWND; lpszHelp: LPCWSTR; uCommand: UINT; dwData: ULONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM WinHelp}
- {$ELSE}
- function WinHelp(hWndMain: HWND; lpszHelp: LPCSTR; uCommand: UINT; dwData: ULONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM WinHelp}
- {$ENDIF}
- const
- GR_GDIOBJECTS = 0; // Count of GDI objects
- {$EXTERNALSYM GR_GDIOBJECTS}
- GR_USEROBJECTS = 1; // Count of USER objects
- {$EXTERNALSYM GR_USEROBJECTS}
- function GetGuiResources(hProcess: HANDLE; uiFlags: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetGuiResources}
- //
- // Parameter for SystemParametersInfo()
- //
- const
- SPI_GETBEEP = 1;
- {$EXTERNALSYM SPI_GETBEEP}
- SPI_SETBEEP = 2;
- {$EXTERNALSYM SPI_SETBEEP}
- SPI_GETMOUSE = 3;
- {$EXTERNALSYM SPI_GETMOUSE}
- SPI_SETMOUSE = 4;
- {$EXTERNALSYM SPI_SETMOUSE}
- SPI_GETBORDER = 5;
- {$EXTERNALSYM SPI_GETBORDER}
- SPI_SETBORDER = 6;
- {$EXTERNALSYM SPI_SETBORDER}
- SPI_GETKEYBOARDSPEED = 10;
- {$EXTERNALSYM SPI_GETKEYBOARDSPEED}
- SPI_SETKEYBOARDSPEED = 11;
- {$EXTERNALSYM SPI_SETKEYBOARDSPEED}
- SPI_LANGDRIVER = 12;
- {$EXTERNALSYM SPI_LANGDRIVER}
- SPI_ICONHORIZONTALSPACING = 13;
- {$EXTERNALSYM SPI_ICONHORIZONTALSPACING}
- SPI_GETSCREENSAVETIMEOUT = 14;
- {$EXTERNALSYM SPI_GETSCREENSAVETIMEOUT}
- SPI_SETSCREENSAVETIMEOUT = 15;
- {$EXTERNALSYM SPI_SETSCREENSAVETIMEOUT}
- SPI_GETSCREENSAVEACTIVE = 16;
- {$EXTERNALSYM SPI_GETSCREENSAVEACTIVE}
- SPI_SETSCREENSAVEACTIVE = 17;
- {$EXTERNALSYM SPI_SETSCREENSAVEACTIVE}
- SPI_GETGRIDGRANULARITY = 18;
- {$EXTERNALSYM SPI_GETGRIDGRANULARITY}
- SPI_SETGRIDGRANULARITY = 19;
- {$EXTERNALSYM SPI_SETGRIDGRANULARITY}
- SPI_SETDESKWALLPAPER = 20;
- {$EXTERNALSYM SPI_SETDESKWALLPAPER}
- SPI_SETDESKPATTERN = 21;
- {$EXTERNALSYM SPI_SETDESKPATTERN}
- SPI_GETKEYBOARDDELAY = 22;
- {$EXTERNALSYM SPI_GETKEYBOARDDELAY}
- SPI_SETKEYBOARDDELAY = 23;
- {$EXTERNALSYM SPI_SETKEYBOARDDELAY}
- SPI_ICONVERTICALSPACING = 24;
- {$EXTERNALSYM SPI_ICONVERTICALSPACING}
- SPI_GETICONTITLEWRAP = 25;
- {$EXTERNALSYM SPI_GETICONTITLEWRAP}
- SPI_SETICONTITLEWRAP = 26;
- {$EXTERNALSYM SPI_SETICONTITLEWRAP}
- SPI_GETMENUDROPALIGNMENT = 27;
- {$EXTERNALSYM SPI_GETMENUDROPALIGNMENT}
- SPI_SETMENUDROPALIGNMENT = 28;
- {$EXTERNALSYM SPI_SETMENUDROPALIGNMENT}
- SPI_SETDOUBLECLKWIDTH = 29;
- {$EXTERNALSYM SPI_SETDOUBLECLKWIDTH}
- SPI_SETDOUBLECLKHEIGHT = 30;
- {$EXTERNALSYM SPI_SETDOUBLECLKHEIGHT}
- SPI_GETICONTITLELOGFONT = 31;
- {$EXTERNALSYM SPI_GETICONTITLELOGFONT}
- SPI_SETDOUBLECLICKTIME = 32;
- {$EXTERNALSYM SPI_SETDOUBLECLICKTIME}
- SPI_SETMOUSEBUTTONSWAP = 33;
- {$EXTERNALSYM SPI_SETMOUSEBUTTONSWAP}
- SPI_SETICONTITLELOGFONT = 34;
- {$EXTERNALSYM SPI_SETICONTITLELOGFONT}
- SPI_GETFASTTASKSWITCH = 35;
- {$EXTERNALSYM SPI_GETFASTTASKSWITCH}
- SPI_SETFASTTASKSWITCH = 36;
- {$EXTERNALSYM SPI_SETFASTTASKSWITCH}
- SPI_SETDRAGFULLWINDOWS = 37;
- {$EXTERNALSYM SPI_SETDRAGFULLWINDOWS}
- SPI_GETDRAGFULLWINDOWS = 38;
- {$EXTERNALSYM SPI_GETDRAGFULLWINDOWS}
- SPI_GETNONCLIENTMETRICS = 41;
- {$EXTERNALSYM SPI_GETNONCLIENTMETRICS}
- SPI_SETNONCLIENTMETRICS = 42;
- {$EXTERNALSYM SPI_SETNONCLIENTMETRICS}
- SPI_GETMINIMIZEDMETRICS = 43;
- {$EXTERNALSYM SPI_GETMINIMIZEDMETRICS}
- SPI_SETMINIMIZEDMETRICS = 44;
- {$EXTERNALSYM SPI_SETMINIMIZEDMETRICS}
- SPI_GETICONMETRICS = 45;
- {$EXTERNALSYM SPI_GETICONMETRICS}
- SPI_SETICONMETRICS = 46;
- {$EXTERNALSYM SPI_SETICONMETRICS}
- SPI_SETWORKAREA = 47;
- {$EXTERNALSYM SPI_SETWORKAREA}
- SPI_GETWORKAREA = 48;
- {$EXTERNALSYM SPI_GETWORKAREA}
- SPI_SETPENWINDOWS = 49;
- {$EXTERNALSYM SPI_SETPENWINDOWS}
- SPI_GETHIGHCONTRAST = 66;
- {$EXTERNALSYM SPI_GETHIGHCONTRAST}
- SPI_SETHIGHCONTRAST = 67;
- {$EXTERNALSYM SPI_SETHIGHCONTRAST}
- SPI_GETKEYBOARDPREF = 68;
- {$EXTERNALSYM SPI_GETKEYBOARDPREF}
- SPI_SETKEYBOARDPREF = 69;
- {$EXTERNALSYM SPI_SETKEYBOARDPREF}
- SPI_GETSCREENREADER = 70;
- {$EXTERNALSYM SPI_GETSCREENREADER}
- SPI_SETSCREENREADER = 71;
- {$EXTERNALSYM SPI_SETSCREENREADER}
- SPI_GETANIMATION = 72;
- {$EXTERNALSYM SPI_GETANIMATION}
- SPI_SETANIMATION = 73;
- {$EXTERNALSYM SPI_SETANIMATION}
- SPI_GETFONTSMOOTHING = 74;
- {$EXTERNALSYM SPI_GETFONTSMOOTHING}
- SPI_SETFONTSMOOTHING = 75;
- {$EXTERNALSYM SPI_SETFONTSMOOTHING}
- SPI_SETDRAGWIDTH = 76;
- {$EXTERNALSYM SPI_SETDRAGWIDTH}
- SPI_SETDRAGHEIGHT = 77;
- {$EXTERNALSYM SPI_SETDRAGHEIGHT}
- SPI_SETHANDHELD = 78;
- {$EXTERNALSYM SPI_SETHANDHELD}
- SPI_GETLOWPOWERTIMEOUT = 79;
- {$EXTERNALSYM SPI_GETLOWPOWERTIMEOUT}
- SPI_GETPOWEROFFTIMEOUT = 80;
- {$EXTERNALSYM SPI_GETPOWEROFFTIMEOUT}
- SPI_SETLOWPOWERTIMEOUT = 81;
- {$EXTERNALSYM SPI_SETLOWPOWERTIMEOUT}
- SPI_SETPOWEROFFTIMEOUT = 82;
- {$EXTERNALSYM SPI_SETPOWEROFFTIMEOUT}
- SPI_GETLOWPOWERACTIVE = 83;
- {$EXTERNALSYM SPI_GETLOWPOWERACTIVE}
- SPI_GETPOWEROFFACTIVE = 84;
- {$EXTERNALSYM SPI_GETPOWEROFFACTIVE}
- SPI_SETLOWPOWERACTIVE = 85;
- {$EXTERNALSYM SPI_SETLOWPOWERACTIVE}
- SPI_SETPOWEROFFACTIVE = 86;
- {$EXTERNALSYM SPI_SETPOWEROFFACTIVE}
- SPI_SETCURSORS = 87;
- {$EXTERNALSYM SPI_SETCURSORS}
- SPI_SETICONS = 88;
- {$EXTERNALSYM SPI_SETICONS}
- SPI_GETDEFAULTINPUTLANG = 89;
- {$EXTERNALSYM SPI_GETDEFAULTINPUTLANG}
- SPI_SETDEFAULTINPUTLANG = 90;
- {$EXTERNALSYM SPI_SETDEFAULTINPUTLANG}
- SPI_SETLANGTOGGLE = 91;
- {$EXTERNALSYM SPI_SETLANGTOGGLE}
- SPI_GETWINDOWSEXTENSION = 92;
- {$EXTERNALSYM SPI_GETWINDOWSEXTENSION}
- SPI_SETMOUSETRAILS = 93;
- {$EXTERNALSYM SPI_SETMOUSETRAILS}
- SPI_GETMOUSETRAILS = 94;
- {$EXTERNALSYM SPI_GETMOUSETRAILS}
- SPI_SETSCREENSAVERRUNNING = 97;
- {$EXTERNALSYM SPI_SETSCREENSAVERRUNNING}
- SPI_SCREENSAVERRUNNING = SPI_SETSCREENSAVERRUNNING;
- {$EXTERNALSYM SPI_SCREENSAVERRUNNING}
- SPI_GETFILTERKEYS = 50;
- {$EXTERNALSYM SPI_GETFILTERKEYS}
- SPI_SETFILTERKEYS = 51;
- {$EXTERNALSYM SPI_SETFILTERKEYS}
- SPI_GETTOGGLEKEYS = 52;
- {$EXTERNALSYM SPI_GETTOGGLEKEYS}
- SPI_SETTOGGLEKEYS = 53;
- {$EXTERNALSYM SPI_SETTOGGLEKEYS}
- SPI_GETMOUSEKEYS = 54;
- {$EXTERNALSYM SPI_GETMOUSEKEYS}
- SPI_SETMOUSEKEYS = 55;
- {$EXTERNALSYM SPI_SETMOUSEKEYS}
- SPI_GETSHOWSOUNDS = 56;
- {$EXTERNALSYM SPI_GETSHOWSOUNDS}
- SPI_SETSHOWSOUNDS = 57;
- {$EXTERNALSYM SPI_SETSHOWSOUNDS}
- SPI_GETSTICKYKEYS = 58;
- {$EXTERNALSYM SPI_GETSTICKYKEYS}
- SPI_SETSTICKYKEYS = 59;
- {$EXTERNALSYM SPI_SETSTICKYKEYS}
- SPI_GETACCESSTIMEOUT = 60;
- {$EXTERNALSYM SPI_GETACCESSTIMEOUT}
- SPI_SETACCESSTIMEOUT = 61;
- {$EXTERNALSYM SPI_SETACCESSTIMEOUT}
- SPI_GETSERIALKEYS = 62;
- {$EXTERNALSYM SPI_GETSERIALKEYS}
- SPI_SETSERIALKEYS = 63;
- {$EXTERNALSYM SPI_SETSERIALKEYS}
- SPI_GETSOUNDSENTRY = 64;
- {$EXTERNALSYM SPI_GETSOUNDSENTRY}
- SPI_SETSOUNDSENTRY = 65;
- {$EXTERNALSYM SPI_SETSOUNDSENTRY}
- SPI_GETSNAPTODEFBUTTON = 95;
- {$EXTERNALSYM SPI_GETSNAPTODEFBUTTON}
- SPI_SETSNAPTODEFBUTTON = 96;
- {$EXTERNALSYM SPI_SETSNAPTODEFBUTTON}
- SPI_GETMOUSEHOVERWIDTH = 98;
- {$EXTERNALSYM SPI_GETMOUSEHOVERWIDTH}
- SPI_SETMOUSEHOVERWIDTH = 99;
- {$EXTERNALSYM SPI_SETMOUSEHOVERWIDTH}
- SPI_GETMOUSEHOVERHEIGHT = 100;
- {$EXTERNALSYM SPI_GETMOUSEHOVERHEIGHT}
- SPI_SETMOUSEHOVERHEIGHT = 101;
- {$EXTERNALSYM SPI_SETMOUSEHOVERHEIGHT}
- SPI_GETMOUSEHOVERTIME = 102;
- {$EXTERNALSYM SPI_GETMOUSEHOVERTIME}
- SPI_SETMOUSEHOVERTIME = 103;
- {$EXTERNALSYM SPI_SETMOUSEHOVERTIME}
- SPI_GETWHEELSCROLLLINES = 104;
- {$EXTERNALSYM SPI_GETWHEELSCROLLLINES}
- SPI_SETWHEELSCROLLLINES = 105;
- {$EXTERNALSYM SPI_SETWHEELSCROLLLINES}
- SPI_GETMENUSHOWDELAY = 106;
- {$EXTERNALSYM SPI_GETMENUSHOWDELAY}
- SPI_SETMENUSHOWDELAY = 107;
- {$EXTERNALSYM SPI_SETMENUSHOWDELAY}
- SPI_GETSHOWIMEUI = 110;
- {$EXTERNALSYM SPI_GETSHOWIMEUI}
- SPI_SETSHOWIMEUI = 111;
- {$EXTERNALSYM SPI_SETSHOWIMEUI}
- SPI_GETMOUSESPEED = 112;
- {$EXTERNALSYM SPI_GETMOUSESPEED}
- SPI_SETMOUSESPEED = 113;
- {$EXTERNALSYM SPI_SETMOUSESPEED}
- SPI_GETSCREENSAVERRUNNING = 114;
- {$EXTERNALSYM SPI_GETSCREENSAVERRUNNING}
- SPI_GETDESKWALLPAPER = 115;
- {$EXTERNALSYM SPI_GETDESKWALLPAPER}
- SPI_GETACTIVEWINDOWTRACKING = $1000;
- {$EXTERNALSYM SPI_GETACTIVEWINDOWTRACKING}
- SPI_SETACTIVEWINDOWTRACKING = $1001;
- {$EXTERNALSYM SPI_SETACTIVEWINDOWTRACKING}
- SPI_GETMENUANIMATION = $1002;
- {$EXTERNALSYM SPI_GETMENUANIMATION}
- SPI_SETMENUANIMATION = $1003;
- {$EXTERNALSYM SPI_SETMENUANIMATION}
- SPI_GETCOMBOBOXANIMATION = $1004;
- {$EXTERNALSYM SPI_GETCOMBOBOXANIMATION}
- SPI_SETCOMBOBOXANIMATION = $1005;
- {$EXTERNALSYM SPI_SETCOMBOBOXANIMATION}
- SPI_GETLISTBOXSMOOTHSCROLLING = $1006;
- {$EXTERNALSYM SPI_GETLISTBOXSMOOTHSCROLLING}
- SPI_SETLISTBOXSMOOTHSCROLLING = $1007;
- {$EXTERNALSYM SPI_SETLISTBOXSMOOTHSCROLLING}
- SPI_GETGRADIENTCAPTIONS = $1008;
- {$EXTERNALSYM SPI_GETGRADIENTCAPTIONS}
- SPI_SETGRADIENTCAPTIONS = $1009;
- {$EXTERNALSYM SPI_SETGRADIENTCAPTIONS}
- SPI_GETKEYBOARDCUES = $100A;
- {$EXTERNALSYM SPI_GETKEYBOARDCUES}
- SPI_SETKEYBOARDCUES = $100B;
- {$EXTERNALSYM SPI_SETKEYBOARDCUES}
- SPI_GETMENUUNDERLINES = SPI_GETKEYBOARDCUES;
- {$EXTERNALSYM SPI_GETMENUUNDERLINES}
- SPI_SETMENUUNDERLINES = SPI_SETKEYBOARDCUES;
- {$EXTERNALSYM SPI_SETMENUUNDERLINES}
- SPI_GETACTIVEWNDTRKZORDER = $100C;
- {$EXTERNALSYM SPI_GETACTIVEWNDTRKZORDER}
- SPI_SETACTIVEWNDTRKZORDER = $100D;
- {$EXTERNALSYM SPI_SETACTIVEWNDTRKZORDER}
- SPI_GETHOTTRACKING = $100E;
- {$EXTERNALSYM SPI_GETHOTTRACKING}
- SPI_SETHOTTRACKING = $100F;
- {$EXTERNALSYM SPI_SETHOTTRACKING}
- SPI_GETMENUFADE = $1012;
- {$EXTERNALSYM SPI_GETMENUFADE}
- SPI_SETMENUFADE = $1013;
- {$EXTERNALSYM SPI_SETMENUFADE}
- SPI_GETSELECTIONFADE = $1014;
- {$EXTERNALSYM SPI_GETSELECTIONFADE}
- SPI_SETSELECTIONFADE = $1015;
- {$EXTERNALSYM SPI_SETSELECTIONFADE}
- SPI_GETTOOLTIPANIMATION = $1016;
- {$EXTERNALSYM SPI_GETTOOLTIPANIMATION}
- SPI_SETTOOLTIPANIMATION = $1017;
- {$EXTERNALSYM SPI_SETTOOLTIPANIMATION}
- SPI_GETTOOLTIPFADE = $1018;
- {$EXTERNALSYM SPI_GETTOOLTIPFADE}
- SPI_SETTOOLTIPFADE = $1019;
- {$EXTERNALSYM SPI_SETTOOLTIPFADE}
- SPI_GETCURSORSHADOW = $101A;
- {$EXTERNALSYM SPI_GETCURSORSHADOW}
- SPI_SETCURSORSHADOW = $101B;
- {$EXTERNALSYM SPI_SETCURSORSHADOW}
- SPI_GETMOUSESONAR = $101C;
- {$EXTERNALSYM SPI_GETMOUSESONAR}
- SPI_SETMOUSESONAR = $101D;
- {$EXTERNALSYM SPI_SETMOUSESONAR}
- SPI_GETMOUSECLICKLOCK = $101E;
- {$EXTERNALSYM SPI_GETMOUSECLICKLOCK}
- SPI_SETMOUSECLICKLOCK = $101F;
- {$EXTERNALSYM SPI_SETMOUSECLICKLOCK}
- SPI_GETMOUSEVANISH = $1020;
- {$EXTERNALSYM SPI_GETMOUSEVANISH}
- SPI_SETMOUSEVANISH = $1021;
- {$EXTERNALSYM SPI_SETMOUSEVANISH}
- SPI_GETFLATMENU = $1022;
- {$EXTERNALSYM SPI_GETFLATMENU}
- SPI_SETFLATMENU = $1023;
- {$EXTERNALSYM SPI_SETFLATMENU}
- SPI_GETDROPSHADOW = $1024;
- {$EXTERNALSYM SPI_GETDROPSHADOW}
- SPI_SETDROPSHADOW = $1025;
- {$EXTERNALSYM SPI_SETDROPSHADOW}
- SPI_GETBLOCKSENDINPUTRESETS = $1026;
- {$EXTERNALSYM SPI_GETBLOCKSENDINPUTRESETS}
- SPI_SETBLOCKSENDINPUTRESETS = $1027;
- {$EXTERNALSYM SPI_SETBLOCKSENDINPUTRESETS}
- SPI_GETUIEFFECTS = $103E;
- {$EXTERNALSYM SPI_GETUIEFFECTS}
- SPI_SETUIEFFECTS = $103F;
- {$EXTERNALSYM SPI_SETUIEFFECTS}
- SPI_GETFOREGROUNDLOCKTIMEOUT = $2000;
- {$EXTERNALSYM SPI_GETFOREGROUNDLOCKTIMEOUT}
- SPI_SETFOREGROUNDLOCKTIMEOUT = $2001;
- {$EXTERNALSYM SPI_SETFOREGROUNDLOCKTIMEOUT}
- SPI_GETACTIVEWNDTRKTIMEOUT = $2002;
- {$EXTERNALSYM SPI_GETACTIVEWNDTRKTIMEOUT}
- SPI_SETACTIVEWNDTRKTIMEOUT = $2003;
- {$EXTERNALSYM SPI_SETACTIVEWNDTRKTIMEOUT}
- SPI_GETFOREGROUNDFLASHCOUNT = $2004;
- {$EXTERNALSYM SPI_GETFOREGROUNDFLASHCOUNT}
- SPI_SETFOREGROUNDFLASHCOUNT = $2005;
- {$EXTERNALSYM SPI_SETFOREGROUNDFLASHCOUNT}
- SPI_GETCARETWIDTH = $2006;
- {$EXTERNALSYM SPI_GETCARETWIDTH}
- SPI_SETCARETWIDTH = $2007;
- {$EXTERNALSYM SPI_SETCARETWIDTH}
- SPI_GETMOUSECLICKLOCKTIME = $2008;
- {$EXTERNALSYM SPI_GETMOUSECLICKLOCKTIME}
- SPI_SETMOUSECLICKLOCKTIME = $2009;
- {$EXTERNALSYM SPI_SETMOUSECLICKLOCKTIME}
- SPI_GETFONTSMOOTHINGTYPE = $200A;
- {$EXTERNALSYM SPI_GETFONTSMOOTHINGTYPE}
- SPI_SETFONTSMOOTHINGTYPE = $200B;
- {$EXTERNALSYM SPI_SETFONTSMOOTHINGTYPE}
- // constants for SPI_GETFONTSMOOTHINGTYPE and SPI_SETFONTSMOOTHINGTYPE
- FE_FONTSMOOTHINGSTANDARD = $0001;
- {$EXTERNALSYM FE_FONTSMOOTHINGSTANDARD}
- FE_FONTSMOOTHINGCLEARTYPE = $0002;
- {$EXTERNALSYM FE_FONTSMOOTHINGCLEARTYPE}
- FE_FONTSMOOTHINGDOCKING = $8000;
- {$EXTERNALSYM FE_FONTSMOOTHINGDOCKING}
- SPI_GETFONTSMOOTHINGCONTRAST = $200C;
- {$EXTERNALSYM SPI_GETFONTSMOOTHINGCONTRAST}
- SPI_SETFONTSMOOTHINGCONTRAST = $200D;
- {$EXTERNALSYM SPI_SETFONTSMOOTHINGCONTRAST}
- SPI_GETFOCUSBORDERWIDTH = $200E;
- {$EXTERNALSYM SPI_GETFOCUSBORDERWIDTH}
- SPI_SETFOCUSBORDERWIDTH = $200F;
- {$EXTERNALSYM SPI_SETFOCUSBORDERWIDTH}
- SPI_GETFOCUSBORDERHEIGHT = $2010;
- {$EXTERNALSYM SPI_GETFOCUSBORDERHEIGHT}
- SPI_SETFOCUSBORDERHEIGHT = $2011;
- {$EXTERNALSYM SPI_SETFOCUSBORDERHEIGHT}
- SPI_GETFONTSMOOTHINGORIENTATION = $2012;
- {$EXTERNALSYM SPI_GETFONTSMOOTHINGORIENTATION}
- SPI_SETFONTSMOOTHINGORIENTATION = $2013;
- {$EXTERNALSYM SPI_SETFONTSMOOTHINGORIENTATION}
- // constants for SPI_GETFONTSMOOTHINGORIENTATION and SPI_SETFONTSMOOTHINGORIENTATION:
- FE_FONTSMOOTHINGORIENTATIONBGR = $0000;
- {$EXTERNALSYM FE_FONTSMOOTHINGORIENTATIONBGR}
- FE_FONTSMOOTHINGORIENTATIONRGB = $0001;
- {$EXTERNALSYM FE_FONTSMOOTHINGORIENTATIONRGB}
- //
- // Flags
- //
- SPIF_UPDATEINIFILE = $0001;
- {$EXTERNALSYM SPIF_UPDATEINIFILE}
- SPIF_SENDWININICHANGE = $0002;
- {$EXTERNALSYM SPIF_SENDWININICHANGE}
- SPIF_SENDCHANGE = SPIF_SENDWININICHANGE;
- {$EXTERNALSYM SPIF_SENDCHANGE}
- METRICS_USEDEFAULT = DWORD(-1);
- {$EXTERNALSYM METRICS_USEDEFAULT}
- type
- LPNONCLIENTMETRICSA = ^NONCLIENTMETRICSA;
- {$EXTERNALSYM LPNONCLIENTMETRICSA}
- tagNONCLIENTMETRICSA = record
- cbSize: UINT;
- iBorderWidth: Integer;
- iScrollWidth: Integer;
- iScrollHeight: Integer;
- iCaptionWidth: Integer;
- iCaptionHeight: Integer;
- lfCaptionFont: LOGFONTA;
- iSmCaptionWidth: Integer;
- iSmCaptionHeight: Integer;
- lfSmCaptionFont: LOGFONTA;
- iMenuWidth: Integer;
- iMenuHeight: Integer;
- lfMenuFont: LOGFONTA;
- lfStatusFont: LOGFONTA;
- lfMessageFont: LOGFONTA;
- end;
- {$EXTERNALSYM tagNONCLIENTMETRICSA}
- NONCLIENTMETRICSA = tagNONCLIENTMETRICSA;
- {$EXTERNALSYM NONCLIENTMETRICSA}
- TNonClientMetricsA = NONCLIENTMETRICSA;
- PNonClientMetricsA = LPNONCLIENTMETRICSA;
- LPNONCLIENTMETRICSW = ^NONCLIENTMETRICSW;
- {$EXTERNALSYM LPNONCLIENTMETRICSW}
- tagNONCLIENTMETRICSW = record
- cbSize: UINT;
- iBorderWidth: Integer;
- iScrollWidth: Integer;
- iScrollHeight: Integer;
- iCaptionWidth: Integer;
- iCaptionHeight: Integer;
- lfCaptionFont: LOGFONTW;
- iSmCaptionWidth: Integer;
- iSmCaptionHeight: Integer;
- lfSmCaptionFont: LOGFONTW;
- iMenuWidth: Integer;
- iMenuHeight: Integer;
- lfMenuFont: LOGFONTW;
- lfStatusFont: LOGFONTW;
- lfMessageFont: LOGFONTW;
- end;
- {$EXTERNALSYM tagNONCLIENTMETRICSW}
- NONCLIENTMETRICSW = tagNONCLIENTMETRICSW;
- {$EXTERNALSYM NONCLIENTMETRICSW}
- TNonClientMetricsW = NONCLIENTMETRICSW;
- PNonClientMetricsW = LPNONCLIENTMETRICSW;
- {$IFDEF UNICODE}
- NONCLIENTMETRICS = NONCLIENTMETRICSW;
- {$EXTERNALSYM NONCLIENTMETRICS}
- LPNONCLIENTMETRICS = LPNONCLIENTMETRICSW;
- {$EXTERNALSYM LPNONCLIENTMETRICS}
- TNonClientMetrics = TNonClientMetricsW;
- PNonClientMetrics = PNonClientMetricsW;
- {$ELSE}
- NONCLIENTMETRICS = NONCLIENTMETRICSA;
- {$EXTERNALSYM NONCLIENTMETRICS}
- LPNONCLIENTMETRICS = LPNONCLIENTMETRICSA;
- {$EXTERNALSYM LPNONCLIENTMETRICS}
- TNonClientMetrics = TNonClientMetricsA;
- PNonClientMetrics = PNonClientMetricsA;
- {$ENDIF}
- const
- ARW_BOTTOMLEFT = $0000;
- {$EXTERNALSYM ARW_BOTTOMLEFT}
- ARW_BOTTOMRIGHT = $0001;
- {$EXTERNALSYM ARW_BOTTOMRIGHT}
- ARW_TOPLEFT = $0002;
- {$EXTERNALSYM ARW_TOPLEFT}
- ARW_TOPRIGHT = $0003;
- {$EXTERNALSYM ARW_TOPRIGHT}
- ARW_STARTMASK = $0003;
- {$EXTERNALSYM ARW_STARTMASK}
- ARW_STARTRIGHT = $0001;
- {$EXTERNALSYM ARW_STARTRIGHT}
- ARW_STARTTOP = $0002;
- {$EXTERNALSYM ARW_STARTTOP}
- ARW_LEFT = $0000;
- {$EXTERNALSYM ARW_LEFT}
- ARW_RIGHT = $0000;
- {$EXTERNALSYM ARW_RIGHT}
- ARW_UP = $0004;
- {$EXTERNALSYM ARW_UP}
- ARW_DOWN = $0004;
- {$EXTERNALSYM ARW_DOWN}
- ARW_HIDE = $0008;
- {$EXTERNALSYM ARW_HIDE}
- type
- LPMINIMIZEDMETRICS = ^MINIMIZEDMETRICS;
- {$EXTERNALSYM LPMINIMIZEDMETRICS}
- tagMINIMIZEDMETRICS = record
- cbSize: UINT;
- iWidth: Integer;
- iHorzGap: Integer;
- iVertGap: Integer;
- iArrange: Integer;
- end;
- {$EXTERNALSYM tagMINIMIZEDMETRICS}
- MINIMIZEDMETRICS = tagMINIMIZEDMETRICS;
- {$EXTERNALSYM MINIMIZEDMETRICS}
- TMinimizedMetrics = MINIMIZEDMETRICS;
- PMinimizedMetrics = LPMINIMIZEDMETRICS;
- LPICONMETRICSA = ^ICONMETRICSA;
- {$EXTERNALSYM LPICONMETRICSA}
- tagICONMETRICSA = record
- cbSize: UINT;
- iHorzSpacing: Integer;
- iVertSpacing: Integer;
- iTitleWrap: Integer;
- lfFont: LOGFONTA;
- end;
- {$EXTERNALSYM tagICONMETRICSA}
- ICONMETRICSA = tagICONMETRICSA;
- {$EXTERNALSYM ICONMETRICSA}
- TIconMetricsA = ICONMETRICSA;
- PIconMetricsA = LPICONMETRICSA;
- LPICONMETRICSW = ^ICONMETRICSW;
- {$EXTERNALSYM LPICONMETRICSW}
- tagICONMETRICSW = record
- cbSize: UINT;
- iHorzSpacing: Integer;
- iVertSpacing: Integer;
- iTitleWrap: Integer;
- lfFont: LOGFONTW;
- end;
- {$EXTERNALSYM tagICONMETRICSW}
- ICONMETRICSW = tagICONMETRICSW;
- {$EXTERNALSYM ICONMETRICSW}
- TIconMetricsW = ICONMETRICSW;
- PIconMetricsW = LPICONMETRICSW;
- {$IFDEF UNICODE}
- ICONMETRICS = ICONMETRICSW;
- {$EXTERNALSYM ICONMETRICS}
- LPICONMETRICS = LPICONMETRICSW;
- {$EXTERNALSYM LPICONMETRICS}
- TIconMetrics = TIconMetricsW;
- PIconMetrics = PIconMetricsW;
- {$ELSE}
- ICONMETRICS = ICONMETRICSA;
- {$EXTERNALSYM ICONMETRICS}
- LPICONMETRICS = LPICONMETRICSA;
- {$EXTERNALSYM LPICONMETRICS}
- TIconMetrics = TIconMetricsA;
- PIconMetrics = PIconMetricsA;
- {$ENDIF}
- LPANIMATIONINFO = ^ANIMATIONINFO;
- {$EXTERNALSYM LPANIMATIONINFO}
- tagANIMATIONINFO = record
- cbSize: UINT;
- iMinAnimate: Integer;
- end;
- {$EXTERNALSYM tagANIMATIONINFO}
- ANIMATIONINFO = tagANIMATIONINFO;
- {$EXTERNALSYM ANIMATIONINFO}
- TAnimationInfo = ANIMATIONINFO;
- PAnimationInfo = LPANIMATIONINFO;
- LPSERIALKEYSA = ^SERIALKEYSA;
- {$EXTERNALSYM LPSERIALKEYSA}
- tagSERIALKEYSA = record
- cbSize: UINT;
- dwFlags: DWORD;
- lpszActivePort: LPSTR;
- lpszPort: LPSTR;
- iBaudRate: UINT;
- iPortState: UINT;
- iActive: UINT;
- end;
- {$EXTERNALSYM tagSERIALKEYSA}
- SERIALKEYSA = tagSERIALKEYSA;
- {$EXTERNALSYM SERIALKEYSA}
- TSerialKeysA = SERIALKEYSA;
- PSerialKeysA = LPSERIALKEYSA;
- LPSERIALKEYSW = ^SERIALKEYSW;
- {$EXTERNALSYM LPSERIALKEYSW}
- tagSERIALKEYSW = record
- cbSize: UINT;
- dwFlags: DWORD;
- lpszActivePort: LPWSTR;
- lpszPort: LPWSTR;
- iBaudRate: UINT;
- iPortState: UINT;
- iActive: UINT;
- end;
- {$EXTERNALSYM tagSERIALKEYSW}
- SERIALKEYSW = tagSERIALKEYSW;
- {$EXTERNALSYM SERIALKEYSW}
- TSerialKeysW = SERIALKEYSW;
- PSerialKeysW = LPSERIALKEYSW;
- {$IFDEF UNICODE}
- SERIALKEYS = SERIALKEYSW;
- {$EXTERNALSYM SERIALKEYS}
- LPSERIALKEYS = LPSERIALKEYSW;
- {$EXTERNALSYM LPSERIALKEYS}
- TSerialKeys = TSerialKeysW;
- PSerialKeys = PSerialKeysW;
- {$ELSE}
- SERIALKEYS = SERIALKEYSA;
- {$EXTERNALSYM SERIALKEYS}
- LPSERIALKEYS = LPSERIALKEYSA;
- {$EXTERNALSYM LPSERIALKEYS}
- TSerialKeys = TSerialKeysA;
- PSerialKeys = PSerialKeysA;
- {$ENDIF}
- // flags for SERIALKEYS dwFlags field//
- const
- SERKF_SERIALKEYSON = $00000001;
- {$EXTERNALSYM SERKF_SERIALKEYSON}
- SERKF_AVAILABLE = $00000002;
- {$EXTERNALSYM SERKF_AVAILABLE}
- SERKF_INDICATOR = $00000004;
- {$EXTERNALSYM SERKF_INDICATOR}
- type
- LPHIGHCONTRASTA = ^HIGHCONTRASTA;
- {$EXTERNALSYM LPHIGHCONTRASTA}
- tagHIGHCONTRASTA = record
- cbSize: UINT;
- dwFlags: DWORD;
- lpszDefaultScheme: LPSTR;
- end;
- {$EXTERNALSYM tagHIGHCONTRASTA}
- HIGHCONTRASTA = tagHIGHCONTRASTA;
- {$EXTERNALSYM HIGHCONTRASTA}
- THighContrastA = HIGHCONTRASTA;
- PHighContrastA = LPHIGHCONTRASTA;
- LPHIGHCONTRASTW = ^HIGHCONTRASTW;
- {$EXTERNALSYM LPHIGHCONTRASTW}
- tagHIGHCONTRASTW = record
- cbSize: UINT;
- dwFlags: DWORD;
- lpszDefaultScheme: LPWSTR;
- end;
- {$EXTERNALSYM tagHIGHCONTRASTW}
- HIGHCONTRASTW = tagHIGHCONTRASTW;
- {$EXTERNALSYM HIGHCONTRASTW}
- THighContrastW = HIGHCONTRASTW;
- PHighContrastW = LPHIGHCONTRASTW;
- {$IFDEF UNICODE}
- HIGHCONTRAST = HIGHCONTRASTW;
- {$EXTERNALSYM HIGHCONTRAST}
- LPHIGHCONTRAST = LPHIGHCONTRASTW;
- {$EXTERNALSYM LPHIGHCONTRAST}
- THighContrast = THighContrastW;
- PHighContrast = PHighContrastW;
- {$ELSE}
- HIGHCONTRAST = HIGHCONTRASTA;
- {$EXTERNALSYM HIGHCONTRAST}
- LPHIGHCONTRAST = LPHIGHCONTRASTA;
- {$EXTERNALSYM LPHIGHCONTRAST}
- THighContrast = THighContrastA;
- PHighContrast = PHighContrastA;
- {$ENDIF}
- // flags for HIGHCONTRAST dwFlags field//
- const
- HCF_HIGHCONTRASTON = $00000001;
- {$EXTERNALSYM HCF_HIGHCONTRASTON}
- HCF_AVAILABLE = $00000002;
- {$EXTERNALSYM HCF_AVAILABLE}
- HCF_HOTKEYACTIVE = $00000004;
- {$EXTERNALSYM HCF_HOTKEYACTIVE}
- HCF_CONFIRMHOTKEY = $00000008;
- {$EXTERNALSYM HCF_CONFIRMHOTKEY}
- HCF_HOTKEYSOUND = $00000010;
- {$EXTERNALSYM HCF_HOTKEYSOUND}
- HCF_INDICATOR = $00000020;
- {$EXTERNALSYM HCF_INDICATOR}
- HCF_HOTKEYAVAILABLE = $00000040;
- {$EXTERNALSYM HCF_HOTKEYAVAILABLE}
- // Flags for ChangeDisplaySettings//
- CDS_UPDATEREGISTRY = $00000001;
- {$EXTERNALSYM CDS_UPDATEREGISTRY}
- CDS_TEST = $00000002;
- {$EXTERNALSYM CDS_TEST}
- CDS_FULLSCREEN = $00000004;
- {$EXTERNALSYM CDS_FULLSCREEN}
- CDS_GLOBAL = $00000008;
- {$EXTERNALSYM CDS_GLOBAL}
- CDS_SET_PRIMARY = $00000010;
- {$EXTERNALSYM CDS_SET_PRIMARY}
- CDS_VIDEOPARAMETERS = $00000020;
- {$EXTERNALSYM CDS_VIDEOPARAMETERS}
- CDS_RESET = $40000000;
- {$EXTERNALSYM CDS_RESET}
- CDS_NORESET = $10000000;
- {$EXTERNALSYM CDS_NORESET}
- // #include <tvout.h>
- // Return values for ChangeDisplaySettings
- DISP_CHANGE_SUCCESSFUL = 0;
- {$EXTERNALSYM DISP_CHANGE_SUCCESSFUL}
- DISP_CHANGE_RESTART = 1;
- {$EXTERNALSYM DISP_CHANGE_RESTART}
- DISP_CHANGE_FAILED = DWORD(-1);
- {$EXTERNALSYM DISP_CHANGE_FAILED}
- DISP_CHANGE_BADMODE = DWORD(-2);
- {$EXTERNALSYM DISP_CHANGE_BADMODE}
- DISP_CHANGE_NOTUPDATED = DWORD(-3);
- {$EXTERNALSYM DISP_CHANGE_NOTUPDATED}
- DISP_CHANGE_BADFLAGS = DWORD(-4);
- {$EXTERNALSYM DISP_CHANGE_BADFLAGS}
- DISP_CHANGE_BADPARAM = DWORD(-5);
- {$EXTERNALSYM DISP_CHANGE_BADPARAM}
- DISP_CHANGE_BADDUALVIEW = DWORD(-6);
- {$EXTERNALSYM DISP_CHANGE_BADDUALVIEW}
- function ChangeDisplaySettingsA(lpDevMode: LPDEVMODEA; dwFlags: DWORD): LONG; stdcall;
- {$EXTERNALSYM ChangeDisplaySettingsA}
- function ChangeDisplaySettingsW(lpDevMode: LPDEVMODEW; dwFlags: DWORD): LONG; stdcall;
- {$EXTERNALSYM ChangeDisplaySettingsW}
- {$IFDEF UNICODE}
- function ChangeDisplaySettings(lpDevMode: LPDEVMODEW; dwFlags: DWORD): LONG; stdcall;
- {$EXTERNALSYM ChangeDisplaySettings}
- {$ELSE}
- function ChangeDisplaySettings(lpDevMode: LPDEVMODEA; dwFlags: DWORD): LONG; stdcall;
- {$EXTERNALSYM ChangeDisplaySettings}
- {$ENDIF}
- function ChangeDisplaySettingsExA(lpszDeviceName: LPCSTR; lpDevMode: LPDEVMODEA;
- hwnd: HWND; dwflags: DWORD; lParam: LPVOID): LONG; stdcall;
- {$EXTERNALSYM ChangeDisplaySettingsExA}
- function ChangeDisplaySettingsExW(lpszDeviceName: LPCWSTR; lpDevMode: LPDEVMODEW;
- hwnd: HWND; dwflags: DWORD; lParam: LPVOID): LONG; stdcall;
- {$EXTERNALSYM ChangeDisplaySettingsExW}
- {$IFDEF UNICODE}
- function ChangeDisplaySettingsEx(lpszDeviceName: LPCWSTR; lpDevMode: LPDEVMODEW;
- hwnd: HWND; dwflags: DWORD; lParam: LPVOID): LONG; stdcall;
- {$EXTERNALSYM ChangeDisplaySettingsEx}
- {$ELSE}
- function ChangeDisplaySettingsEx(lpszDeviceName: LPCSTR; lpDevMode: LPDEVMODEA;
- hwnd: HWND; dwflags: DWORD; lParam: LPVOID): LONG; stdcall;
- {$EXTERNALSYM ChangeDisplaySettingsEx}
- {$ENDIF}
- const
- ENUM_CURRENT_SETTINGS = DWORD(-1);
- {$EXTERNALSYM ENUM_CURRENT_SETTINGS}
- ENUM_REGISTRY_SETTINGS = DWORD(-2);
- {$EXTERNALSYM ENUM_REGISTRY_SETTINGS}
- function EnumDisplaySettingsA(lpszDeviceName: LPCSTR; iModeNum: DWORD;
- var lpDevMode: DEVMODEA): BOOL; stdcall;
- {$EXTERNALSYM EnumDisplaySettingsA}
- function EnumDisplaySettingsW(lpszDeviceName: LPCWSTR; iModeNum: DWORD;
- var lpDevMode: DEVMODEW): BOOL; stdcall;
- {$EXTERNALSYM EnumDisplaySettingsW}
- {$IFDEF UNICODE}
- function EnumDisplaySettings(lpszDeviceName: LPCWSTR; iModeNum: DWORD;
- var lpDevMode: DEVMODEW): BOOL; stdcall;
- {$EXTERNALSYM EnumDisplaySettings}
- {$ELSE}
- function EnumDisplaySettings(lpszDeviceName: LPCSTR; iModeNum: DWORD;
- var lpDevMode: DEVMODEA): BOOL; stdcall;
- {$EXTERNALSYM EnumDisplaySettings}
- {$ENDIF}
- function EnumDisplaySettingsExA(lpszDeviceName: LPCSTR; iModeNum: DWORD;
- var lpDevMode: DEVMODEA; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM EnumDisplaySettingsExA}
- function EnumDisplaySettingsExW(lpszDeviceName: LPCWSTR; iModeNum: DWORD;
- var lpDevMode: DEVMODEW; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM EnumDisplaySettingsExW}
- {$IFDEF UNICODE}
- function EnumDisplaySettingsEx(lpszDeviceName: LPCWSTR; iModeNum: DWORD;
- var lpDevMode: DEVMODEW; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM EnumDisplaySettingsEx}
- {$ELSE}
- function EnumDisplaySettingsEx(lpszDeviceName: LPCSTR; iModeNum: DWORD;
- var lpDevMode: DEVMODEA; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM EnumDisplaySettingsEx}
- {$ENDIF}
- // Flags for EnumDisplaySettingsEx//
- const
- EDS_RAWMODE = $00000002;
- {$EXTERNALSYM EDS_RAWMODE}
- function EnumDisplayDevicesA(lpDevice: LPCSTR; iDevNum: DWORD;
- var lpDisplayDevice: DISPLAY_DEVICEA; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM EnumDisplayDevicesA}
- function EnumDisplayDevicesW(lpDevice: LPCWSTR; iDevNum: DWORD;
- var lpDisplayDevice: DISPLAY_DEVICEW; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM EnumDisplayDevicesW}
- {$IFDEF UNICODE}
- function EnumDisplayDevices(lpDevice: LPCWSTR; iDevNum: DWORD;
- var lpDisplayDevice: DISPLAY_DEVICEW; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM EnumDisplayDevices}
- {$ELSE}
- function EnumDisplayDevices(lpDevice: LPCSTR; iDevNum: DWORD;
- var lpDisplayDevice: DISPLAY_DEVICEA; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM EnumDisplayDevices}
- {$ENDIF}
- function SystemParametersInfoA(uiAction: UINT; uiParam: UINT;
- pvParam: PVOID; fWinIni: UINT): BOOL; stdcall;
- {$EXTERNALSYM SystemParametersInfoA}
- function SystemParametersInfoW(uiAction: UINT; uiParam: UINT;
- pvParam: PVOID; fWinIni: UINT): BOOL; stdcall;
- {$EXTERNALSYM SystemParametersInfoW}
- {$IFDEF UNICODE}
- function SystemParametersInfo(uiAction: UINT; uiParam: UINT;
- pvParam: PVOID; fWinIni: UINT): BOOL; stdcall;
- {$EXTERNALSYM SystemParametersInfo}
- {$ELSE}
- function SystemParametersInfo(uiAction: UINT; uiParam: UINT;
- pvParam: PVOID; fWinIni: UINT): BOOL; stdcall;
- {$EXTERNALSYM SystemParametersInfo}
- {$ENDIF}
- //
- // Accessibility support
- //
- type
- LPFILTERKEYS = ^FILTERKEYS;
- {$EXTERNALSYM LPFILTERKEYS}
- tagFILTERKEYS = record
- cbSize: UINT;
- dwFlags: DWORD;
- iWaitMSec: DWORD; // Acceptance Delay
- iDelayMSec: DWORD; // Delay Until Repeat
- iRepeatMSec: DWORD; // Repeat Rate
- iBounceMSec: DWORD; // Debounce Time
- end;
- {$EXTERNALSYM tagFILTERKEYS}
- FILTERKEYS = tagFILTERKEYS;
- {$EXTERNALSYM FILTERKEYS}
- TFilterKeys = FILTERKEYS;
- PFilterKeys = LPFILTERKEYS;
- //
- // FILTERKEYS dwFlags field
- //
- const
- FKF_FILTERKEYSON = $00000001;
- {$EXTERNALSYM FKF_FILTERKEYSON}
- FKF_AVAILABLE = $00000002;
- {$EXTERNALSYM FKF_AVAILABLE}
- FKF_HOTKEYACTIVE = $00000004;
- {$EXTERNALSYM FKF_HOTKEYACTIVE}
- FKF_CONFIRMHOTKEY = $00000008;
- {$EXTERNALSYM FKF_CONFIRMHOTKEY}
- FKF_HOTKEYSOUND = $00000010;
- {$EXTERNALSYM FKF_HOTKEYSOUND}
- FKF_INDICATOR = $00000020;
- {$EXTERNALSYM FKF_INDICATOR}
- FKF_CLICKON = $00000040;
- {$EXTERNALSYM FKF_CLICKON}
- type
- LPSTICKYKEYS = ^STICKYKEYS;
- {$EXTERNALSYM LPSTICKYKEYS}
- tagSTICKYKEYS = record
- cbSize: UINT;
- dwFlags: DWORD;
- end;
- {$EXTERNALSYM tagSTICKYKEYS}
- STICKYKEYS = tagSTICKYKEYS;
- {$EXTERNALSYM STICKYKEYS}
- TStickyKeys = STICKYKEYS;
- PStickyKeys = LPSTICKYKEYS;
- //
- // STICKYKEYS dwFlags field
- //
- const
- SKF_STICKYKEYSON = $00000001;
- {$EXTERNALSYM SKF_STICKYKEYSON}
- SKF_AVAILABLE = $00000002;
- {$EXTERNALSYM SKF_AVAILABLE}
- SKF_HOTKEYACTIVE = $00000004;
- {$EXTERNALSYM SKF_HOTKEYACTIVE}
- SKF_CONFIRMHOTKEY = $00000008;
- {$EXTERNALSYM SKF_CONFIRMHOTKEY}
- SKF_HOTKEYSOUND = $00000010;
- {$EXTERNALSYM SKF_HOTKEYSOUND}
- SKF_INDICATOR = $00000020;
- {$EXTERNALSYM SKF_INDICATOR}
- SKF_AUDIBLEFEEDBACK = $00000040;
- {$EXTERNALSYM SKF_AUDIBLEFEEDBACK}
- SKF_TRISTATE = $00000080;
- {$EXTERNALSYM SKF_TRISTATE}
- SKF_TWOKEYSOFF = $00000100;
- {$EXTERNALSYM SKF_TWOKEYSOFF}
- SKF_LALTLATCHED = $10000000;
- {$EXTERNALSYM SKF_LALTLATCHED}
- SKF_LCTLLATCHED = $04000000;
- {$EXTERNALSYM SKF_LCTLLATCHED}
- SKF_LSHIFTLATCHED = $01000000;
- {$EXTERNALSYM SKF_LSHIFTLATCHED}
- SKF_RALTLATCHED = $20000000;
- {$EXTERNALSYM SKF_RALTLATCHED}
- SKF_RCTLLATCHED = $08000000;
- {$EXTERNALSYM SKF_RCTLLATCHED}
- SKF_RSHIFTLATCHED = $02000000;
- {$EXTERNALSYM SKF_RSHIFTLATCHED}
- SKF_LWINLATCHED = $40000000;
- {$EXTERNALSYM SKF_LWINLATCHED}
- SKF_RWINLATCHED = $80000000;
- {$EXTERNALSYM SKF_RWINLATCHED}
- SKF_LALTLOCKED = $00100000;
- {$EXTERNALSYM SKF_LALTLOCKED}
- SKF_LCTLLOCKED = $00040000;
- {$EXTERNALSYM SKF_LCTLLOCKED}
- SKF_LSHIFTLOCKED = $00010000;
- {$EXTERNALSYM SKF_LSHIFTLOCKED}
- SKF_RALTLOCKED = $00200000;
- {$EXTERNALSYM SKF_RALTLOCKED}
- SKF_RCTLLOCKED = $00080000;
- {$EXTERNALSYM SKF_RCTLLOCKED}
- SKF_RSHIFTLOCKED = $00020000;
- {$EXTERNALSYM SKF_RSHIFTLOCKED}
- SKF_LWINLOCKED = $00400000;
- {$EXTERNALSYM SKF_LWINLOCKED}
- SKF_RWINLOCKED = $00800000;
- {$EXTERNALSYM SKF_RWINLOCKED}
- type
- LPMOUSEKEYS = ^MOUSEKEYS;
- {$EXTERNALSYM LPMOUSEKEYS}
- tagMOUSEKEYS = record
- cbSize: UINT;
- dwFlags: DWORD;
- iMaxSpeed: DWORD;
- iTimeToMaxSpeed: DWORD;
- iCtrlSpeed: DWORD;
- dwReserved1: DWORD;
- dwReserved2: DWORD;
- end;
- {$EXTERNALSYM tagMOUSEKEYS}
- MOUSEKEYS = tagMOUSEKEYS;
- {$EXTERNALSYM MOUSEKEYS}
- TMouseKeys = MOUSEKEYS;
- PMouseKeys = LPMOUSEKEYS;
- //
- // MOUSEKEYS dwFlags field
- //
- const
- MKF_MOUSEKEYSON = $00000001;
- {$EXTERNALSYM MKF_MOUSEKEYSON}
- MKF_AVAILABLE = $00000002;
- {$EXTERNALSYM MKF_AVAILABLE}
- MKF_HOTKEYACTIVE = $00000004;
- {$EXTERNALSYM MKF_HOTKEYACTIVE}
- MKF_CONFIRMHOTKEY = $00000008;
- {$EXTERNALSYM MKF_CONFIRMHOTKEY}
- MKF_HOTKEYSOUND = $00000010;
- {$EXTERNALSYM MKF_HOTKEYSOUND}
- MKF_INDICATOR = $00000020;
- {$EXTERNALSYM MKF_INDICATOR}
- MKF_MODIFIERS = $00000040;
- {$EXTERNALSYM MKF_MODIFIERS}
- MKF_REPLACENUMBERS = $00000080;
- {$EXTERNALSYM MKF_REPLACENUMBERS}
- MKF_LEFTBUTTONSEL = $10000000;
- {$EXTERNALSYM MKF_LEFTBUTTONSEL}
- MKF_RIGHTBUTTONSEL = $20000000;
- {$EXTERNALSYM MKF_RIGHTBUTTONSEL}
- MKF_LEFTBUTTONDOWN = $01000000;
- {$EXTERNALSYM MKF_LEFTBUTTONDOWN}
- MKF_RIGHTBUTTONDOWN = $02000000;
- {$EXTERNALSYM MKF_RIGHTBUTTONDOWN}
- MKF_MOUSEMODE = $80000000;
- {$EXTERNALSYM MKF_MOUSEMODE}
- type
- LPACCESSTIMEOUT = ^ACCESSTIMEOUT;
- {$EXTERNALSYM LPACCESSTIMEOUT}
- tagACCESSTIMEOUT = record
- cbSize: UINT;
- dwFlags: DWORD;
- iTimeOutMSec: DWORD;
- end;
- {$EXTERNALSYM tagACCESSTIMEOUT}
- ACCESSTIMEOUT = tagACCESSTIMEOUT;
- {$EXTERNALSYM ACCESSTIMEOUT}
- TAccessTimeout = ACCESSTIMEOUT;
- PAccessTimeout = LPACCESSTIMEOUT;
- //
- // ACCESSTIMEOUT dwFlags field
- //
- const
- ATF_TIMEOUTON = $00000001;
- {$EXTERNALSYM ATF_TIMEOUTON}
- ATF_ONOFFFEEDBACK = $00000002;
- {$EXTERNALSYM ATF_ONOFFFEEDBACK}
- // values for SOUNDSENTRY iFSGrafEffect field//
- SSGF_NONE = 0;
- {$EXTERNALSYM SSGF_NONE}
- SSGF_DISPLAY = 3;
- {$EXTERNALSYM SSGF_DISPLAY}
- // values for SOUNDSENTRY iFSTextEffect field//
- SSTF_NONE = 0;
- {$EXTERNALSYM SSTF_NONE}
- SSTF_CHARS = 1;
- {$EXTERNALSYM SSTF_CHARS}
- SSTF_BORDER = 2;
- {$EXTERNALSYM SSTF_BORDER}
- SSTF_DISPLAY = 3;
- {$EXTERNALSYM SSTF_DISPLAY}
- // values for SOUNDSENTRY iWindowsEffect field//
- SSWF_NONE = 0;
- {$EXTERNALSYM SSWF_NONE}
- SSWF_TITLE = 1;
- {$EXTERNALSYM SSWF_TITLE}
- SSWF_WINDOW = 2;
- {$EXTERNALSYM SSWF_WINDOW}
- SSWF_DISPLAY = 3;
- {$EXTERNALSYM SSWF_DISPLAY}
- SSWF_CUSTOM = 4;
- {$EXTERNALSYM SSWF_CUSTOM}
- type
- LPSOUNDSENTRYA = ^SOUNDSENTRYA;
- {$EXTERNALSYM LPSOUNDSENTRYA}
- tagSOUNDSENTRYA = record
- cbSize: UINT;
- dwFlags: DWORD;
- iFSTextEffect: DWORD;
- iFSTextEffectMSec: DWORD;
- iFSTextEffectColorBits: DWORD;
- iFSGrafEffect: DWORD;
- iFSGrafEffectMSec: DWORD;
- iFSGrafEffectColor: DWORD;
- iWindowsEffect: DWORD;
- iWindowsEffectMSec: DWORD;
- lpszWindowsEffectDLL: LPSTR;
- iWindowsEffectOrdinal: DWORD;
- end;
- {$EXTERNALSYM tagSOUNDSENTRYA}
- SOUNDSENTRYA = tagSOUNDSENTRYA;
- {$EXTERNALSYM SOUNDSENTRYA}
- TSoundsEntryA = SOUNDSENTRYA;
- PSoundsEntryA = LPSOUNDSENTRYA;
- LPSOUNDSENTRYW = ^SOUNDSENTRYW;
- {$EXTERNALSYM LPSOUNDSENTRYW}
- tagSOUNDSENTRYW = record
- cbSize: UINT;
- dwFlags: DWORD;
- iFSTextEffect: DWORD;
- iFSTextEffectMSec: DWORD;
- iFSTextEffectColorBits: DWORD;
- iFSGrafEffect: DWORD;
- iFSGrafEffectMSec: DWORD;
- iFSGrafEffectColor: DWORD;
- iWindowsEffect: DWORD;
- iWindowsEffectMSec: DWORD;
- lpszWindowsEffectDLL: LPWSTR;
- iWindowsEffectOrdinal: DWORD;
- end;
- {$EXTERNALSYM tagSOUNDSENTRYW}
- SOUNDSENTRYW = tagSOUNDSENTRYW;
- {$EXTERNALSYM SOUNDSENTRYW}
- TSoundsEntryW = SOUNDSENTRYW;
- PSoundsEntryW = LPSOUNDSENTRYW;
- {$IFDEF UNICODE}
- SOUNDSENTRY = SOUNDSENTRYW;
- {$EXTERNALSYM SOUNDSENTRY}
- LPSOUNDSENTRY = LPSOUNDSENTRYW;
- {$EXTERNALSYM LPSOUNDSENTRY}
- TSoundsEntry = TSoundsEntryW;
- PSoundsEntry = PSoundsEntryW;
- {$ELSE}
- SOUNDSENTRY = SOUNDSENTRYA;
- {$EXTERNALSYM SOUNDSENTRY}
- LPSOUNDSENTRY = LPSOUNDSENTRYA;
- {$EXTERNALSYM LPSOUNDSENTRY}
- TSoundsEntry = TSoundsEntryA;
- PSoundsEntry = PSoundsEntryA;
- {$ENDIF}
- //
- // SOUNDSENTRY dwFlags field
- //
- const
- SSF_SOUNDSENTRYON = $00000001;
- {$EXTERNALSYM SSF_SOUNDSENTRYON}
- SSF_AVAILABLE = $00000002;
- {$EXTERNALSYM SSF_AVAILABLE}
- SSF_INDICATOR = $00000004;
- {$EXTERNALSYM SSF_INDICATOR}
- type
- LPTOGGLEKEYS = ^TOGGLEKEYS;
- {$EXTERNALSYM LPTOGGLEKEYS}
- tagTOGGLEKEYS = record
- cbSize: UINT;
- dwFlags: DWORD;
- end;
- {$EXTERNALSYM tagTOGGLEKEYS}
- TOGGLEKEYS = tagTOGGLEKEYS;
- {$EXTERNALSYM TOGGLEKEYS}
- TToggleKeys = TOGGLEKEYS;
- PToggleKeys = LPTOGGLEKEYS;
- //
- // TOGGLEKEYS dwFlags field
- //
- const
- TKF_TOGGLEKEYSON = $00000001;
- {$EXTERNALSYM TKF_TOGGLEKEYSON}
- TKF_AVAILABLE = $00000002;
- {$EXTERNALSYM TKF_AVAILABLE}
- TKF_HOTKEYACTIVE = $00000004;
- {$EXTERNALSYM TKF_HOTKEYACTIVE}
- TKF_CONFIRMHOTKEY = $00000008;
- {$EXTERNALSYM TKF_CONFIRMHOTKEY}
- TKF_HOTKEYSOUND = $00000010;
- {$EXTERNALSYM TKF_HOTKEYSOUND}
- TKF_INDICATOR = $00000020;
- {$EXTERNALSYM TKF_INDICATOR}
- //
- // Set debug level
- //
- procedure SetDebugErrorLevel(dwLevel: DWORD); stdcall;
- {$EXTERNALSYM SetDebugErrorLevel}
- //
- // SetLastErrorEx() types.
- //
- const
- SLE_ERROR = $00000001;
- {$EXTERNALSYM SLE_ERROR}
- SLE_MINORERROR = $00000002;
- {$EXTERNALSYM SLE_MINORERROR}
- SLE_WARNING = $00000003;
- {$EXTERNALSYM SLE_WARNING}
- procedure SetLastErrorEx(dwErrCode, dwType: DWORD); stdcall;
- {$EXTERNALSYM SetLastErrorEx}
- function InternalGetWindowText(hWnd: HWND; lpString: LPWSTR; nMaxCount: Integer): Integer; stdcall;
- {$EXTERNALSYM InternalGetWindowText}
- function EndTask(hWnd: HWND; fShutDown, fForce: BOOL): BOOL; stdcall;
- {$EXTERNALSYM EndTask}
- //
- // Multimonitor API.
- //
- const
- MONITOR_DEFAULTTONULL = $00000000;
- {$EXTERNALSYM MONITOR_DEFAULTTONULL}
- MONITOR_DEFAULTTOPRIMARY = $00000001;
- {$EXTERNALSYM MONITOR_DEFAULTTOPRIMARY}
- MONITOR_DEFAULTTONEAREST = $00000002;
- {$EXTERNALSYM MONITOR_DEFAULTTONEAREST}
- function MonitorFromPoint(pt: POINT; dwFlags: DWORD): HMONITOR; stdcall;
- {$EXTERNALSYM MonitorFromPoint}
- function MonitorFromRect(const lprc: RECT; dwFlags: DWORD): HMONITOR; stdcall;
- {$EXTERNALSYM MonitorFromRect}
- function MonitorFromWindow(hwnd: HWND; dwFlags: DWORD): HMONITOR; stdcall;
- {$EXTERNALSYM MonitorFromWindow}
- const
- MONITORINFOF_PRIMARY = $00000001;
- {$EXTERNALSYM MONITORINFOF_PRIMARY}
- CCHDEVICENAME = 32;
- {$EXTERNALSYM CCHDEVICENAME}
- type
- LPMONITORINFO = ^MONITORINFO;
- {$EXTERNALSYM LPMONITORINFO}
- tagMONITORINFO = record
- cbSize: DWORD;
- rcMonitor: RECT;
- rcWork: RECT;
- dwFlags: DWORD;
- end;
- {$EXTERNALSYM tagMONITORINFO}
- MONITORINFO = tagMONITORINFO;
- {$EXTERNALSYM MONITORINFO}
- TMonitorInfo = MONITORINFO;
- PMonitorInfo = LPMONITORINFO;
- LPMONITORINFOEXA = ^MONITORINFOEXA;
- {$EXTERNALSYM LPMONITORINFOEXA}
- tagMONITORINFOEXA = record
- MonitorInfo: MONITORINFO;
- szDevice: array [0..CCHDEVICENAME - 1] of CHAR;
- end;
- {$EXTERNALSYM tagMONITORINFOEXA}
- MONITORINFOEXA = tagMONITORINFOEXA;
- {$EXTERNALSYM MONITORINFOEXA}
- TMonitorinfoexa = MONITORINFOEXA;
- PMonitorInfoExA = LPMONITORINFOEXA;
- LPMONITORINFOEXW = ^MONITORINFOEXW;
- {$EXTERNALSYM LPMONITORINFOEXW}
- tagMONITORINFOEXW = record
- MonitorInfo: MONITORINFO;
- szDevice: array [0..CCHDEVICENAME - 1] of WCHAR;
- end;
- {$EXTERNALSYM tagMONITORINFOEXW}
- MONITORINFOEXW = tagMONITORINFOEXW;
- {$EXTERNALSYM MONITORINFOEXW}
- TMonitorInfoExW = MONITORINFOEXW;
- PMonitorInfoExW = LPMONITORINFOEXW;
- {$IFDEF UNICODE}
- MONITORINFOEX = MONITORINFOEXW;
- {$EXTERNALSYM MONITORINFOEX}
- LPMONITORINFOEX = LPMONITORINFOEXW;
- {$EXTERNALSYM LPMONITORINFOEX}
- TMonitorInfoEx = TMonitorInfoExW;
- PMonitorInfoEx = PMonitorInfoExW;
- {$ELSE}
- MONITORINFOEX = MONITORINFOEXA;
- {$EXTERNALSYM MONITORINFOEX}
- LPMONITORINFOEX = LPMONITORINFOEXA;
- {$EXTERNALSYM LPMONITORINFOEX}
- TMonitorInfoEx = TMonitorInfoExA;
- PMonitorInfoEx = PMonitorInfoExA;
- {$ENDIF}
- function GetMonitorInfoA(hMonitor: HMONITOR; pmi: LPMONITORINFO): BOOL; stdcall;
- {$EXTERNALSYM GetMonitorInfoA}
- function GetMonitorInfoW(hMonitor: HMONITOR; lpmi: LPMONITORINFO): BOOL; stdcall;
- {$EXTERNALSYM GetMonitorInfoW}
- {$IFDEF UNICODE}
- function GetMonitorInfo(hMonitor: HMONITOR; lpmi: LPMONITORINFO): BOOL; stdcall;
- {$EXTERNALSYM GetMonitorInfo}
- {$ELSE}
- function GetMonitorInfo(hMonitor: HMONITOR; lpmi: LPMONITORINFO): BOOL; stdcall;
- {$EXTERNALSYM GetMonitorInfo}
- {$ENDIF}
- type
- MONITORENUMPROC = function (hMonitor: HMONITOR; hdcMonitor: HDC;
- lprcMonitor: LPRECT; dwData: LPARAM): BOOL; stdcall;
- {$EXTERNALSYM MONITORENUMPROC}
- TMonitorEnumProc = MONITORENUMPROC;
- function EnumDisplayMonitors(hdc: HDC; lprcClip: LPCRECT;
- lpfnEnum: MONITORENUMPROC; dwData: LPARAM): BOOL; stdcall;
- {$EXTERNALSYM EnumDisplayMonitors}
- //
- // WinEvents - Active Accessibility hooks
- //
- procedure NotifyWinEvent(event: DWORD; hwnd: HWND; idObject: LONG; idChild: LONG); stdcall;
- {$EXTERNALSYM NotifyWinEvent}
- type
- WINEVENTPROC = procedure (hWinEventHook: HWINEVENTHOOK; event: DWORD; hwnd: HWND;
- idObject, idChild: LONG; idEventThread, dwmsEventTime: DWORD); stdcall;
- {$EXTERNALSYM WINEVENTPROC}
- TWinEventProc = WINEVENTPROC;
- function SetWinEventHook(eventMin: DWORD; eventMax: DWORD;
- hmodWinEventProc: HMODULE; pfnWinEventProc: WINEVENTPROC; idProcess: DWORD;
- idThread: DWORD; dwFlags: DWORD): HWINEVENTHOOK; stdcall;
- {$EXTERNALSYM SetWinEventHook}
- function IsWinEventHookInstalled(event: DWORD): BOOL; stdcall;
- {$EXTERNALSYM IsWinEventHookInstalled}
- //
- // dwFlags for SetWinEventHook
- //
- const
- WINEVENT_OUTOFCONTEXT = $0000; // Events are ASYNC
- {$EXTERNALSYM WINEVENT_OUTOFCONTEXT}
- WINEVENT_SKIPOWNTHREAD = $0001; // Don't call back for events on installer's thread
- {$EXTERNALSYM WINEVENT_SKIPOWNTHREAD}
- WINEVENT_SKIPOWNPROCESS = $0002; // Don't call back for events on installer's process
- {$EXTERNALSYM WINEVENT_SKIPOWNPROCESS}
- WINEVENT_INCONTEXT = $0004; // Events are SYNC, this causes your dll to be injected into every process
- {$EXTERNALSYM WINEVENT_INCONTEXT}
- function UnhookWinEvent(hWinEventHook: HWINEVENTHOOK): BOOL; stdcall;
- {$EXTERNALSYM UnhookWinEvent}
- //
- // idObject values for WinEventProc and NotifyWinEvent
- //
- //
- // hwnd + idObject can be used with OLEACC.DLL's OleGetObjectFromWindow()
- // to get an interface pointer to the container. indexChild is the item
- // within the container in question. Setup a VARIANT with vt VT_I4 and
- // lVal the indexChild and pass that in to all methods. Then you
- // are raring to go.
- //
- //
- // Common object IDs (cookies, only for sending WM_GETOBJECT to get at the
- // thing in question). Positive IDs are reserved for apps (app specific),
- // negative IDs are system things and are global, 0 means "just little old
- // me".
- //
- const
- CHILDID_SELF = 0;
- {$EXTERNALSYM CHILDID_SELF}
- INDEXID_OBJECT = 0;
- {$EXTERNALSYM INDEXID_OBJECT}
- INDEXID_CONTAINER = 0;
- {$EXTERNALSYM INDEXID_CONTAINER}
- //
- // Reserved IDs for system objects
- //
- const
- OBJID_WINDOW = DWORD($00000000);
- {$EXTERNALSYM OBJID_WINDOW}
- OBJID_SYSMENU = DWORD($FFFFFFFF);
- {$EXTERNALSYM OBJID_SYSMENU}
- OBJID_TITLEBAR = DWORD($FFFFFFFE);
- {$EXTERNALSYM OBJID_TITLEBAR}
- OBJID_MENU = DWORD($FFFFFFFD);
- {$EXTERNALSYM OBJID_MENU}
- OBJID_CLIENT = DWORD($FFFFFFFC);
- {$EXTERNALSYM OBJID_CLIENT}
- OBJID_VSCROLL = DWORD($FFFFFFFB);
- {$EXTERNALSYM OBJID_VSCROLL}
- OBJID_HSCROLL = DWORD($FFFFFFFA);
- {$EXTERNALSYM OBJID_HSCROLL}
- OBJID_SIZEGRIP = DWORD($FFFFFFF9);
- {$EXTERNALSYM OBJID_SIZEGRIP}
- OBJID_CARET = DWORD($FFFFFFF8);
- {$EXTERNALSYM OBJID_CARET}
- OBJID_CURSOR = DWORD($FFFFFFF7);
- {$EXTERNALSYM OBJID_CURSOR}
- OBJID_ALERT = DWORD($FFFFFFF6);
- {$EXTERNALSYM OBJID_ALERT}
- OBJID_SOUND = DWORD($FFFFFFF5);
- {$EXTERNALSYM OBJID_SOUND}
- OBJID_QUERYCLASSNAMEIDX = DWORD($FFFFFFF4);
- {$EXTERNALSYM OBJID_QUERYCLASSNAMEIDX}
- OBJID_NATIVEOM = DWORD($FFFFFFF0);
- {$EXTERNALSYM OBJID_NATIVEOM}
- //
- // EVENT DEFINITION
- //
- EVENT_MIN = $00000001;
- {$EXTERNALSYM EVENT_MIN}
- EVENT_MAX = $7FFFFFFF;
- {$EXTERNALSYM EVENT_MAX}
- //
- // EVENT_SYSTEM_SOUND
- // Sent when a sound is played. Currently nothing is generating this, we
- // this event when a system sound (for menus, etc) is played. Apps
- // generate this, if accessible, when a private sound is played. For
- // example, if Mail plays a "New Mail" sound.
- //
- // System Sounds:
- // (Generated by PlaySoundEvent in USER itself)
- // hwnd is NULL
- // idObject is OBJID_SOUND
- // idChild is sound child ID if one
- // App Sounds:
- // (PlaySoundEvent won't generate notification; up to app)
- // hwnd + idObject gets interface pointer to Sound object
- // idChild identifies the sound in question
- // are going to be cleaning up the SOUNDSENTRY feature in the control panel
- // and will use this at that time. Applications implementing WinEvents
- // are perfectly welcome to use it. Clients of IAccessible* will simply
- // turn around and get back a non-visual object that describes the sound.
- //
- EVENT_SYSTEM_SOUND = $0001;
- {$EXTERNALSYM EVENT_SYSTEM_SOUND}
- //
- // EVENT_SYSTEM_ALERT
- // System Alerts:
- // (Generated by MessageBox() calls for example)
- // hwnd is hwndMessageBox
- // idObject is OBJID_ALERT
- // App Alerts:
- // (Generated whenever)
- // hwnd+idObject gets interface pointer to Alert
- //
- EVENT_SYSTEM_ALERT = $0002;
- {$EXTERNALSYM EVENT_SYSTEM_ALERT}
- //
- // EVENT_SYSTEM_FOREGROUND
- // Sent when the foreground (active) window changes, even if it is changing
- // to another window in the same thread as the previous one.
- // hwnd is hwndNewForeground
- // idObject is OBJID_WINDOW
- // idChild is INDEXID_OBJECT
- //
- EVENT_SYSTEM_FOREGROUND = $0003;
- {$EXTERNALSYM EVENT_SYSTEM_FOREGROUND}
- //
- // Menu
- // hwnd is window (top level window or popup menu window)
- // idObject is ID of control (OBJID_MENU, OBJID_SYSMENU, OBJID_SELF for popup)
- // idChild is CHILDID_SELF
- // EVENT_SYSTEM_MENUSTART
- // EVENT_SYSTEM_MENUEND
- // For MENUSTART, hwnd+idObject+idChild refers to the control with the menu bar,
- // or the control bringing up the context menu.
- // Sent when entering into and leaving from menu mode (system, app bar, and
- // track popups).
- //
- EVENT_SYSTEM_MENUSTART = $0004;
- {$EXTERNALSYM EVENT_SYSTEM_MENUSTART}
- EVENT_SYSTEM_MENUEND = $0005;
- {$EXTERNALSYM EVENT_SYSTEM_MENUEND}
- //
- // EVENT_SYSTEM_MENUPOPUPSTART
- // EVENT_SYSTEM_MENUPOPUPEND
- // Sent when a menu popup comes up and just before it is taken down. Note
- // that for a call to TrackPopupMenu(), a client will see EVENT_SYSTEM_MENUSTART
- // followed almost immediately by EVENT_SYSTEM_MENUPOPUPSTART for the popup
- // being shown.
- // For MENUPOPUP, hwnd+idObject+idChild refers to the NEW popup coming up, not the
- // parent item which is hierarchical. You can get the parent menu/popup by
- // asking for the accParent object.
- //
- EVENT_SYSTEM_MENUPOPUPSTART = $0006;
- {$EXTERNALSYM EVENT_SYSTEM_MENUPOPUPSTART}
- EVENT_SYSTEM_MENUPOPUPEND = $0007;
- {$EXTERNALSYM EVENT_SYSTEM_MENUPOPUPEND}
- //
- // EVENT_SYSTEM_CAPTURESTART
- // EVENT_SYSTEM_CAPTUREEND
- // Sent when a window takes the capture and releases the capture.
- //
- EVENT_SYSTEM_CAPTURESTART = $0008;
- {$EXTERNALSYM EVENT_SYSTEM_CAPTURESTART}
- EVENT_SYSTEM_CAPTUREEND = $0009;
- {$EXTERNALSYM EVENT_SYSTEM_CAPTUREEND}
- //
- // Move Size
- // EVENT_SYSTEM_MOVESIZESTART
- // EVENT_SYSTEM_MOVESIZEEND
- // Sent when a window enters and leaves move-size dragging mode.
- //
- EVENT_SYSTEM_MOVESIZESTART = $000A;
- {$EXTERNALSYM EVENT_SYSTEM_MOVESIZESTART}
- EVENT_SYSTEM_MOVESIZEEND = $000B;
- {$EXTERNALSYM EVENT_SYSTEM_MOVESIZEEND}
- //
- // Context Help
- // EVENT_SYSTEM_CONTEXTHELPSTART
- // EVENT_SYSTEM_CONTEXTHELPEND
- // Sent when a window enters and leaves context sensitive help mode.
- //
- EVENT_SYSTEM_CONTEXTHELPSTART = $000C;
- {$EXTERNALSYM EVENT_SYSTEM_CONTEXTHELPSTART}
- EVENT_SYSTEM_CONTEXTHELPEND = $000D;
- {$EXTERNALSYM EVENT_SYSTEM_CONTEXTHELPEND}
- //
- // Drag & Drop
- // EVENT_SYSTEM_DRAGDROPSTART
- // EVENT_SYSTEM_DRAGDROPEND
- // Send the START notification just before going into drag&drop loop. Send
- // the END notification just after canceling out.
- // Note that it is up to apps and OLE to generate this, since the system
- // doesn't know. Like EVENT_SYSTEM_SOUND, it will be a while before this
- // is prevalent.
- //
- EVENT_SYSTEM_DRAGDROPSTART = $000E;
- {$EXTERNALSYM EVENT_SYSTEM_DRAGDROPSTART}
- EVENT_SYSTEM_DRAGDROPEND = $000F;
- {$EXTERNALSYM EVENT_SYSTEM_DRAGDROPEND}
- //
- // Dialog
- // Send the START notification right after the dialog is completely
- // initialized and visible. Send the END right before the dialog
- // is hidden and goes away.
- // EVENT_SYSTEM_DIALOGSTART
- // EVENT_SYSTEM_DIALOGEND
- //
- EVENT_SYSTEM_DIALOGSTART = $0010;
- {$EXTERNALSYM EVENT_SYSTEM_DIALOGSTART}
- EVENT_SYSTEM_DIALOGEND = $0011;
- {$EXTERNALSYM EVENT_SYSTEM_DIALOGEND}
- //
- // EVENT_SYSTEM_SCROLLING
- // EVENT_SYSTEM_SCROLLINGSTART
- // EVENT_SYSTEM_SCROLLINGEND
- // Sent when beginning and ending the tracking of a scrollbar in a window,
- // and also for scrollbar controls.
- //
- EVENT_SYSTEM_SCROLLINGSTART = $0012;
- {$EXTERNALSYM EVENT_SYSTEM_SCROLLINGSTART}
- EVENT_SYSTEM_SCROLLINGEND = $0013;
- {$EXTERNALSYM EVENT_SYSTEM_SCROLLINGEND}
- //
- // Alt-Tab Window
- // Send the START notification right after the switch window is initialized
- // and visible. Send the END right before it is hidden and goes away.
- // EVENT_SYSTEM_SWITCHSTART
- // EVENT_SYSTEM_SWITCHEND
- //
- EVENT_SYSTEM_SWITCHSTART = $0014;
- {$EXTERNALSYM EVENT_SYSTEM_SWITCHSTART}
- EVENT_SYSTEM_SWITCHEND = $0015;
- {$EXTERNALSYM EVENT_SYSTEM_SWITCHEND}
- //
- // EVENT_SYSTEM_MINIMIZESTART
- // EVENT_SYSTEM_MINIMIZEEND
- // Sent when a window minimizes and just before it restores.
- //
- EVENT_SYSTEM_MINIMIZESTART = $0016;
- {$EXTERNALSYM EVENT_SYSTEM_MINIMIZESTART}
- EVENT_SYSTEM_MINIMIZEEND = $0017;
- {$EXTERNALSYM EVENT_SYSTEM_MINIMIZEEND}
- EVENT_CONSOLE_CARET = $4001;
- {$EXTERNALSYM EVENT_CONSOLE_CARET}
- EVENT_CONSOLE_UPDATE_REGION = $4002;
- {$EXTERNALSYM EVENT_CONSOLE_UPDATE_REGION}
- EVENT_CONSOLE_UPDATE_SIMPLE = $4003;
- {$EXTERNALSYM EVENT_CONSOLE_UPDATE_SIMPLE}
- EVENT_CONSOLE_UPDATE_SCROLL = $4004;
- {$EXTERNALSYM EVENT_CONSOLE_UPDATE_SCROLL}
- EVENT_CONSOLE_LAYOUT = $4005;
- {$EXTERNALSYM EVENT_CONSOLE_LAYOUT}
- EVENT_CONSOLE_START_APPLICATION = $4006;
- {$EXTERNALSYM EVENT_CONSOLE_START_APPLICATION}
- EVENT_CONSOLE_END_APPLICATION = $4007;
- {$EXTERNALSYM EVENT_CONSOLE_END_APPLICATION}
- //
- // Flags for EVENT_CONSOLE_START/END_APPLICATION.
- //
- CONSOLE_APPLICATION_16BIT = $0001;
- {$EXTERNALSYM CONSOLE_APPLICATION_16BIT}
- //
- // Flags for EVENT_CONSOLE_CARET
- //
- CONSOLE_CARET_SELECTION = $0001;
- {$EXTERNALSYM CONSOLE_CARET_SELECTION}
- CONSOLE_CARET_VISIBLE = $0002;
- {$EXTERNALSYM CONSOLE_CARET_VISIBLE}
- //
- // Object events
- // The system AND apps generate these. The system generates these for
- // real windows. Apps generate these for objects within their window which
- // act like a separate control, e.g. an item in a list view.
- // When the system generate them, dwParam2 is always WMOBJID_SELF. When
- // apps generate them, apps put the has-meaning-to-the-app-only ID value
- // in dwParam2.
- // For all events, if you want detailed accessibility information, callers
- // should
- // * Call AccessibleObjectFromWindow() with the hwnd, idObject parameters
- // of the event, and IID_IAccessible as the REFIID, to get back an
- // IAccessible* to talk to
- // * Initialize and fill in a VARIANT as VT_I4 with lVal the idChild
- // parameter of the event.
- // * If idChild isn't zero, call get_accChild() in the container to see
- // if the child is an object in its own right. If so, you will get
- // back an IDispatch* object for the child. You should release the
- // parent, and call QueryInterface() on the child object to get its
- // IAccessible*. Then you talk directly to the child. Otherwise,
- // if get_accChild() returns you nothing, you should continue to
- // use the child VARIANT. You will ask the container for the properties
- // of the child identified by the VARIANT. In other words, the
- // child in this case is accessible but not a full-blown object.
- // Like a button on a titlebar which is 'small' and has no children.
- //
- //
- // For all EVENT_OBJECT events,
- // hwnd is the dude to Send the WM_GETOBJECT message to (unless NULL,
- // see above for system things)
- // idObject is the ID of the object that can resolve any queries a
- // client might have. It's a way to deal with windowless controls,
- // controls that are just drawn on the screen in some larger parent
- // window (like SDM), or standard frame elements of a window.
- // idChild is the piece inside of the object that is affected. This
- // allows clients to access things that are too small to have full
- // blown objects in their own right. Like the thumb of a scrollbar.
- // The hwnd/idObject pair gets you to the container, the dude you
- // probably want to talk to most of the time anyway. The idChild
- // can then be passed into the acc properties to get the name/value
- // of it as needed.
- // Example #1:
- // System propagating a listbox selection change
- // EVENT_OBJECT_SELECTION
- // hwnd == listbox hwnd
- // idObject == OBJID_WINDOW
- // idChild == new selected item, or CHILDID_SELF if
- // nothing now selected within container.
- // Word '97 propagating a listbox selection change
- // hwnd == SDM window
- // idObject == SDM ID to get at listbox 'control'
- // idChild == new selected item, or CHILDID_SELF if
- // nothing
- // Example #2:
- // System propagating a menu item selection on the menu bar
- // EVENT_OBJECT_SELECTION
- // hwnd == top level window
- // idObject == OBJID_MENU
- // idChild == ID of child menu bar item selected
- // *
- // Example #3:
- // System propagating a dropdown coming off of said menu bar item
- // EVENT_OBJECT_CREATE
- // hwnd == popup item
- // idObject == OBJID_WINDOW
- // idChild == CHILDID_SELF
- //
- // Example #4:
- //
- // For EVENT_OBJECT_REORDER, the object referred to by hwnd/idObject is the
- // PARENT container in which the zorder is occurring. This is because if
- // one child is zordering, all of them are changing their relative zorder.
- //
- EVENT_OBJECT_CREATE = $8000; // hwnd + ID + idChild is created item
- {$EXTERNALSYM EVENT_OBJECT_CREATE}
- EVENT_OBJECT_DESTROY = $8001; // hwnd + ID + idChild is destroyed item
- {$EXTERNALSYM EVENT_OBJECT_DESTROY}
- EVENT_OBJECT_SHOW = $8002; // hwnd + ID + idChild is shown item
- {$EXTERNALSYM EVENT_OBJECT_SHOW}
- EVENT_OBJECT_HIDE = $8003; // hwnd + ID + idChild is hidden item
- {$EXTERNALSYM EVENT_OBJECT_HIDE}
- EVENT_OBJECT_REORDER = $8004; // hwnd + ID + idChild is parent of zordering children
- {$EXTERNALSYM EVENT_OBJECT_REORDER}
- //
- // NOTE:
- // Minimize the number of notifications!
- //
- // When you are hiding a parent object, obviously all child objects are no
- // longer visible on screen. They still have the same "visible" status,
- // but are not truly visible. Hence do not send HIDE notifications for the
- // children also. One implies all. The same goes for SHOW.
- //
- EVENT_OBJECT_FOCUS = $8005; // hwnd + ID + idChild is focused item
- {$EXTERNALSYM EVENT_OBJECT_FOCUS}
- EVENT_OBJECT_SELECTION = $8006; // hwnd + ID + idChild is selected item (if only one), or idChild is OBJID_WINDOW if complex
- {$EXTERNALSYM EVENT_OBJECT_SELECTION}
- EVENT_OBJECT_SELECTIONADD = $8007; // hwnd + ID + idChild is item added
- {$EXTERNALSYM EVENT_OBJECT_SELECTIONADD}
- EVENT_OBJECT_SELECTIONREMOVE = $8008; // hwnd + ID + idChild is item removed
- {$EXTERNALSYM EVENT_OBJECT_SELECTIONREMOVE}
- EVENT_OBJECT_SELECTIONWITHIN = $8009; // hwnd + ID + idChild is parent of changed selected items
- {$EXTERNALSYM EVENT_OBJECT_SELECTIONWITHIN}
- //
- // NOTES:
- // There is only one "focused" child item in a parent. This is the place
- // keystrokes are going at a given moment. Hence only send a notification
- // about where the NEW focus is going. A NEW item getting the focus already
- // implies that the OLD item is losing it.
- //
- // SELECTION however can be multiple. Hence the different SELECTION
- // notifications. Here's when to use each:
- //
- // (1) Send a SELECTION notification in the simple single selection
- // case (like the focus) when the item with the selection is
- // merely moving to a different item within a container. hwnd + ID
- // is the container control, idChildItem is the new child with the
- // selection.
- //
- // (2) Send a SELECTIONADD notification when a new item has simply been added
- // to the selection within a container. This is appropriate when the
- // number of newly selected items is very small. hwnd + ID is the
- // container control, idChildItem is the new child added to the selection.
- //
- // (3) Send a SELECTIONREMOVE notification when a new item has simply been
- // removed from the selection within a container. This is appropriate
- // when the number of newly selected items is very small, just like
- // SELECTIONADD. hwnd + ID is the container control, idChildItem is the
- // new child removed from the selection.
- //
- // (4) Send a SELECTIONWITHIN notification when the selected items within a
- // control have changed substantially. Rather than propagate a large
- // number of changes to reflect removal for some items, addition of
- // others, just tell somebody who cares that a lot happened. It will
- // be faster an easier for somebody watching to just turn around and
- // query the container control what the new bunch of selected items
- // are.
- //
- EVENT_OBJECT_STATECHANGE = $800A; // hwnd + ID + idChild is item w/ state change
- {$EXTERNALSYM EVENT_OBJECT_STATECHANGE}
- //
- // Examples of when to send an EVENT_OBJECT_STATECHANGE include
- // * It is being enabled/disabled (USER does for windows)
- // * It is being pressed/released (USER does for buttons)
- // * It is being checked/unchecked (USER does for radio/check buttons)
- //
- EVENT_OBJECT_LOCATIONCHANGE = $800B; // hwnd + ID + idChild is moved/sized item
- {$EXTERNALSYM EVENT_OBJECT_LOCATIONCHANGE}
- //
- // Note:
- // A LOCATIONCHANGE is not sent for every child object when the parent
- // changes shape/moves. Send one notification for the topmost object
- // that is changing. For example, if the user resizes a top level window,
- // USER will generate a LOCATIONCHANGE for it, but not for the menu bar,
- // title bar, scrollbars, etc. that are also changing shape/moving.
- //
- // In other words, it only generates LOCATIONCHANGE notifications for
- // real windows that are moving/sizing. It will not generate a LOCATIONCHANGE
- // for every non-floating child window when the parent moves (the children are
- // logically moving also on screen, but not relative to the parent).
- //
- // Now, if the app itself resizes child windows as a result of being
- // sized, USER will generate LOCATIONCHANGEs for those dudes also because
- // it doesn't know better.
- //
- // Note also that USER will generate LOCATIONCHANGE notifications for two
- // non-window sys objects:
- // (1) System caret
- // (2) Cursor
- //
- EVENT_OBJECT_NAMECHANGE = $800C; // hwnd + ID + idChild is item w/ name change
- {$EXTERNALSYM EVENT_OBJECT_NAMECHANGE}
- EVENT_OBJECT_DESCRIPTIONCHANGE = $800D; // hwnd + ID + idChild is item w/ desc change
- {$EXTERNALSYM EVENT_OBJECT_DESCRIPTIONCHANGE}
- EVENT_OBJECT_VALUECHANGE = $800E; // hwnd + ID + idChild is item w/ value change
- {$EXTERNALSYM EVENT_OBJECT_VALUECHANGE}
- EVENT_OBJECT_PARENTCHANGE = $800F; // hwnd + ID + idChild is item w/ new parent
- {$EXTERNALSYM EVENT_OBJECT_PARENTCHANGE}
- EVENT_OBJECT_HELPCHANGE = $8010; // hwnd + ID + idChild is item w/ help change
- {$EXTERNALSYM EVENT_OBJECT_HELPCHANGE}
- EVENT_OBJECT_DEFACTIONCHANGE = $8011; // hwnd + ID + idChild is item w/ def action change
- {$EXTERNALSYM EVENT_OBJECT_DEFACTIONCHANGE}
- EVENT_OBJECT_ACCELERATORCHANGE = $8012; // hwnd + ID + idChild is item w/ keybd accel change
- {$EXTERNALSYM EVENT_OBJECT_ACCELERATORCHANGE}
- //
- // Child IDs
- //
- //
- // System Sounds (idChild of system SOUND notification)
- //
- SOUND_SYSTEM_STARTUP = 1;
- {$EXTERNALSYM SOUND_SYSTEM_STARTUP}
- SOUND_SYSTEM_SHUTDOWN = 2;
- {$EXTERNALSYM SOUND_SYSTEM_SHUTDOWN}
- SOUND_SYSTEM_BEEP = 3;
- {$EXTERNALSYM SOUND_SYSTEM_BEEP}
- SOUND_SYSTEM_ERROR = 4;
- {$EXTERNALSYM SOUND_SYSTEM_ERROR}
- SOUND_SYSTEM_QUESTION = 5;
- {$EXTERNALSYM SOUND_SYSTEM_QUESTION}
- SOUND_SYSTEM_WARNING = 6;
- {$EXTERNALSYM SOUND_SYSTEM_WARNING}
- SOUND_SYSTEM_INFORMATION = 7;
- {$EXTERNALSYM SOUND_SYSTEM_INFORMATION}
- SOUND_SYSTEM_MAXIMIZE = 8;
- {$EXTERNALSYM SOUND_SYSTEM_MAXIMIZE}
- SOUND_SYSTEM_MINIMIZE = 9;
- {$EXTERNALSYM SOUND_SYSTEM_MINIMIZE}
- SOUND_SYSTEM_RESTOREUP = 10;
- {$EXTERNALSYM SOUND_SYSTEM_RESTOREUP}
- SOUND_SYSTEM_RESTOREDOWN = 11;
- {$EXTERNALSYM SOUND_SYSTEM_RESTOREDOWN}
- SOUND_SYSTEM_APPSTART = 12;
- {$EXTERNALSYM SOUND_SYSTEM_APPSTART}
- SOUND_SYSTEM_FAULT = 13;
- {$EXTERNALSYM SOUND_SYSTEM_FAULT}
- SOUND_SYSTEM_APPEND = 14;
- {$EXTERNALSYM SOUND_SYSTEM_APPEND}
- SOUND_SYSTEM_MENUCOMMAND = 15;
- {$EXTERNALSYM SOUND_SYSTEM_MENUCOMMAND}
- SOUND_SYSTEM_MENUPOPUP = 16;
- {$EXTERNALSYM SOUND_SYSTEM_MENUPOPUP}
- CSOUND_SYSTEM = 16;
- {$EXTERNALSYM CSOUND_SYSTEM}
- //
- // System Alerts (indexChild of system ALERT notification)
- //
- ALERT_SYSTEM_INFORMATIONAL = 1; // MB_INFORMATION
- {$EXTERNALSYM ALERT_SYSTEM_INFORMATIONAL}
- ALERT_SYSTEM_WARNING = 2; // MB_WARNING
- {$EXTERNALSYM ALERT_SYSTEM_WARNING}
- ALERT_SYSTEM_ERROR = 3; // MB_ERROR
- {$EXTERNALSYM ALERT_SYSTEM_ERROR}
- ALERT_SYSTEM_QUERY = 4; // MB_QUESTION
- {$EXTERNALSYM ALERT_SYSTEM_QUERY}
- ALERT_SYSTEM_CRITICAL = 5; // HardSysErrBox
- {$EXTERNALSYM ALERT_SYSTEM_CRITICAL}
- CALERT_SYSTEM = 6;
- {$EXTERNALSYM CALERT_SYSTEM}
- type
- LPGUITHREADINFO = ^GUITHREADINFO;
- {$EXTERNALSYM LPGUITHREADINFO}
- tagGUITHREADINFO = record
- cbSize: DWORD;
- flags: DWORD;
- hwndActive: HWND;
- hwndFocus: HWND;
- hwndCapture: HWND;
- hwndMenuOwner: HWND;
- hwndMoveSize: HWND;
- hwndCaret: HWND;
- rcCaret: RECT;
- end;
- {$EXTERNALSYM tagGUITHREADINFO}
- GUITHREADINFO = tagGUITHREADINFO;
- {$EXTERNALSYM GUITHREADINFO}
- TGuiThreadInfo = GUITHREADINFO;
- PGuiThreadInfo = LPGUITHREADINFO;
- const
- GUI_CARETBLINKING = $00000001;
- {$EXTERNALSYM GUI_CARETBLINKING}
- GUI_INMOVESIZE = $00000002;
- {$EXTERNALSYM GUI_INMOVESIZE}
- GUI_INMENUMODE = $00000004;
- {$EXTERNALSYM GUI_INMENUMODE}
- GUI_SYSTEMMENUMODE = $00000008;
- {$EXTERNALSYM GUI_SYSTEMMENUMODE}
- GUI_POPUPMENUMODE = $00000010;
- {$EXTERNALSYM GUI_POPUPMENUMODE}
- GUI_16BITTASK = $00000020;
- {$EXTERNALSYM GUI_16BITTASK}
- function GetGUIThreadInfo(idThread: DWORD; var pgui: GUITHREADINFO): BOOL; stdcall;
- {$EXTERNALSYM GetGUIThreadInfo}
- function GetWindowModuleFileNameA(hwnd: HWND; pszFileName: LPSTR; cchFileNameMax: UINT): UINT; stdcall;
- {$EXTERNALSYM GetWindowModuleFileNameA}
- function GetWindowModuleFileNameW(hwnd: HWND; pszFileName: LPWSTR; cchFileNameMax: UINT): UINT; stdcall;
- {$EXTERNALSYM GetWindowModuleFileNameW}
- {$IFDEF UNICODE}
- function GetWindowModuleFileName(hwnd: HWND; pszFileName: LPWSTR; cchFileNameMax: UINT): UINT; stdcall;
- {$EXTERNALSYM GetWindowModuleFileName}
- {$ELSE}
- function GetWindowModuleFileName(hwnd: HWND; pszFileName: LPSTR; cchFileNameMax: UINT): UINT; stdcall;
- {$EXTERNALSYM GetWindowModuleFileName}
- {$ENDIF}
- const
- STATE_SYSTEM_UNAVAILABLE = $00000001; // Disabled
- {$EXTERNALSYM STATE_SYSTEM_UNAVAILABLE}
- STATE_SYSTEM_SELECTED = $00000002;
- {$EXTERNALSYM STATE_SYSTEM_SELECTED}
- STATE_SYSTEM_FOCUSED = $00000004;
- {$EXTERNALSYM STATE_SYSTEM_FOCUSED}
- STATE_SYSTEM_PRESSED = $00000008;
- {$EXTERNALSYM STATE_SYSTEM_PRESSED}
- STATE_SYSTEM_CHECKED = $00000010;
- {$EXTERNALSYM STATE_SYSTEM_CHECKED}
- STATE_SYSTEM_MIXED = $00000020; // 3-state checkbox or toolbar button
- {$EXTERNALSYM STATE_SYSTEM_MIXED}
- STATE_SYSTEM_INDETERMINATE = STATE_SYSTEM_MIXED;
- {$EXTERNALSYM STATE_SYSTEM_INDETERMINATE}
- STATE_SYSTEM_READONLY = $00000040;
- {$EXTERNALSYM STATE_SYSTEM_READONLY}
- STATE_SYSTEM_HOTTRACKED = $00000080;
- {$EXTERNALSYM STATE_SYSTEM_HOTTRACKED}
- STATE_SYSTEM_DEFAULT = $00000100;
- {$EXTERNALSYM STATE_SYSTEM_DEFAULT}
- STATE_SYSTEM_EXPANDED = $00000200;
- {$EXTERNALSYM STATE_SYSTEM_EXPANDED}
- STATE_SYSTEM_COLLAPSED = $00000400;
- {$EXTERNALSYM STATE_SYSTEM_COLLAPSED}
- STATE_SYSTEM_BUSY = $00000800;
- {$EXTERNALSYM STATE_SYSTEM_BUSY}
- STATE_SYSTEM_FLOATING = $00001000; // Children "owned" not "contained" by parent
- {$EXTERNALSYM STATE_SYSTEM_FLOATING}
- STATE_SYSTEM_MARQUEED = $00002000;
- {$EXTERNALSYM STATE_SYSTEM_MARQUEED}
- STATE_SYSTEM_ANIMATED = $00004000;
- {$EXTERNALSYM STATE_SYSTEM_ANIMATED}
- STATE_SYSTEM_INVISIBLE = $00008000;
- {$EXTERNALSYM STATE_SYSTEM_INVISIBLE}
- STATE_SYSTEM_OFFSCREEN = $00010000;
- {$EXTERNALSYM STATE_SYSTEM_OFFSCREEN}
- STATE_SYSTEM_SIZEABLE = $00020000;
- {$EXTERNALSYM STATE_SYSTEM_SIZEABLE}
- STATE_SYSTEM_MOVEABLE = $00040000;
- {$EXTERNALSYM STATE_SYSTEM_MOVEABLE}
- STATE_SYSTEM_SELFVOICING = $00080000;
- {$EXTERNALSYM STATE_SYSTEM_SELFVOICING}
- STATE_SYSTEM_FOCUSABLE = $00100000;
- {$EXTERNALSYM STATE_SYSTEM_FOCUSABLE}
- STATE_SYSTEM_SELECTABLE = $00200000;
- {$EXTERNALSYM STATE_SYSTEM_SELECTABLE}
- STATE_SYSTEM_LINKED = $00400000;
- {$EXTERNALSYM STATE_SYSTEM_LINKED}
- STATE_SYSTEM_TRAVERSED = $00800000;
- {$EXTERNALSYM STATE_SYSTEM_TRAVERSED}
- STATE_SYSTEM_MULTISELECTABLE = $01000000; // Supports multiple selection
- {$EXTERNALSYM STATE_SYSTEM_MULTISELECTABLE}
- STATE_SYSTEM_EXTSELECTABLE = $02000000; // Supports extended selection
- {$EXTERNALSYM STATE_SYSTEM_EXTSELECTABLE}
- STATE_SYSTEM_ALERT_LOW = $04000000; // This information is of low priority
- {$EXTERNALSYM STATE_SYSTEM_ALERT_LOW}
- STATE_SYSTEM_ALERT_MEDIUM = $08000000; // This information is of medium priority
- {$EXTERNALSYM STATE_SYSTEM_ALERT_MEDIUM}
- STATE_SYSTEM_ALERT_HIGH = $10000000; // This information is of high priority
- {$EXTERNALSYM STATE_SYSTEM_ALERT_HIGH}
- STATE_SYSTEM_PROTECTED = $20000000; // access to this is restricted
- {$EXTERNALSYM STATE_SYSTEM_PROTECTED}
- STATE_SYSTEM_VALID = $3FFFFFFF;
- {$EXTERNALSYM STATE_SYSTEM_VALID}
- CCHILDREN_TITLEBAR = 5;
- {$EXTERNALSYM CCHILDREN_TITLEBAR}
- CCHILDREN_SCROLLBAR = 5;
- {$EXTERNALSYM CCHILDREN_SCROLLBAR}
- //
- // Information about the global cursor.
- //
- type
- LPCURSORINFO = ^CURSORINFO;
- {$EXTERNALSYM LPCURSORINFO}
- tagCURSORINFO = record
- cbSize: DWORD;
- flags: DWORD;
- hCursor: HCURSOR;
- ptScreenPos: POINT;
- end;
- {$EXTERNALSYM tagCURSORINFO}
- CURSORINFO = tagCURSORINFO;
- {$EXTERNALSYM CURSORINFO}
- TCursorInfo = CURSORINFO;
- PCursorInfo = LPCURSORINFO;
- const
- CURSOR_SHOWING = $00000001;
- {$EXTERNALSYM CURSOR_SHOWING}
- function GetCursorInfo(var pci: CURSORINFO): BOOL; stdcall;
- {$EXTERNALSYM GetCursorInfo}
- //
- // Window information snapshot
- //
- type
- LPWINDOWINFO = ^WINDOWINFO;
- {$EXTERNALSYM LPWINDOWINFO}
- tagWINDOWINFO = record
- cbSize: DWORD;
- rcWindow: RECT;
- rcClient: RECT;
- dwStyle: DWORD;
- dwExStyle: DWORD;
- dwWindowStatus: DWORD;
- cxWindowBorders: UINT;
- cyWindowBorders: UINT;
- atomWindowType: ATOM;
- wCreatorVersion: WORD;
- end;
- {$EXTERNALSYM tagWINDOWINFO}
- WINDOWINFO = tagWINDOWINFO;
- {$EXTERNALSYM WINDOWINFO}
- TWindowInfo = WINDOWINFO;
- PWindowInfo = LPWINDOWINFO;
- const
- WS_ACTIVECAPTION = $0001;
- {$EXTERNALSYM WS_ACTIVECAPTION}
- function GetWindowInfo(hwnd: HWND; var pwi: WINDOWINFO): BOOL; stdcall;
- {$EXTERNALSYM GetWindowInfo}
- //
- // Titlebar information.
- //
- type
- LPTITLEBARINFO = ^TITLEBARINFO;
- {$EXTERNALSYM LPTITLEBARINFO}
- tagTITLEBARINFO = record
- cbSize: DWORD;
- rcTitleBar: RECT;
- rgstate: array [0..CCHILDREN_TITLEBAR] of DWORD;
- end;
- {$EXTERNALSYM tagTITLEBARINFO}
- TITLEBARINFO = tagTITLEBARINFO;
- {$EXTERNALSYM TITLEBARINFO}
- TTitleBarInfo = TITLEBARINFO;
- PTitleBarInfo = LPTITLEBARINFO;
- function GetTitleBarInfo(hwnd: HWND; var pti: TITLEBARINFO): BOOL; stdcall;
- {$EXTERNALSYM GetTitleBarInfo}
- //
- // Menubar information
- //
- type
- LPMENUBARINFO = ^MENUBARINFO;
- {$EXTERNALSYM LPMENUBARINFO}
- tagMENUBARINFO = record
- cbSize: DWORD;
- rcBar: RECT; // rect of bar, popup, item
- hMenu: HMENU; // real menu handle of bar, popup
- hwndMenu: HWND; // hwnd of item submenu if one
- Flags: DWORD;
- // BOOL fBarFocused:1; // bar, popup has the focus
- // BOOL fFocused:1; // item has the focus
- end;
- {$EXTERNALSYM tagMENUBARINFO}
- MENUBARINFO = tagMENUBARINFO;
- {$EXTERNALSYM MENUBARINFO}
- TMenuBarInfo = MENUBARINFO;
- PMenuBarInfo = LPMENUBARINFO;
- function GetMenuBarInfo(hwnd: HWND; idObject: LONG; idItem: LONG;
- var pmbi: MENUBARINFO): BOOL; stdcall;
- {$EXTERNALSYM GetMenuBarInfo}
- //
- // Scrollbar information
- //
- type
- LPSCROLLBARINFO = ^SCROLLBARINFO;
- {$EXTERNALSYM LPSCROLLBARINFO}
- tagSCROLLBARINFO = record
- cbSize: DWORD;
- rcScrollBar: RECT;
- dxyLineButton: Integer;
- xyThumbTop: Integer;
- xyThumbBottom: Integer;
- reserved: Integer;
- rgstate: array [0..CCHILDREN_SCROLLBAR] of DWORD;
- end;
- {$EXTERNALSYM tagSCROLLBARINFO}
- SCROLLBARINFO = tagSCROLLBARINFO;
- {$EXTERNALSYM SCROLLBARINFO}
- TScrollBarInfo = SCROLLBARINFO;
- PScrollBarInfo = LPSCROLLBARINFO;
- function GetScrollBarInfo(hwnd: HWND; idObject: LONG; var psbi: SCROLLBARINFO): BOOL; stdcall;
- {$EXTERNALSYM GetScrollBarInfo}
- //
- // Combobox information
- //
- type
- LPCOMBOBOXINFO = ^COMBOBOXINFO;
- {$EXTERNALSYM LPCOMBOBOXINFO}
- tagCOMBOBOXINFO = record
- cbSize: DWORD;
- rcItem: RECT;
- rcButton: RECT;
- stateButton: DWORD;
- hwndCombo: HWND;
- hwndItem: HWND;
- hwndList: HWND;
- end;
- {$EXTERNALSYM tagCOMBOBOXINFO}
- COMBOBOXINFO = tagCOMBOBOXINFO;
- {$EXTERNALSYM COMBOBOXINFO}
- TComboBoxInfo = COMBOBOXINFO;
- PComboBoxInfo = LPCOMBOBOXINFO;
- function GetComboBoxInfo(hwndCombo: HWND; var pcbi: COMBOBOXINFO): BOOL; stdcall;
- {$EXTERNALSYM GetComboBoxInfo}
- //
- // The "real" ancestor window
- //
- const
- GA_PARENT = 1;
- {$EXTERNALSYM GA_PARENT}
- GA_ROOT = 2;
- {$EXTERNALSYM GA_ROOT}
- GA_ROOTOWNER = 3;
- {$EXTERNALSYM GA_ROOTOWNER}
- function GetAncestor(hwnd: HWND; gaFlags: UINT): HWND; stdcall;
- {$EXTERNALSYM GetAncestor}
- //
- // This gets the REAL child window at the point. If it is in the dead
- // space of a group box, it will try a sibling behind it. But static
- // fields will get returned. In other words, it is kind of a cross between
- // ChildWindowFromPointEx and WindowFromPoint.
- //
- function RealChildWindowFromPoint(hwndParent: HWND; ptParentClientCoords: POINT): HWND; stdcall;
- {$EXTERNALSYM RealChildWindowFromPoint}
- //
- // This gets the name of the window TYPE, not class. This allows us to
- // recognize ThunderButton32 et al.
- //
- function RealGetWindowClassA(hwnd: HWND; pszType: LPSTR; cchType: UINT): UINT; stdcall;
- {$EXTERNALSYM RealGetWindowClassA}
- //
- // This gets the name of the window TYPE, not class. This allows us to
- // recognize ThunderButton32 et al.
- //
- function RealGetWindowClassW(hwnd: HWND; pszType: LPWSTR; cchType: UINT): UINT; stdcall;
- {$EXTERNALSYM RealGetWindowClassW}
- {$IFDEF UNICODE}
- function RealGetWindowClass(hwnd: HWND; pszType: LPWSTR; cchType: UINT): UINT; stdcall;
- {$EXTERNALSYM RealGetWindowClass}
- {$ELSE}
- function RealGetWindowClass(hwnd: HWND; pszType: LPSTR; cchType: UINT): UINT; stdcall;
- {$EXTERNALSYM RealGetWindowClass}
- {$ENDIF}
- //
- // Alt-Tab Switch window information.
- //
- type
- LPALTTABINFO = ^ALTTABINFO;
- {$EXTERNALSYM LPALTTABINFO}
- tagALTTABINFO = record
- cbSize: DWORD;
- cItems: Integer;
- cColumns: Integer;
- cRows: Integer;
- iColFocus: Integer;
- iRowFocus: Integer;
- cxItem: Integer;
- cyItem: Integer;
- ptStart: POINT;
- end;
- {$EXTERNALSYM tagALTTABINFO}
- ALTTABINFO = tagALTTABINFO;
- {$EXTERNALSYM ALTTABINFO}
- TAltTabInfo = ALTTABINFO;
- PAltTabInfo = LPALTTABINFO;
- function GetAltTabInfoA(hwnd: HWND; iItem: Integer; var pati: ALTTABINFO;
- pszItemText: LPSTR; cchItemText: UINT): BOOL; stdcall;
- {$EXTERNALSYM GetAltTabInfoA}
- function GetAltTabInfoW(hwnd: HWND; iItem: Integer; var pati: ALTTABINFO;
- pszItemText: LPWSTR; cchItemText: UINT): BOOL; stdcall;
- {$EXTERNALSYM GetAltTabInfoW}
- {$IFDEF UNICODE}
- function GetAltTabInfo(hwnd: HWND; iItem: Integer; var pati: ALTTABINFO;
- pszItemText: LPWSTR; cchItemText: UINT): BOOL; stdcall;
- {$EXTERNALSYM GetAltTabInfo}
- {$ELSE}
- function GetAltTabInfo(hwnd: HWND; iItem: Integer; var pati: ALTTABINFO;
- pszItemText: LPSTR; cchItemText: UINT): BOOL; stdcall;
- {$EXTERNALSYM GetAltTabInfo}
- {$ENDIF}
- //
- // Listbox information.
- // Returns the number of items per row.
- //
- function GetListBoxInfo(hwnd: HWND): DWORD; stdcall;
- {$EXTERNALSYM GetListBoxInfo}
- function LockWorkStation: BOOL; stdcall;
- {$EXTERNALSYM LockWorkStation}
- function UserHandleGrantAccess(hUserHandle, hJob: HANDLE; bGrant: BOOL): BOOL; stdcall;
- {$EXTERNALSYM UserHandleGrantAccess}
- //
- // Raw Input Messages.
- //
- type
- HRAWINPUT = HANDLE;
- {$EXTERNALSYM HRAWINPUT}
- //
- // WM_INPUT wParam
- //
- //
- // Use this macro to get the input code from wParam.
- //
- function GET_RAWINPUT_CODE_WPARAM(wParam: WPARAM): DWORD;
- {$EXTERNALSYM GET_RAWINPUT_CODE_WPARAM}
- //
- // The input is in the regular message flow,
- // the app is required to call DefWindowProc
- // so that the system can perform clean ups.
- //
- const
- RIM_INPUT = 0;
- {$EXTERNALSYM RIM_INPUT}
- //
- // The input is sink only. The app is expected
- // to behave nicely.
- //
- RIM_INPUTSINK = 1;
- {$EXTERNALSYM RIM_INPUTSINK}
- //
- // Raw Input data header
- //
- type
- tagRAWINPUTHEADER = record
- dwType: DWORD;
- dwSize: DWORD;
- hDevice: HANDLE;
- wParam: WPARAM;
- end;
- {$EXTERNALSYM tagRAWINPUTHEADER}
- RAWINPUTHEADER = tagRAWINPUTHEADER;
- {$EXTERNALSYM RAWINPUTHEADER}
- PRAWINPUTHEADER = ^RAWINPUTHEADER;
- {$EXTERNALSYM PRAWINPUTHEADER}
- LPRAWINPUTHEADER = ^RAWINPUTHEADER;
- {$EXTERNALSYM LPRAWINPUTHEADER}
- TRawInputHeader = RAWINPUTHEADER;
- //
- // Type of the raw input
- //
- const
- RIM_TYPEMOUSE = 0;
- {$EXTERNALSYM RIM_TYPEMOUSE}
- RIM_TYPEKEYBOARD = 1;
- {$EXTERNALSYM RIM_TYPEKEYBOARD}
- RIM_TYPEHID = 2;
- {$EXTERNALSYM RIM_TYPEHID}
- //
- // Raw format of the mouse input
- //
- type
- tagRAWMOUSE = record
- //
- // Indicator flags.
- //
- usFlags: USHORT;
- //
- // The transition state of the mouse buttons.
- //
- union: record
- case Integer of
- 0: (
- ulButtons: ULONG);
- 1: (
- usButtonFlags: USHORT;
- usButtonData: USHORT);
- end;
- //
- // The raw state of the mouse buttons.
- //
- ulRawButtons: ULONG;
- //
- // The signed relative or absolute motion in the X direction.
- //
- lLastX: LONG;
- //
- // The signed relative or absolute motion in the Y direction.
- //
- lLastY: LONG;
- //
- // Device-specific additional information for the event.
- //
- ulExtraInformation: ULONG;
- end;
- {$EXTERNALSYM tagRAWMOUSE}
- RAWMOUSE = tagRAWMOUSE;
- {$EXTERNALSYM RAWMOUSE}
- PRAWMOUSE = ^RAWMOUSE;
- {$EXTERNALSYM PRAWMOUSE}
- LPRAWMOUSE = ^RAWMOUSE;
- {$EXTERNALSYM LPRAWMOUSE}
- TRawMouse = RAWMOUSE;
- //
- // Define the mouse button state indicators.
- //
- const
- RI_MOUSE_LEFT_BUTTON_DOWN = $0001; // Left Button changed to down.
- {$EXTERNALSYM RI_MOUSE_LEFT_BUTTON_DOWN}
- RI_MOUSE_LEFT_BUTTON_UP = $0002; // Left Button changed to up.
- {$EXTERNALSYM RI_MOUSE_LEFT_BUTTON_UP}
- RI_MOUSE_RIGHT_BUTTON_DOWN = $0004; // Right Button changed to down.
- {$EXTERNALSYM RI_MOUSE_RIGHT_BUTTON_DOWN}
- RI_MOUSE_RIGHT_BUTTON_UP = $0008; // Right Button changed to up.
- {$EXTERNALSYM RI_MOUSE_RIGHT_BUTTON_UP}
- RI_MOUSE_MIDDLE_BUTTON_DOWN = $0010; // Middle Button changed to down.
- {$EXTERNALSYM RI_MOUSE_MIDDLE_BUTTON_DOWN}
- RI_MOUSE_MIDDLE_BUTTON_UP = $0020; // Middle Button changed to up.
- {$EXTERNALSYM RI_MOUSE_MIDDLE_BUTTON_UP}
- RI_MOUSE_BUTTON_1_DOWN = RI_MOUSE_LEFT_BUTTON_DOWN;
- {$EXTERNALSYM RI_MOUSE_BUTTON_1_DOWN}
- RI_MOUSE_BUTTON_1_UP = RI_MOUSE_LEFT_BUTTON_UP;
- {$EXTERNALSYM RI_MOUSE_BUTTON_1_UP}
- RI_MOUSE_BUTTON_2_DOWN = RI_MOUSE_RIGHT_BUTTON_DOWN;
- {$EXTERNALSYM RI_MOUSE_BUTTON_2_DOWN}
- RI_MOUSE_BUTTON_2_UP = RI_MOUSE_RIGHT_BUTTON_UP;
- {$EXTERNALSYM RI_MOUSE_BUTTON_2_UP}
- RI_MOUSE_BUTTON_3_DOWN = RI_MOUSE_MIDDLE_BUTTON_DOWN;
- {$EXTERNALSYM RI_MOUSE_BUTTON_3_DOWN}
- RI_MOUSE_BUTTON_3_UP = RI_MOUSE_MIDDLE_BUTTON_UP;
- {$EXTERNALSYM RI_MOUSE_BUTTON_3_UP}
- RI_MOUSE_BUTTON_4_DOWN = $0040;
- {$EXTERNALSYM RI_MOUSE_BUTTON_4_DOWN}
- RI_MOUSE_BUTTON_4_UP = $0080;
- {$EXTERNALSYM RI_MOUSE_BUTTON_4_UP}
- RI_MOUSE_BUTTON_5_DOWN = $0100;
- {$EXTERNALSYM RI_MOUSE_BUTTON_5_DOWN}
- RI_MOUSE_BUTTON_5_UP = $0200;
- {$EXTERNALSYM RI_MOUSE_BUTTON_5_UP}
- //
- // If usButtonFlags has RI_MOUSE_WHEEL, the wheel delta is stored in usButtonData.
- // Take it as a signed value.
- //
- RI_MOUSE_WHEEL = $0400;
- {$EXTERNALSYM RI_MOUSE_WHEEL}
- //
- // Define the mouse indicator flags.
- //
- MOUSE_MOVE_RELATIVE = 0;
- {$EXTERNALSYM MOUSE_MOVE_RELATIVE}
- MOUSE_MOVE_ABSOLUTE = 1;
- {$EXTERNALSYM MOUSE_MOVE_ABSOLUTE}
- MOUSE_VIRTUAL_DESKTOP = $02; // the coordinates are mapped to the virtual desktop
- {$EXTERNALSYM MOUSE_VIRTUAL_DESKTOP}
- MOUSE_ATTRIBUTES_CHANGED = $04; // requery for mouse attributes
- {$EXTERNALSYM MOUSE_ATTRIBUTES_CHANGED}
- //
- // Raw format of the keyboard input
- //
- type
- tagRAWKEYBOARD = record
- //
- // The "make" scan code (key depression).
- //
- MakeCode: USHORT;
- //
- // The flags field indicates a "break" (key release) and other
- // miscellaneous scan code information defined in ntddkbd.h.
- //
- Flags: USHORT;
- Reserved: USHORT;
- //
- // Windows message compatible information
- //
- VKey: USHORT;
- Message: UINT;
- //
- // Device-specific additional information for the event.
- //
- ExtraInformation: ULONG;
- end;
- {$EXTERNALSYM tagRAWKEYBOARD}
- RAWKEYBOARD = tagRAWKEYBOARD;
- {$EXTERNALSYM RAWKEYBOARD}
- PRAWKEYBOARD = ^RAWKEYBOARD;
- {$EXTERNALSYM PRAWKEYBOARD}
- LPRAWKEYBOARD = ^RAWKEYBOARD;
- {$EXTERNALSYM LPRAWKEYBOARD}
- TRawKeyBoard = RAWKEYBOARD;
- //
- // Define the keyboard overrun MakeCode.
- //
- const
- KEYBOARD_OVERRUN_MAKE_CODE = $FF;
- {$EXTERNALSYM KEYBOARD_OVERRUN_MAKE_CODE}
- //
- // Define the keyboard input data Flags.
- //
- RI_KEY_MAKE = 0;
- {$EXTERNALSYM RI_KEY_MAKE}
- RI_KEY_BREAK = 1;
- {$EXTERNALSYM RI_KEY_BREAK}
- RI_KEY_E0 = 2;
- {$EXTERNALSYM RI_KEY_E0}
- RI_KEY_E1 = 4;
- {$EXTERNALSYM RI_KEY_E1}
- RI_KEY_TERMSRV_SET_LED = 8;
- {$EXTERNALSYM RI_KEY_TERMSRV_SET_LED}
- RI_KEY_TERMSRV_SHADOW = $10;
- {$EXTERNALSYM RI_KEY_TERMSRV_SHADOW}
- //
- // Raw format of the input from Human Input Devices
- //
- type
- tagRAWHID = record
- dwSizeHid: DWORD; // byte size of each report
- dwCount: DWORD; // number of input packed
- bRawData: array [0..0] of BYTE;
- end;
- {$EXTERNALSYM tagRAWHID}
- RAWHID = tagRAWHID;
- {$EXTERNALSYM RAWHID}
- PRAWHID = ^RAWHID;
- {$EXTERNALSYM PRAWHID}
- LPRAWHID = ^RAWHID;
- {$EXTERNALSYM LPRAWHID}
- TRawHid = RAWHID;
- //
- // RAWINPUT data structure.
- //
- tagRAWINPUT = record
- header: RAWINPUTHEADER;
- case Integer of
- 0: (mouse: RAWMOUSE);
- 1: (keyboard: RAWKEYBOARD);
- 2: (hid: RAWHID);
- end;
- {$EXTERNALSYM tagRAWINPUT}
- RAWINPUT = tagRAWINPUT;
- {$EXTERNALSYM RAWINPUT}
- PRAWINPUT = ^RAWINPUT;
- {$EXTERNALSYM PRAWINPUT}
- LPRAWINPUT = ^RAWINPUT;
- {$EXTERNALSYM LPRAWINPUT}
- TRawInput = RAWINPUT;
- function RAWINPUT_ALIGN(x: Pointer): Pointer;
- {$EXTERNALSYM RAWINPUT_ALIGN}
- function NEXTRAWINPUTBLOCK(ptr: PRawInput): PRawInput;
- {$EXTERNALSYM NEXTRAWINPUTBLOCK}
- //
- // Flags for GetRawInputData
- //
- const
- RID_INPUT = $10000003;
- {$EXTERNALSYM RID_INPUT}
- RID_HEADER = $10000005;
- {$EXTERNALSYM RID_HEADER}
- function GetRawInputData(hRawInput: HRAWINPUT; uiCommand: UINT; pData: LPVOID;
- var pcbSize: UINT; cbSizeHeader: UINT): UINT; stdcall;
- {$EXTERNALSYM GetRawInputData}
- //
- // Raw Input Device Information
- //
- const
- RIDI_PREPARSEDDATA = $20000005;
- {$EXTERNALSYM RIDI_PREPARSEDDATA}
- RIDI_DEVICENAME = $20000007; // the return valus is the character length, not the byte size
- {$EXTERNALSYM RIDI_DEVICENAME}
- RIDI_DEVICEINFO = $2000000b;
- {$EXTERNALSYM RIDI_DEVICEINFO}
- type
- PRID_DEVICE_INFO_MOUSE = ^RID_DEVICE_INFO_MOUSE;
- {$EXTERNALSYM PRID_DEVICE_INFO_MOUSE}
- tagRID_DEVICE_INFO_MOUSE = record
- dwId: DWORD;
- dwNumberOfButtons: DWORD;
- dwSampleRate: DWORD;
- end;
- {$EXTERNALSYM tagRID_DEVICE_INFO_MOUSE}
- RID_DEVICE_INFO_MOUSE = tagRID_DEVICE_INFO_MOUSE;
- {$EXTERNALSYM RID_DEVICE_INFO_MOUSE}
- TRidDeviceInfoMouse = RID_DEVICE_INFO_MOUSE;
- PRidDeviceInfoMouse = PRID_DEVICE_INFO_MOUSE;
- PRID_DEVICE_INFO_KEYBOARD = ^RID_DEVICE_INFO_KEYBOARD;
- {$EXTERNALSYM PRID_DEVICE_INFO_KEYBOARD}
- tagRID_DEVICE_INFO_KEYBOARD = record
- dwType: DWORD;
- dwSubType: DWORD;
- dwKeyboardMode: DWORD;
- dwNumberOfFunctionKeys: DWORD;
- dwNumberOfIndicators: DWORD;
- dwNumberOfKeysTotal: DWORD;
- end;
- {$EXTERNALSYM tagRID_DEVICE_INFO_KEYBOARD}
- RID_DEVICE_INFO_KEYBOARD = tagRID_DEVICE_INFO_KEYBOARD;
- {$EXTERNALSYM RID_DEVICE_INFO_KEYBOARD}
- TRidDeviceInfoKeyboard = RID_DEVICE_INFO_KEYBOARD;
- PRidDeviceInfoKeyboard = PRID_DEVICE_INFO_KEYBOARD;
- PRID_DEVICE_INFO_HID = ^RID_DEVICE_INFO_HID;
- {$EXTERNALSYM PRID_DEVICE_INFO_HID}
- tagRID_DEVICE_INFO_HID = record
- dwVendorId: DWORD;
- dwProductId: DWORD;
- dwVersionNumber: DWORD;
- //
- // Top level collection UsagePage and Usage
- //
- usUsagePage: USHORT;
- usUsage: USHORT;
- end;
- {$EXTERNALSYM tagRID_DEVICE_INFO_HID}
- RID_DEVICE_INFO_HID = tagRID_DEVICE_INFO_HID;
- {$EXTERNALSYM RID_DEVICE_INFO_HID}
- TRidDeviceInfoHid = RID_DEVICE_INFO_HID;
- PRidDeviceInfoHid = PRID_DEVICE_INFO_HID;
- tagRID_DEVICE_INFO = record
- cbSize: DWORD;
- dwType: DWORD;
- case Integer of
- 0: (mouse: RID_DEVICE_INFO_MOUSE);
- 1: (keyboard: RID_DEVICE_INFO_KEYBOARD);
- 2: (hid: RID_DEVICE_INFO_HID);
- end;
- {$EXTERNALSYM tagRID_DEVICE_INFO}
- RID_DEVICE_INFO = tagRID_DEVICE_INFO;
- {$EXTERNALSYM RID_DEVICE_INFO}
- PRID_DEVICE_INFO = ^RID_DEVICE_INFO;
- {$EXTERNALSYM PRID_DEVICE_INFO}
- LPRID_DEVICE_INFO = ^RID_DEVICE_INFO;
- {$EXTERNALSYM LPRID_DEVICE_INFO}
- TRidDeviceInfo = RID_DEVICE_INFO;
- PRidDeviceInfo = PRID_DEVICE_INFO;
- function GetRawInputDeviceInfoA(hDevice: HANDLE; uiCommand: UINT; pData: LPVOID;
- var pcbSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetRawInputDeviceInfoA}
- function GetRawInputDeviceInfoW(hDevice: HANDLE; uiCommand: UINT; pData: LPVOID;
- var pcbSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetRawInputDeviceInfoW}
- {$IFDEF UNICODE}
- function GetRawInputDeviceInfo(hDevice: HANDLE; uiCommand: UINT; pData: LPVOID;
- var pcbSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetRawInputDeviceInfo}
- {$ELSE}
- function GetRawInputDeviceInfo(hDevice: HANDLE; uiCommand: UINT; pData: LPVOID;
- var pcbSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetRawInputDeviceInfo}
- {$ENDIF}
- //
- // Raw Input Bulk Read: GetRawInputBuffer
- //
- function GetRawInputBuffer(pData: PRAWINPUT; var pcbSize: UINT; cbSizeHeader: UINT): UINT; stdcall;
- {$EXTERNALSYM GetRawInputBuffer}
- //
- // Raw Input request APIs
- //
- type
- LPRAWINPUTDEVICE = ^RAWINPUTDEVICE;
- {$EXTERNALSYM LPRAWINPUTDEVICE}
- PRAWINPUTDEVICE = ^RAWINPUTDEVICE;
- {$EXTERNALSYM PRAWINPUTDEVICE}
- tagRAWINPUTDEVICE = record
- usUsagePage: USHORT; // Toplevel collection UsagePage
- usUsage: USHORT; // Toplevel collection Usage
- dwFlags: DWORD;
- hwndTarget: HWND; // Target hwnd. NULL = follows keyboard focus
- end;
- {$EXTERNALSYM tagRAWINPUTDEVICE}
- RAWINPUTDEVICE = tagRAWINPUTDEVICE;
- {$EXTERNALSYM RAWINPUTDEVICE}
- TRawInputDevice = RAWINPUTDEVICE;
- const
- RIDEV_REMOVE = $00000001;
- {$EXTERNALSYM RIDEV_REMOVE}
- RIDEV_EXCLUDE = $00000010;
- {$EXTERNALSYM RIDEV_EXCLUDE}
- RIDEV_PAGEONLY = $00000020;
- {$EXTERNALSYM RIDEV_PAGEONLY}
- RIDEV_NOLEGACY = $00000030;
- {$EXTERNALSYM RIDEV_NOLEGACY}
- RIDEV_INPUTSINK = $00000100;
- {$EXTERNALSYM RIDEV_INPUTSINK}
- RIDEV_CAPTUREMOUSE = $00000200; // effective when mouse nolegacy is specified, otherwise it would be an error
- {$EXTERNALSYM RIDEV_CAPTUREMOUSE}
- RIDEV_NOHOTKEYS = $00000200; // effective for keyboard.
- {$EXTERNALSYM RIDEV_NOHOTKEYS}
- RIDEV_APPKEYS = $00000400; // effective for keyboard.
- {$EXTERNALSYM RIDEV_APPKEYS}
- RIDEV_EXMODEMASK = $000000F0;
- {$EXTERNALSYM RIDEV_EXMODEMASK}
- function RIDEV_EXMODE(mode: DWORD): DWORD;
- {$EXTERNALSYM RIDEV_EXMODE}
- function RegisterRawInputDevices(pRawInputDevices: PRAWINPUTDEVICE;
- uiNumDevices: UINT; cbSize: UINT): BOOL; stdcall;
- {$EXTERNALSYM RegisterRawInputDevices}
- function GetRegisteredRawInputDevices(pRawInputDevices: PRAWINPUTDEVICE;
- var puiNumDevices: UINT; cbSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetRegisteredRawInputDevices}
- type
- PRAWINPUTDEVICELIST = ^RAWINPUTDEVICELIST;
- {$EXTERNALSYM PRAWINPUTDEVICELIST}
- tagRAWINPUTDEVICELIST = record
- hDevice: HANDLE;
- dwType: DWORD;
- end;
- {$EXTERNALSYM tagRAWINPUTDEVICELIST}
- RAWINPUTDEVICELIST = tagRAWINPUTDEVICELIST;
- {$EXTERNALSYM RAWINPUTDEVICELIST}
- TRawInputDeviceList = RAWINPUTDEVICELIST;
- function GetRawInputDeviceList(pRawInputDeviceList: PRAWINPUTDEVICELIST; var puiNumDevices: UINT;
- cbSize: UINT): UINT; stdcall;
- {$EXTERNALSYM GetRawInputDeviceList}
- function DefRawInputProc(paRawInput: PRAWINPUT; nInput: Integer; cbSizeHeader: UINT): LRESULT; stdcall;
- {$EXTERNALSYM DefRawInputProc}
- implementation
- const
- user32 = 'user32.dll';
- function IS_INTRESOURCE(wInteger: WORD): BOOL;
- begin
- Result := (ULONG_PTR(wInteger) shr 16) = 0;
- end;
- function GET_WHEEL_DELTA_WPARAM(wParam: WPARAM): SHORT;
- begin
- Result := SHORT(HIWORD(wParam));
- end;
- function GET_KEYSTATE_WPARAM(wParam: WPARAM): Integer;
- begin
- Result := LOWORD(wParam);
- end;
- function GET_NCHITTEST_WPARAM(wParam: WPARAM): Shortint;
- begin
- Result := LOWORD(wParam);
- end;
- function GET_XBUTTON_WPARAM(wParam: WPARAM): Integer;
- begin
- Result := HIWORD(wParam);
- end;
- function GET_APPCOMMAND_LPARAM(lParam: LPARAM): Shortint;
- begin
- Result := Shortint(HIWORD(lParam) and not FAPPCOMMAND_MASK);
- end;
- function GET_DEVICE_LPARAM(lParam: LPARAM): WORD;
- begin
- Result := WORD(HIWORD(lParam) and FAPPCOMMAND_MASK);
- end;
- function GET_MOUSEORKEY_LPARAM(lParam: LPARAM): WORD;
- begin
- Result := GET_DEVICE_LPARAM(lParam);
- end;
- function GET_FLAGS_LPARAM(lParam: LPARAM): Integer;
- begin
- Result := LOWORD(lParam);
- end;
- function GET_KEYSTATE_LPARAM(lParam: LPARAM): Integer;
- begin
- Result := GET_FLAGS_LPARAM(lParam);
- end;
- function MAKEWPARAM(wLow, wHigh: WORD): WPARAM;
- begin
- Result := WPARAM(DWORD(MAKELONG(wLow, wHigh)));
- end;
- function MAKELPARAM(wLow, wHigh: WORD): LPARAM;
- begin
- Result := LPARAM(DWORD(MAKELONG(wLow, wHigh)));
- end;
- function MAKELRESULT(wLow, wHigh: WORD): LRESULT;
- begin
- Result := LRESULT(DWORD(MAKELONG(wLow, wHigh)));
- end;
- function ExitWindows(dwReserved: DWORD; uREserved: UINT): BOOL;
- begin
- Result := ExitWindowsEx(EWX_LOGOFF, $FFFFFFFF);
- end;
- function PostAppMessageA(idThread: DWORD; wMsg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL;
- begin
- Result := PostThreadMessageA(idThread, wMsg, wParam, lParam);
- end;
- function PostAppMessageW(idThread: DWORD; wMsg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL;
- begin
- Result := PostThreadMessageW(idThread, wMsg, wParam, lParam);
- end;
- {$IFDEF UNICODE}
- function PostAppMessage(idThread: DWORD; wMsg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL;
- begin
- Result := PostThreadMessageW(idThread, wMsg, wParam, lParam);
- end;
- {$ELSE}
- function PostAppMessage(idThread: DWORD; wMsg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL;
- begin
- Result := PostThreadMessageA(idThread, wMsg, wParam, lParam);
- end;
- {$ENDIF}
- function CreateWindowA(lpClassName: LPCSTR; lpWindowName: LPCSTR; dwStyle: DWORD;
- x, y, nWidth, nHeight: Integer; hWndParent: HWND; hMenu: HMENU;
- hInstance: HINSTANCE; lpParam: LPVOID): HWND;
- begin
- Result := CreateWindowExA(0, lpClassName, lpWindowName, dwStyle, x, y,
- nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
- end;
- function CreateWindowW(lpClassName: LPCWSTR; lpWindowName: LPCWSTR; dwStyle: DWORD;
- x, y, nWidth, nHeight: Integer; hWndParent: HWND; hMenu: HMENU;
- hInstance: HINSTANCE; lpParam: LPVOID): HWND;
- begin
- Result := CreateWindowExW(0, lpClassName, lpWindowName, dwStyle, x, y,
- nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
- end;
- {$IFDEF UNICODE}
- function CreateWindow(lpClassName: LPCWSTR; lpWindowName: LPCWSTR; dwStyle: DWORD;
- x, y, nWidth, nHeight: Integer; hWndParent: HWND; hMenu: HMENU;
- hInstance: HINSTANCE; lpParam: LPVOID): HWND;
- begin
- Result := CreateWindowExW(0, lpClassName, lpWindowName, dwStyle, x, y,
- nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
- end;
- {$ELSE}
- function CreateWindow(lpClassName: LPCSTR; lpWindowName: LPCSTR; dwStyle: DWORD;
- x, y, nWidth, nHeight: Integer; hWndParent: HWND; hMenu: HMENU;
- hInstance: HINSTANCE; lpParam: LPVOID): HWND;
- begin
- Result := CreateWindowExA(0, lpClassName, lpWindowName, dwStyle, x, y,
- nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
- end;
- {$ENDIF}
- function CreateDialogA(hInstance: HINSTANCE; lpName: LPCSTR; hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
- begin
- Result := CreateDialogParamA(hInstance, lpName, hWndParent, lpDialogFunc, 0);
- end;
- function CreateDialogW(hInstance: HINSTANCE; lpName: LPCWSTR; hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
- begin
- Result := CreateDialogParamW(hInstance, lpName, hWndParent, lpDialogFunc, 0);
- end;
- {$IFDEF UNICODE}
- function CreateDialog(hInstance: HINSTANCE; lpName: LPCWSTR; hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
- begin
- Result := CreateDialogParamW(hInstance, lpName, hWndParent, lpDialogFunc, 0);
- end;
- {$ELSE}
- function CreateDialog(hInstance: HINSTANCE; lpName: LPCSTR; hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
- begin
- Result := CreateDialogParamA(hInstance, lpName, hWndParent, lpDialogFunc, 0);
- end;
- {$ENDIF}
- function CreateDialogIndirectA(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
- hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
- begin
- Result := CreateDialogIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
- end;
- function CreateDialogIndirectW(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
- hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
- begin
- Result := CreateDialogIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
- end;
- {$IFDEF UNICODE}
- function CreateDialogIndirect(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
- hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
- begin
- Result := CreateDialogIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
- end;
- {$ELSE}
- function CreateDialogIndirect(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
- hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
- begin
- Result := CreateDialogIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
- end;
- {$ENDIF}
- function DialogBoxA(hInstance: HINSTANCE; lpTemplate: LPCSTR; hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
- begin
- Result := DialogBoxParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
- end;
- function DialogBoxW(hInstance: HINSTANCE; lpTemplate: LPCWSTR; hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
- begin
- Result := DialogBoxParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
- end;
- {$IFDEF UNICODE}
- function DialogBox(hInstance: HINSTANCE; lpTemplate: LPCWSTR; hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
- begin
- Result := DialogBoxParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
- end;
- {$ELSE}
- function DialogBox(hInstance: HINSTANCE; lpTemplate: LPCSTR; hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
- begin
- Result := DialogBoxParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
- end;
- {$ENDIF}
- function DialogBoxIndirectA(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE; hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
- begin
- Result := DialogBoxIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
- end;
- function DialogBoxIndirectW(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE; hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
- begin
- Result := DialogBoxIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
- end;
- {$IFDEF UNICODE}
- function DialogBoxIndirect(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE; hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
- begin
- Result := DialogBoxIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
- end;
- {$ELSE}
- function DialogBoxIndirect(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE; hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
- begin
- Result := DialogBoxIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
- end;
- {$ENDIF}
- function AnsiToOem(lpszSrc: LPCSTR; lpszDst: LPSTR): BOOL;
- begin
- Result := CharToOemA(lpszSrc, lpszDst);
- end;
- function OemToAnsi(lpszSrc: LPCSTR; lpszDst: LPSTR): BOOL;
- begin
- Result := OemToCharA(lpszSrc, lpszDst);
- end;
- function AnsiToOemBuff(lpszSrc: LPCSTR; lpszDst: LPSTR; cchDstLength: DWORD): BOOL;
- begin
- Result := CharToOemBuffA(lpszSrc, lpszDst, cchDstLength);
- end;
- function OemToAnsiBuff(lpszSrc: LPCSTR; lpszDst: LPSTR; cchDstLength: DWORD): BOOL;
- begin
- Result := OemToCharBuffA(lpszSrc, lpszDst, cchDstLength);
- end;
- function AnsiUpper(lpsz: LPSTR): LPSTR;
- begin
- Result := CharUpperA(lpsz);
- end;
- function AnsiUpperBuff(lpsz: LPSTR; cchLength: DWORD): DWORD;
- begin
- Result := CharUpperBuffA(lpsz, cchLength);
- end;
- function AnsiLower(lpsz: LPSTR): LPSTR;
- begin
- Result := CharLowerA(lpsz);
- end;
- function AnsiLowerBuff(lpsz: LPSTR; cchLength: DWORD): DWORD;
- begin
- Result := CharLowerBuffA(lpsz, cchLength);
- end;
- function AnsiNext(lpsz: LPCSTR): LPSTR;
- begin
- Result := CharNextA(lpsz);
- end;
- function AnsiPrev(lpszStart: LPCSTR; lpszCurrent: LPCSTR): LPSTR;
- begin
- Result := CharPrevA(lpszStart, lpszCurrent);
- end;
- function GetWindowLongPtrA(hWnd: HWND; nIndex: Integer): LONG_PTR;
- begin
- Result := GetWindowLongA(hWnd, nIndex);
- end;
- function GetWindowLongPtrW(hWnd: HWND; nIndex: Integer): LONG_PTR;
- begin
- Result := GetWindowLongW(hWnd, nIndex);
- end;
- {$IFDEF UNICODE}
- function GetWindowLongPtr(hWnd: HWND; nIndex: Integer): LONG_PTR;
- begin
- Result := GetWindowLongW(hWnd, nIndex);
- end;
- {$ELSE}
- function GetWindowLongPtr(hWnd: HWND; nIndex: Integer): LONG_PTR;
- begin
- Result := GetWindowLongA(hWnd, nIndex);
- end;
- {$ENDIF}
- function SetWindowLongPtrA(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): LONG_PTR;
- begin
- Result := SetWindowLongA(hWnd, nIndex, dwNewLong);
- end;
- function SetWindowLongPtrW(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): LONG_PTR;
- begin
- Result := SetWindowLongW(hWnd, nIndex, dwNewLong);
- end;
- {$IFDEF UNICODE}
- function SetWindowLongPtr(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): LONG_PTR;
- begin
- Result := SetWindowLongW(hWnd, nIndex, dwNewLong);
- end;
- {$ELSE}
- function SetWindowLongPtr(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): LONG_PTR;
- begin
- Result := SetWindowLongA(hWnd, nIndex, dwNewLong);
- end;
- {$ENDIF}
- function GetClassLongPtrA(hWnd: HWND; nIndex: Integer): ULONG_PTR;
- begin
- Result := GetClassLongA(hWnd, nIndex);
- end;
- function GetClassLongPtrW(hWnd: HWND; nIndex: Integer): ULONG_PTR;
- begin
- Result := GetClassLongW(hWnd, nIndex);
- end;
- {$IFDEF UNICODE}
- function GetClassLongPtr(hWnd: HWND; nIndex: Integer): ULONG_PTR;
- begin
- Result := GetClassLongW(hWnd, nIndex);
- end;
- {$ELSE}
- function GetClassLongPtr(hWnd: HWND; nIndex: Integer): ULONG_PTR;
- begin
- Result := GetClassLongA(hWnd, nIndex);
- end;
- {$ENDIF}
- function SetClassLongPtrA(hWnd: HWND; nIndex: Integer; dwNewLong: ULONG_PTR): ULONG_PTR;
- begin
- Result := SetClassLongA(hWnd, nIndex, dwNewLong);
- end;
- function SetClassLongPtrW(hWnd: HWND; nIndex: Integer; dwNewLong: ULONG_PTR): ULONG_PTR;
- begin
- Result := SetClassLongW(hWnd, nIndex, dwNewLong);
- end;
- {$IFDEF UNICODE}
- function SetClassLongPtr(hWnd: HWND; nIndex: Integer; dwNewLong: ULONG_PTR): ULONG_PTR;
- begin
- Result := SetClassLongW(hWnd, nIndex, dwNewLong);
- end;
- {$ELSE}
- function SetClassLongPtr(hWnd: HWND; nIndex: Integer; dwNewLong: ULONG_PTR): ULONG_PTR;
- begin
- Result := SetClassLongA(hWnd, nIndex, dwNewLong);
- end;
- {$ENDIF}
- function EnumTaskWindows(hTask: HANDLE; lpfn: WNDENUMPROC; lParam: LPARAM): BOOL;
- begin
- Result := EnumThreadWindows(ULONG(hTask), lpfn, lParam);
- end;
- function GetNextWindow(hWnd: HWND; wCmd: UINT): HWND;
- begin
- Result := GetWindow(hWnd, wCmd);
- end;
- function GetWindowTask(hWnd: HWND): HANDLE;
- begin
- Result := HANDLE(DWORD_PTR(GetWindowThreadProcessId(hWnd, nil)));
- end;
- function DefHookProc(nCode: Integer; wParam: WPARAM; lParam: LPARAM; phhk: LPHHOOK): LRESULT;
- begin
- Result := CallNextHookEx(HHOOK(phhk^), nCode, wParam, lParam);
- end;
- function CopyCursor(pcur: HCURSOR): HCURSOR;
- begin
- Result := HCURSOR(CopyIcon(HICON(pcur)));
- end;
- {$IFDEF DYNAMIC_LINK}
- var
- _IsHungAppWindow: Pointer;
- function IsHungAppWindow;
- begin
- GetProcedureAddress(_IsHungAppWindow, user32, 'IsHungAppWindow');
- asm
- mov esp, ebp
- pop ebp
- jmp [_IsHungAppWindow]
- end;
- end;
- {$ELSE}
- function IsHungAppWindow; external user32 name 'IsHungAppWindow';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _wvsprintfA: Pointer;
- function wvsprintfA;
- begin
- GetProcedureAddress(_wvsprintfA, user32, 'wvsprintfA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_wvsprintfA]
- end;
- end;
- {$ELSE}
- function wvsprintfA; external user32 name 'wvsprintfA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _wvsprintfW: Pointer;
- function wvsprintfW;
- begin
- GetProcedureAddress(_wvsprintfW, user32, 'wvsprintfW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_wvsprintfW]
- end;
- end;
- {$ELSE}
- function wvsprintfW; external user32 name 'wvsprintfW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _wvsprintf: Pointer;
- function wvsprintf;
- begin
- GetProcedureAddress(_wvsprintf, user32, 'wvsprintfW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_wvsprintf]
- end;
- end;
- {$ELSE}
- function wvsprintf; external user32 name 'wvsprintfW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _wvsprintf: Pointer;
- function wvsprintf;
- begin
- GetProcedureAddress(_wvsprintf, user32, 'wvsprintfA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_wvsprintf]
- end;
- end;
- {$ELSE}
- function wvsprintf; external user32 name 'wvsprintfA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _wsprintfA: Pointer;
- function wsprintfA;
- begin
- GetProcedureAddress(_wsprintfA, user32, 'wsprintfA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_wsprintfA]
- end;
- end;
- {$ELSE}
- function wsprintfA; external user32 name 'wsprintfA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _wsprintfW: Pointer;
- function wsprintfW;
- begin
- GetProcedureAddress(_wsprintfW, user32, 'wsprintfW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_wsprintfW]
- end;
- end;
- {$ELSE}
- function wsprintfW; external user32 name 'wsprintfW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _wsprintf: Pointer;
- function wsprintf;
- begin
- GetProcedureAddress(_wsprintf, user32, 'wsprintfW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_wsprintf]
- end;
- end;
- {$ELSE}
- function wsprintf; external user32 name 'wsprintfW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _wsprintf: Pointer;
- function wsprintf;
- begin
- GetProcedureAddress(_wsprintf, user32, 'wsprintfA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_wsprintf]
- end;
- end;
- {$ELSE}
- function wsprintf; external user32 name 'wsprintfA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _LoadKeyboardLayoutA: Pointer;
- function LoadKeyboardLayoutA;
- begin
- GetProcedureAddress(_LoadKeyboardLayoutA, user32, 'LoadKeyboardLayoutA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_LoadKeyboardLayoutA]
- end;
- end;
- {$ELSE}
- function LoadKeyboardLayoutA; external user32 name 'LoadKeyboardLayoutA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _LoadKeyboardLayoutW: Pointer;
- function LoadKeyboardLayoutW;
- begin
- GetProcedureAddress(_LoadKeyboardLayoutW, user32, 'LoadKeyboardLayoutW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_LoadKeyboardLayoutW]
- end;
- end;
- {$ELSE}
- function LoadKeyboardLayoutW; external user32 name 'LoadKeyboardLayoutW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _LoadKeyboardLayout: Pointer;
- function LoadKeyboardLayout;
- begin
- GetProcedureAddress(_LoadKeyboardLayout, user32, 'LoadKeyboardLayoutW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_LoadKeyboardLayout]
- end;
- end;
- {$ELSE}
- function LoadKeyboardLayout; external user32 name 'LoadKeyboardLayoutW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _LoadKeyboardLayout: Pointer;
- function LoadKeyboardLayout;
- begin
- GetProcedureAddress(_LoadKeyboardLayout, user32, 'LoadKeyboardLayoutA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_LoadKeyboardLayout]
- end;
- end;
- {$ELSE}
- function LoadKeyboardLayout; external user32 name 'LoadKeyboardLayoutA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _ActivateKeyboardLayout: Pointer;
- function ActivateKeyboardLayout;
- begin
- GetProcedureAddress(_ActivateKeyboardLayout, user32, 'ActivateKeyboardLayout');
- asm
- mov esp, ebp
- pop ebp
- jmp [_ActivateKeyboardLayout]
- end;
- end;
- {$ELSE}
- function ActivateKeyboardLayout; external user32 name 'ActivateKeyboardLayout';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _ToUnicodeEx: Pointer;
- function ToUnicodeEx;
- begin
- GetProcedureAddress(_ToUnicodeEx, user32, 'ToUnicodeEx');
- asm
- mov esp, ebp
- pop ebp
- jmp [_ToUnicodeEx]
- end;
- end;
- {$ELSE}
- function ToUnicodeEx; external user32 name 'ToUnicodeEx';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _UnloadKeyboardLayout: Pointer;
- function UnloadKeyboardLayout;
- begin
- GetProcedureAddress(_UnloadKeyboardLayout, user32, 'UnloadKeyboardLayout');
- asm
- mov esp, ebp
- pop ebp
- jmp [_UnloadKeyboardLayout]
- end;
- end;
- {$ELSE}
- function UnloadKeyboardLayout; external user32 name 'UnloadKeyboardLayout';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetKeyboardLayoutNameA: Pointer;
- function GetKeyboardLayoutNameA;
- begin
- GetProcedureAddress(_GetKeyboardLayoutNameA, user32, 'GetKeyboardLayoutNameA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetKeyboardLayoutNameA]
- end;
- end;
- {$ELSE}
- function GetKeyboardLayoutNameA; external user32 name 'GetKeyboardLayoutNameA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetKeyboardLayoutNameW: Pointer;
- function GetKeyboardLayoutNameW;
- begin
- GetProcedureAddress(_GetKeyboardLayoutNameW, user32, 'GetKeyboardLayoutNameW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetKeyboardLayoutNameW]
- end;
- end;
- {$ELSE}
- function GetKeyboardLayoutNameW; external user32 name 'GetKeyboardLayoutNameW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetKeyboardLayoutName: Pointer;
- function GetKeyboardLayoutName;
- begin
- GetProcedureAddress(_GetKeyboardLayoutName, user32, 'GetKeyboardLayoutNameW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetKeyboardLayoutName]
- end;
- end;
- {$ELSE}
- function GetKeyboardLayoutName; external user32 name 'GetKeyboardLayoutNameW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetKeyboardLayoutName: Pointer;
- function GetKeyboardLayoutName;
- begin
- GetProcedureAddress(_GetKeyboardLayoutName, user32, 'GetKeyboardLayoutNameA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetKeyboardLayoutName]
- end;
- end;
- {$ELSE}
- function GetKeyboardLayoutName; external user32 name 'GetKeyboardLayoutNameA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetKeyboardLayoutList: Pointer;
- function GetKeyboardLayoutList;
- begin
- GetProcedureAddress(_GetKeyboardLayoutList, user32, 'GetKeyboardLayoutList');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetKeyboardLayoutList]
- end;
- end;
- {$ELSE}
- function GetKeyboardLayoutList; external user32 name 'GetKeyboardLayoutList';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetKeyboardLayout: Pointer;
- function GetKeyboardLayout;
- begin
- GetProcedureAddress(_GetKeyboardLayout, user32, 'GetKeyboardLayout');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetKeyboardLayout]
- end;
- end;
- {$ELSE}
- function GetKeyboardLayout; external user32 name 'GetKeyboardLayout';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetMouseMovePointsEx: Pointer;
- function GetMouseMovePointsEx;
- begin
- GetProcedureAddress(_GetMouseMovePointsEx, user32, 'GetMouseMovePointsEx');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetMouseMovePointsEx]
- end;
- end;
- {$ELSE}
- function GetMouseMovePointsEx; external user32 name 'GetMouseMovePointsEx';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _CreateDesktopA: Pointer;
- function CreateDesktopA;
- begin
- GetProcedureAddress(_CreateDesktopA, user32, 'CreateDesktopA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CreateDesktopA]
- end;
- end;
- {$ELSE}
- function CreateDesktopA; external user32 name 'CreateDesktopA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _CreateDesktopW: Pointer;
- function CreateDesktopW;
- begin
- GetProcedureAddress(_CreateDesktopW, user32, 'CreateDesktopW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CreateDesktopW]
- end;
- end;
- {$ELSE}
- function CreateDesktopW; external user32 name 'CreateDesktopW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _CreateDesktop: Pointer;
- function CreateDesktop;
- begin
- GetProcedureAddress(_CreateDesktop, user32, 'CreateDesktopW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CreateDesktop]
- end;
- end;
- {$ELSE}
- function CreateDesktop; external user32 name 'CreateDesktopW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _CreateDesktop: Pointer;
- function CreateDesktop;
- begin
- GetProcedureAddress(_CreateDesktop, user32, 'CreateDesktopA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CreateDesktop]
- end;
- end;
- {$ELSE}
- function CreateDesktop; external user32 name 'CreateDesktopA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _OpenDesktopA: Pointer;
- function OpenDesktopA;
- begin
- GetProcedureAddress(_OpenDesktopA, user32, 'OpenDesktopA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_OpenDesktopA]
- end;
- end;
- {$ELSE}
- function OpenDesktopA; external user32 name 'OpenDesktopA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _OpenDesktopW: Pointer;
- function OpenDesktopW;
- begin
- GetProcedureAddress(_OpenDesktopW, user32, 'OpenDesktopW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_OpenDesktopW]
- end;
- end;
- {$ELSE}
- function OpenDesktopW; external user32 name 'OpenDesktopW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _OpenDesktop: Pointer;
- function OpenDesktop;
- begin
- GetProcedureAddress(_OpenDesktop, user32, 'OpenDesktopW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_OpenDesktop]
- end;
- end;
- {$ELSE}
- function OpenDesktop; external user32 name 'OpenDesktopW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _OpenDesktop: Pointer;
- function OpenDesktop;
- begin
- GetProcedureAddress(_OpenDesktop, user32, 'OpenDesktopA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_OpenDesktop]
- end;
- end;
- {$ELSE}
- function OpenDesktop; external user32 name 'OpenDesktopA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _OpenInputDesktop: Pointer;
- function OpenInputDesktop;
- begin
- GetProcedureAddress(_OpenInputDesktop, user32, 'OpenInputDesktop');
- asm
- mov esp, ebp
- pop ebp
- jmp [_OpenInputDesktop]
- end;
- end;
- {$ELSE}
- function OpenInputDesktop; external user32 name 'OpenInputDesktop';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _EnumDesktopsA: Pointer;
- function EnumDesktopsA;
- begin
- GetProcedureAddress(_EnumDesktopsA, user32, 'EnumDesktopsA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_EnumDesktopsA]
- end;
- end;
- {$ELSE}
- function EnumDesktopsA; external user32 name 'EnumDesktopsA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _EnumDesktopsW: Pointer;
- function EnumDesktopsW;
- begin
- GetProcedureAddress(_EnumDesktopsW, user32, 'EnumDesktopsW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_EnumDesktopsW]
- end;
- end;
- {$ELSE}
- function EnumDesktopsW; external user32 name 'EnumDesktopsW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _EnumDesktops: Pointer;
- function EnumDesktops;
- begin
- GetProcedureAddress(_EnumDesktops, user32, 'EnumDesktopsW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_EnumDesktops]
- end;
- end;
- {$ELSE}
- function EnumDesktops; external user32 name 'EnumDesktopsW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _EnumDesktops: Pointer;
- function EnumDesktops;
- begin
- GetProcedureAddress(_EnumDesktops, user32, 'EnumDesktopsA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_EnumDesktops]
- end;
- end;
- {$ELSE}
- function EnumDesktops; external user32 name 'EnumDesktopsA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _EnumDesktopWindows: Pointer;
- function EnumDesktopWindows;
- begin
- GetProcedureAddress(_EnumDesktopWindows, user32, 'EnumDesktopWindows');
- asm
- mov esp, ebp
- pop ebp
- jmp [_EnumDesktopWindows]
- end;
- end;
- {$ELSE}
- function EnumDesktopWindows; external user32 name 'EnumDesktopWindows';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SwitchDesktop: Pointer;
- function SwitchDesktop;
- begin
- GetProcedureAddress(_SwitchDesktop, user32, 'SwitchDesktop');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SwitchDesktop]
- end;
- end;
- {$ELSE}
- function SwitchDesktop; external user32 name 'SwitchDesktop';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _SetThreadDesktop: Pointer;
- function SetThreadDesktop;
- begin
- GetProcedureAddress(_SetThreadDesktop, user32, 'SetThreadDesktop');
- asm
- mov esp, ebp
- pop ebp
- jmp [_SetThreadDesktop]
- end;
- end;
- {$ELSE}
- function SetThreadDesktop; external user32 name 'SetThreadDesktop';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _CloseDesktop: Pointer;
- function CloseDesktop;
- begin
- GetProcedureAddress(_CloseDesktop, user32, 'CloseDesktop');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CloseDesktop]
- end;
- end;
- {$ELSE}
- function CloseDesktop; external user32 name 'CloseDesktop';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _GetThreadDesktop: Pointer;
- function GetThreadDesktop;
- begin
- GetProcedureAddress(_GetThreadDesktop, user32, 'GetThreadDesktop');
- asm
- mov esp, ebp
- pop ebp
- jmp [_GetThreadDesktop]
- end;
- end;
- {$ELSE}
- function GetThreadDesktop; external user32 name 'GetThreadDesktop';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _CreateWindowStationA: Pointer;
- function CreateWindowStationA;
- begin
- GetProcedureAddress(_CreateWindowStationA, user32, 'CreateWindowStationA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CreateWindowStationA]
- end;
- end;
- {$ELSE}
- function CreateWindowStationA; external user32 name 'CreateWindowStationA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _CreateWindowStationW: Pointer;
- function CreateWindowStationW;
- begin
- GetProcedureAddress(_CreateWindowStationW, user32, 'CreateWindowStationW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CreateWindowStationW]
- end;
- end;
- {$ELSE}
- function CreateWindowStationW; external user32 name 'CreateWindowStationW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _CreateWindowStation: Pointer;
- function CreateWindowStation;
- begin
- GetProcedureAddress(_CreateWindowStation, user32, 'CreateWindowStationW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CreateWindowStation]
- end;
- end;
- {$ELSE}
- function CreateWindowStation; external user32 name 'CreateWindowStationW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _CreateWindowStation: Pointer;
- function CreateWindowStation;
- begin
- GetProcedureAddress(_CreateWindowStation, user32, 'CreateWindowStationA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_CreateWindowStation]
- end;
- end;
- {$ELSE}
- function CreateWindowStation; external user32 name 'CreateWindowStationA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _OpenWindowStationA: Pointer;
- function OpenWindowStationA;
- begin
- GetProcedureAddress(_OpenWindowStationA, user32, 'OpenWindowStationA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_OpenWindowStationA]
- end;
- end;
- {$ELSE}
- function OpenWindowStationA; external user32 name 'OpenWindowStationA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _OpenWindowStationW: Pointer;
- function OpenWindowStationW;
- begin
- GetProcedureAddress(_OpenWindowStationW, user32, 'OpenWindowStationW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_OpenWindowStationW]
- end;
- end;
- {$ELSE}
- function OpenWindowStationW; external user32 name 'OpenWindowStationW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _OpenWindowStation: Pointer;
- function OpenWindowStation;
- begin
- GetProcedureAddress(_OpenWindowStation, user32, 'OpenWindowStationW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_OpenWindowStation]
- end;
- end;
- {$ELSE}
- function OpenWindowStation; external user32 name 'OpenWindowStationW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _OpenWindowStation: Pointer;
- function OpenWindowStation;
- begin
- GetProcedureAddress(_OpenWindowStation, user32, 'OpenWindowStationA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_OpenWindowStation]
- end;
- end;
- {$ELSE}
- function OpenWindowStation; external user32 name 'OpenWindowStationA';
- {$ENDIF DYNAMIC_LINK}
- {$ENDIF}
- {$IFDEF DYNAMIC_LINK}
- var
- _EnumWindowStationsA: Pointer;
- function EnumWindowStationsA;
- begin
- GetProcedureAddress(_EnumWindowStationsA, user32, 'EnumWindowStationsA');
- asm
- mov esp, ebp
- pop ebp
- jmp [_EnumWindowStationsA]
- end;
- end;
- {$ELSE}
- function EnumWindowStationsA; external user32 name 'EnumWindowStationsA';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF DYNAMIC_LINK}
- var
- _EnumWindowStationsW: Pointer;
- function EnumWindowStationsW;
- begin
- GetProcedureAddress(_EnumWindowStationsW, user32, 'EnumWindowStationsW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_EnumWindowStationsW]
- end;
- end;
- {$ELSE}
- function EnumWindowStationsW; external user32 name 'EnumWindowStationsW';
- {$ENDIF DYNAMIC_LINK}
- {$IFDEF UNICODE}
- {$IFDEF DYNAMIC_LINK}
- var
- _EnumWindowStations: Pointer;
- function EnumWindowStations;
- begin
- GetProcedureAddress(_EnumWindowStations, user32, 'EnumWindowStationsW');
- asm
- mov esp, ebp
- pop ebp
- jmp [_EnumWindowStations]
- end;
- end;
- {$ELSE}
- function EnumWindowStations; external user32 name 'EnumWindowStationsW';
- {$ENDIF DYNAMIC_LINK}
- {$ELSE}
- {$IFDEF DYNAMIC_LINK}
- var
- _EnumWindowStations: Pointer;
- function EnumWindowStations;
- begin
- GetProcedureAddress(_EnumWindowStations, user32, 'EnumWindowStationsA');