READ KEYBOARD AND MOUSE FUNCTIONS
Syntax:
HMG_GetLastVirtualKeyDown ( [ @hWnd ], [ @nMsg ], [ @wParam ], [ @lParam ] ) --> nVK_Code
HMG_GetLastVirtualKeyUp ( [ @hWnd ], [ @nMsg ], [ @wParam ], [ @lParam ] ) --> nVK_Code
HMG_GetLastCharacter ( [ @hWnd ], [ @nMsg ], [ @wParam ], [ @lParam ] ) --> cCharacter
HMG_CleanLastVirtualKeyDown ( [ lCleanAll ] )
HMG_CleanLastVirtualKeyUp ( [ lCleanAll ] )
HMG_CleanLastCharacter ( [ lCleanAll ] )
HMG_GetLastVirtualKeyName ( [ lParam ] ) --> cVK_Name
HMG_VirtualKeyIsPressed ( VK_Code )
GetKeyState ( VK_Code ) --> return nKeyState
HMG_SendCharacter ( [ hWnd ], cText )
HMG_PressKey ( nVK1, nVK2, ... )
Note: simulates the pressure of a key or a combination of keys (where nVK is a virtual key code)
HMG_GetLastMouseMessage ( [ @hWnd ], [@nMsg], [@wParam], [@lParam] ) --> nMsg
HMG_CleanLastMouseMessage()
HMG_GetCursorPos ( [ hWnd ], @nRow, @nCol )
HMG_SetCursorPos ( [ hWnd ], nRow, nCol )
Note: if hWnd is a handle of window nRow and nCol is in reference to the coordinates of window, otherwise the cursor position is in screen coordinates.
SET CONTROL <ControlName> OF <FormName> ONKEYEVENT <FuncName> | NIL
Note: the following function is a complement to SET ONKEYEVENT
HMG_GetOnKeyControlIndex ( [ @nSubIndex ] ) --> nIndex
SET CONTROL <ControlName> OF <FormName> ONMOUSEEVENT <FuncName> | NIL
Note: the following function is a complement to SET ONMOUSEEVENT
HMG_GetOnMouseControlIndex ( [ @nSubIndex ] ) --> nIndex
Complementary Functions:
Gets Form\/Control Name and Form Parent Name by window handle (complement, e.g. to the read keyboard functions):
GetFormNameByHandle ( hWnd, @cFormName, @cFormParentName ) --> Return nFormIndex
GetControlNameByHandle ( hWnd, @cControlName, @cFormParentName ) --> Return nControlIndex
See demo:
\SAMPLES\Controls\Grid\GridIncrementalSearch