Ima_Scroll

 

The "Ima_Scroll()" function is called whenever the mouse scroll wheel is activated while the cursor is over an image window.

 

 

Syntax

 

extern "C" __declspec(dllexportint  Ima_Scroll(

          HWND wnd,

          SliceO_Window *window

          int count,

          short x, short y

)

 

 

Parameters

 

wnd

A handle to the interface's window

 

window

A pointer to the "Window" structure of the image window receiving the action.

 

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 "Ima_Scroll" function  from the "Threshold mode" module.

 

...

 

// ----------------------------------------------------------------------------

//

//          Function:          Ima_Scroll

//

//          Parameters:          count (int)          number of mouse wheel cliks

//          Returns:          (int)                    1 if action was used

//

//          This is called each time the cursor is inside an image and the mouse

//          wheel has been activated.

//

// ----------------------------------------------------------------------------

extern "C" __declspec(dllexport) int          Ima_Scroll( HWND wnd, SliceO_Window *window, int count, short x, short y )

{

          // --- send this scroll to the "Ctrl" function ---

          // I set "wnd" to NULL to recognize it there.

          Ctrl_Scroll( NULL, count, x, y ) ;

 

}

 

...

 

See also