Ima_Key

 

The "Ima_Key()" function is called whenever a keyboard key is activated while the cursor is over an image window.

 

Syntax

 

extern "C" __declspec(dllexportint  Ima_Key(

          HWND wnd,

          SliceO_Window *window

          int key,

          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.

 

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 "Ima_Key" function  from the "Edit mode" module.

 

...

 

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

//

//          Function:          Ima_Key

//

//          Parameters:          key (int)          code of the activated key

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

//

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

//          key has been pressed.

//

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

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

{

          return( 1 ) ;

}

 

...

 

See also