|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.|
Visual Studio 2005
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); dlg.DoModal();