コード例 #1
0
void CSettingsRevisionGraphColors::InitColorPicker
    ( CMFCColorButton& button
    , CColors::GDIPlusColor color)
{
    CString sDefaultText;
    CString sCustomText;
    sDefaultText.LoadString (IDS_COLOURPICKER_DEFAULTTEXT);
    sCustomText.LoadString (IDS_COLOURPICKER_CUSTOMTEXT);

    button.SetColor (m_Colors.GetColor (color).ToCOLORREF());
    button.EnableAutomaticButton (sDefaultText, m_Colors.GetColor (color, true).ToCOLORREF());
    button.EnableOtherButton (sCustomText);
}