#include <rhinoSdkUtilities.h>
Description: Derive from CRhinoReplaceColorDialog and override ColorDialog(...) to replace the standard Rhino color picker with a custom version. The last CRhinoReplaceColorDialog dialog created will be the current replacement.
◆ CRhinoReplaceColorDialog()
CRhinoReplaceColorDialog::CRhinoReplaceColorDialog |
( |
AFX_MODULE_STATE * |
pPlugInModuleState | ) |
|
Description: Constructor for color dialog replacement object. Do not construct it until it is safe to use ::AfxGetStaticModuleState(). Parameters: pPlugInModuleState [in] Is the module state that will be made active prior to calling ColorDialog(). If this is NULL ColorDialog() will never get called. See MSDN for AFX_MANAGE_STATE
◆ ~CRhinoReplaceColorDialog()
virtual CRhinoReplaceColorDialog::~CRhinoReplaceColorDialog |
( |
| ) |
|
|
virtual |
◆ ColorDialog()
virtual bool CRhinoReplaceColorDialog::ColorDialog |
( |
HWND |
hWndParent, |
|
|
ON_Color & |
color, |
|
|
bool |
bIncludeButtonColors, |
|
|
const wchar_t * |
lpsDialogTitle |
|
) |
| |
|
pure virtual |
Description: Method which gets called by Rhino when it is ready to display a color picker dialog. Parameters: hWndParent [in] Handle to window that is the parent for the color dialog. If this is NULL the main Rhino window handle is used. color [in/out] Used initially as the default color for the dialog. If ColorDialog() returns true then it should be set to selected color. bIncludeButtonColors [in] If true then the color dialog should include standard button face and button text color options, these are used by the tool bar button bitmap editor. lpsDialogTitle [in] Dialog title Returns: Returns true if OK button was pressed in dialog or false if dialog was canceled.
◆ CurrentColorDialog()
Description: Call this method to get the current color dialog replacement. Returns: Returns the current color dialog replacement.
◆ PlugInModuleState()
AFX_MODULE_STATE* CRhinoReplaceColorDialog::PlugInModuleState |
( |
| ) |
const |
Description: Call this method to get the AFX_MODULE_STATE* passed to the constructor. If this returns NULL then ColorDialog() will not get called. Returns: Returns the AFX_MODULE_STATE* passed to the constructor. If this returns NULL then ColorDialog() will not get called.
◆ PreviousColorDialog()
Description: Call this method to get the color dialog replacement that was active prior to this one. Returns: Returns the color dialog replacement that was active prior to this one.