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

NameDescription
CMFCCustomColorsPropertyPage::CMFCCustomColorsPropertyPageDefault constructor.

Public Methods

NameDescription
CMFCCustomColorsPropertyPage::CreateObjectUsed by the framework to create a dynamic instance of this class type.
CMFCCustomColorsPropertyPage::GetThisClassUsed by the framework to obtain a pointer to the CRuntimeClass object that is associated with this class type.
CMFCCustomColorsPropertyPage::SetupSets 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);

CObject

CCmdTarget

CWnd

CDialog

CPropertyPage

CMFCCustomColorsPropertyPage

Header: afxcustomcolorspropertypage.h

Sets the color components of the property page.

void Setup(
    BYTE R,  
    BYTE G,  
    BYTE B);

Parameters

ParameterDescription
[in] RThe red component of the RGB value.
[in] GThe green component of the RGB value.
[in] BThe 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

Show: