The "Ctrl_Key()" function is called whenever a keyboard key is activated while the cursor is over your interface window.
Syntax
extern "C" __declspec(dllexport) int Ctrl_Help(
HWND wnd,
int key,
short x, short y
)
Parameters
wnd
A handle to the interface's window
key
is the key code of the activated key
x, y
Horizontal (x) and vertical (y) position of the cursor within the current window. (0,0 at bottom left)
Return value
The function returns "1" if the event has been used.
Remarks
Requirements
Header:
sliceO_include.hpp
Library:
sliceO_Structures.lib
Example
Sample "Ctrl_Key" function from the "Edit mode" module.
|
...
// ----------------------------------------------------------------------------
//
// Function: Ctrl_Key
//
// Parameters: wnd (HWND) Pointer to Window's generating the signal
// key (int) code of the activated key
// x, y (int) current cursor position
// Returns: (int) 1 if key is used
//
// This is called each time the cursor is inside your menu and a keyboard
// key has been pressed.
//
// ----------------------------------------------------------------------------
extern "C" __declspec(dllexport) int Ctrl_Key( HWND wnd, int key, short x, short y )
{
// --- TAG Selection Tool ---
if ( tool_tag.Keyboard( key ) )
return( 1 ) ;
// --- Brush Selection Tool ---
if ( tool_brush.Keyboard( key ) )
return( 1 ) ;
return( 0 ) ;
}
...
|
|
See also
Ctrl_Blabla