CMFCCustomColorsPropertyPage Class

Represents a property page that can select custom colors in a color dialog box.

Syntax

class CMFCCustomColorsPropertyPage : public CPropertyPage

Members

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.

Example

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);

Inheritance Hierarchy

CObject

CCmdTarget

CWnd

CDialog

CPropertyPage

CMFCCustomColorsPropertyPage

Requirements

Header: afxcustomcolorspropertypage.h

CMFCCustomColorsPropertyPage::Setup

Sets the color components of the property page.

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

Parameters

R
[in] The red component of the RGB value.

G
[in] The green component of the RGB value.

B
[in] 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.

See also

Hierarchy Chart
Classes
CMFCColorDialog Class
CMFCStandardColorsPropertyPage Class