The "Ctrl_Scroll()" function is called whenever the mouse scroll wheel is activated while the cursor is over your interface window.
Syntax
extern "C" __declspec(dllexport) int Ctrl_Help(
HWND wnd,
int cpunt,
short x, short y
)
Parameters
wnd
A handle to the interface's window
count
Is a signed number expressing the number (and direction) of wheel "clicks".
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_Scroll" function from the "Edit mode" module.
|
...
// ----------------------------------------------------------------------------
//
// Function: Ctrl_Scroll
//
// Parameters: wnd (HWND) Pointer to Window's generating the signal
// up_down (int) state of the mouse buttons
// x, y (int) current cursor position
// Returns: (int) 1 if used
//
// This is called each time the cursor is inside your menu and the mouse
// wheel has been activated.
//
// ----------------------------------------------------------------------------
extern "C" __declspec(dllexport) int Ctrl_Scroll( HWND wnd, int count, short x, short y )
{
// --- TAG Selection Tool ---
if ( box_tag.Select( KEY_QUERY ) ) {
tool_tag.Scroll( count ) ;
return( 1 ) ;
}
// --- Brush Selection Tool ---
// No mouse wheel interaction
return( 0 ) ;
}
...
|
|
See also