コード例 #1
0
void CSettingsRevisionGraphColors::ResetColor
    ( CMFCColorButton& button
    , CColors::GDIPlusColorTable table
    , int index)
{
    button.SetColor (m_Colors.GetColor (table, index, true).ToCOLORREF());
}
コード例 #2
0
void MColorDialog::colorDataToWidget(ColorType t)
{
	CMFCColorButton* clrWidget = NULL;
	Dlgrgb* clrVar = NULL;
	setColorPointers(t, &clrWidget, &clrVar);
	byte br = (int)(clrVar->r * 255);
	byte bg = (int)(clrVar->g * 255);
	byte bb = (int)(clrVar->b * 255);
	COLORREF clr = RGB(br, bg, bb);
	clrWidget->SetColor(clr);
}
コード例 #3
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);
}
コード例 #4
0
void CSettingsRevisionGraphColors::ResetColor
    ( CMFCColorButton& button
    , CColors::GDIPlusColor color)
{
    button.SetColor (m_Colors.GetColor (color, true).ToCOLORREF());
}