CMFCCustomColorsPropertyPage Class
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at CMFCCustomColorsPropertyPage Class.
Represents a property page that can select custom colors in a color dialog box.
class CMFCCustomColorsPropertyPage : public CPropertyPage
Public Constructors
| Name | Description |
CMFCCustomColorsPropertyPage::CMFCCustomColorsPropertyPage | Default constructor. |
Public Methods
| Name | Description |
CMFCCustomColorsPropertyPage::CreateObject | Used by the framework to create a dynamic instance of this class type. |
CMFCCustomColorsPropertyPage::GetThisClass | Used by the framework to obtain a pointer to the CRuntimeClass object that is associated with this class type. |
| CMFCCustomColorsPropertyPage::Setup | Sets the color components of the property page. |
Remarks
The CMFCColorDialog class uses this class to display the custom color property page. For more information about CMFCColorDialog, see CMFCColorDialog Class.
The following example demonstrates how to construct a CMFCCustomColorsPropertyPage object and set the color components of the property page.
CMFCCustomColorsPropertyPage* colourSheet = new CMFCCustomColorsPropertyPage();
colourSheet->Setup(0,0,255);
Header: afxcustomcolorspropertypage.h
Sets the color components of the property page.
void Setup(
BYTE R,
BYTE G,
BYTE B);
Parameters
| Parameter | Description |
[in] R | The red component of the RGB value. |
[in] G | The green component of the RGB value. |
[in] B | The blue component of the RGB value. |
Remarks
This method updates the current RGB and the associated HLS (hue, lightness, and saturation) color values of the property page. The CMFCColorDialog::SetPageTwo method calls this method when the framework initializes the color dialog box or the user presses the left mouse button. For more information about CMFCColorDialog, see CMFCColorDialog Class.
Hierarchy Chart
Classes
CMFCColorDialog Class
CMFCStandardColorsPropertyPage Class