Rhino C++ API  8.14
Public Member Functions | List of all members
CRhinoDisplayErrorMessage Class Reference

#include <rhinoSdkUtilities.h>

Public Member Functions

 CRhinoDisplayErrorMessage ()
 
 CRhinoDisplayErrorMessage (bool bUseBatchMode, const wchar_t *sMessageBoxTitle)
 
void DisplayErrorMessage (const wchar_t *sErrorMessage) const
 
int DisplayOkCancelErrorMessage (const wchar_t *sErrorMessage) const
 
void SetMessageBoxTitle (const wchar_t *sErrorMessageBoxTitle)
 
void SetUseBatchMode (bool bUseBatchMode)
 

Detailed Description

This class is for use in the common case where a calculation or process may generate lots of error messages that need to be printed on the Rhino command output window. In addition, if the calculation is happening in an interactive situation, a modal dialog box displays the message as well.

Constructor & Destructor Documentation

◆ CRhinoDisplayErrorMessage() [1/2]

CRhinoDisplayErrorMessage::CRhinoDisplayErrorMessage ( )

◆ CRhinoDisplayErrorMessage() [2/2]

CRhinoDisplayErrorMessage::CRhinoDisplayErrorMessage ( bool  bUseBatchMode,
const wchar_t *  sMessageBoxTitle 
)

Parameters: bUseBatchMode - [in] false: PrintErrorMessage() will print the error message on the command line and display it in a modal message box requiring the user to click a button to continue. true: PrintErrorMessage() will print the error message on the command line. No user input will be required. sMessageBoxTitle - [in] Title for the modal message box.

Member Function Documentation

◆ DisplayErrorMessage()

void CRhinoDisplayErrorMessage::DisplayErrorMessage ( const wchar_t *  sErrorMessage) const

Displays the error message. When a message box is used, it has an OK button.

◆ DisplayOkCancelErrorMessage()

int CRhinoDisplayErrorMessage::DisplayOkCancelErrorMessage ( const wchar_t *  sErrorMessage) const

Displays the error message. When a message box is used, it has an OK and Cancel button. Returns: ID_OK if no message box was displayed or the user clicked the OK button. ID_CANCEL otherwise.

◆ SetMessageBoxTitle()

void CRhinoDisplayErrorMessage::SetMessageBoxTitle ( const wchar_t *  sErrorMessageBoxTitle)

Parameters: sMessageBoxTitle - [in] Title for the modal message box.

◆ SetUseBatchMode()

void CRhinoDisplayErrorMessage::SetUseBatchMode ( bool  bUseBatchMode)

Parameters: bUseBatchMode - [in] false: PrintErrorMessage() will print the error message on the command line and display it in a modal message box requiring the user to click a button to continue. true: PrintErrorMessage() will print the error message on the command line. No user input will be required.