Hotkey control help

Function help:

Real API_Hotkey_Create (Real Parent Handle, Real X, Real Y, Real Width, Real Height, Real Style Flags, Real Extended Style Flags);

This function creates a new hotkey control.

Argument list:
(0) Parent Handle: Identifies the window handle of the window to create this control on.
(1) X: The horizontal position of the control in pixels, relative to the parent window.
(2) Y: The vertical position of the control in pixels, relative to the parent window.
(3) Width: The horizontal size of the control in pixels.
(4) Height: The vertical size of the control in pixels.
(5) Style Flags: The style flags, supports the Global Control Styles.:
(6) Extended Style Flags: This can be any combination of the Global Extended Control Styles.

Return value:
If this function succeeds, it returns the Control ID of the control, otherwise it returns 0.
Real API_Hotkey_GetKey ( Real Control ID);

This function returns the current key selected in the hotkey control.
This keys are the same as game makers keys, like vk_left or ord ('A').

Return value:
Returns the key number or zero (0) when none selected.
Real API_Hotkey_GetModifierKey ( Real Control ID, Real Selection type );

This function returns a combination of the selected modifier keys.

An example code:

if ( API_Hotkey_GetModifierKey ( Hotkey1 ) & HOTKEYF_ALT )
// The alt key is selected
if ( API_Hotkey_GetModifierKey (Hotkey1) & HOTKEYF_ALT and API_Hotkey_GetModifierKey (Hotkey1) & HOTKEYF_CONTROL)
// The alt and control keys are selected



Return value:
Returns the selected mofifier keys, a combination of this values:

HOTKEYF_ALT ALT key
HOTKEYF_CONTROL CONTROL key
HOTKEYF_EXT Extended key
HOTKEYF_SHIFT SHIFT key


Real API_Hotkey_SetKey ( Real Control ID, Real Modifier keys, Real Keys);

This function sets the selected key and modifier keys in the hotkey control.

This keys are the same as game makers keys, like vk_left or ord ('A').

The Modifier keys:
HOTKEYF_ALT ALT key
HOTKEYF_CONTROL CONTROL key
HOTKEYF_EXT Extended key
HOTKEYF_SHIFT SHIFT key

Return value:
Always returns zero.

Windows does not support primary or secondary check commands for the hotkey control.

Example code:

is
Hotkey1 = API_Hotkey_Create (Win,5,5,150,20,0,0);

API_Hotkey_SetKey (Hotkey1,HOTKEYF_ALT|HOTKEYF_CONTROL,ord ('A'));
// The control is created with the text "CTRL + ALT + A" .

Return to help index