Color_Edit::Scroll

 

This method update the value of "Cur_Value" to reflect a mouse wheel scroll.

 

 

Syntax

 

unsigned long  Scroll(

          int val

) ;

 

 

Parameters

 

val

          Number of scroll clicks.

 

 

Return value

 

return the new value of the color define by the tool.

 

 

Remarks

 

Both the value of "Cur_Value" and the graphics are updated by this method.

 

 

Requirements

 

Header:

          TomoVision_Util.hpp

          TomoVision_Tools.hpp

 

Library:

          TomoVision_Util.lib

          TomoVision_Tools.lib

 

 

Example

 

static          Color_Edit          demo ;

 

extern "C" __declspec(dllexport) int          Ctrl_Scroll( HWND wnd, int count, short x, short y )

{

          if ( demo.Select( KEY_QUERY ) ) {

              unsigned int color = demo.Scroll(count) ;

              unsigned char red = RED_BYTE(color) ;

              unsigned char grn = GRN_BYTE(color) ;

              unsigned char blu = BLU_BYTE(color) ;

              Error_Fct( hwnd, ERROR_CODE_REPORT, "Scroll in color edit, color= R:%d G:%d B:%d", red, grn, blu) ;

              return( 1 ) ;

          }

 

          return( 0 ) ;

}

 

See also