static COLORREF GetColorFromButton(const CMFCColorButton& button) { COLORREF col = button.GetColor(); if (col == -1) return button.GetAutomaticColor(); return col; }
void CSettingsRevisionGraphColors::ApplyColor ( CMFCColorButton& button , CColors::GDIPlusColorTable table , int index) { COLORREF value = button.GetColor() == -1 ? button.GetAutomaticColor() : button.GetColor(); Gdiplus::Color temp; temp.SetFromCOLORREF (value); m_Colors.SetColor (table, index, (temp.GetValue() & 0xffffff) + 0xff000000); }
void CSettingsRevisionGraphColors::ApplyColor ( CMFCColorButton& button , CColors::GDIPlusColor color , DWORD alpha) { COLORREF value = button.GetColor() == -1 ? button.GetAutomaticColor() : button.GetColor(); Gdiplus::Color temp; temp.SetFromCOLORREF (value); m_Colors.SetColor (color, (temp.GetValue() & 0xffffff) + (alpha << 24)); }