Updates

 

The "Ctrl_Update()" function is called each time your interface need to be updated, either due to an external action (for example, the user change the slice selection and it may change the value of some parameters in your interface) or it can be called directly by other functions of your Ctrl module (8 bits of the flag are reserved for internal causes).

 

If the cause of the update is external, the function will be called by your "Update_A" or "Update_B" functions with a mechanism such as:

 

 

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

//

//          Update_A

//

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

extern "C" __declspec(dllexport) int          Update_A( UInt64 flag )

{

          // --- changes to the Control Window ---

          Ctrl_Update( flag ) ;

 

          return( 1 ) ;

}

 

For direct calls you will use one of the reserved flags and call the function directly:

 

 

          ...

          // --- changes to the Control Window ---

          Ctrl_Update( UPDATE_USER_1 ) ;

          ...

 

The function receive a 64 bit flag that contain the cause of the callback.  You can use this flag to update the desired sections of your interface.

 

The function return an integer, it should return "1" if it did not encounter any problems, and "0" otherwise.