Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.


A structure of type CHOOSECOLOR, whose members store the characteristics and values of the dialog box.


After constructing a CColorDialog object, you can use m_cc to set various aspects of the dialog box before calling the DoModal member function.

// The code below uses CColorDialog::m_cc data member to 
// customize the settings of CColorDialog. The CColorDialog will
// be shown as full open and with red as the selected color. 
CColorDialog dlg;
dlg.m_cc.Flags |= CC_FULLOPEN | CC_RGBINIT;
dlg.m_cc.rgbResult = RGB(255, 0, 0);

Community Additions

© 2015 Microsoft