Sliders::Read

 

This method return the value of the slider at the current position of the cursor.

 

 

Syntax

 

float  Read(

          void 

) ;

 

 

Parameters

 

This method does not have a parameter.

 

 

Return value

 

return the value of the slider at the current position of the cursor.

 

 

Remarks

 

The value of "Cur_Value" variable is not updated automatically, when the user drag the mouse over the slider, you need to call "Read" and assign the returned value to the "Cur_Value" variable and then call "Adjust" for the graphic to reflect the new value.

 

 

Requirements

 

Header:

          TomoVision_Util.hpp

          TomoVision_Tools.hpp

 

Library:

          TomoVision_Util.lib

          TomoVision_Tools.lib

 

 

Example

 

static          Sliders          demo ;

 

extern "C" __declspec(dllexport) int          Ctrl_Click( HWND wnd, int up_down, short x, short y )

{

 

          // --- We only want the key press, not the key release ---

          if ( ! up_down ) {

              return( 0 ) ;

          }

 

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

          // We received a mouse click, now we try to find in

          // which tool the click was.  For this we use the

          // "select" method.

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

          if ( demo.Select( up_down ) ) {

              demo.Cur_Value = demo.Read() ;

              demo.Adjust() ;

              return( 1 ) ;

          }

          return( 0 ) ;

}

 

See also