コード例 #1
0
ファイル: SetColorPage.cpp プロジェクト: YueLinHo/TortoiseGit
static COLORREF GetColorFromButton(const CMFCColorButton& button)
{
	COLORREF col = button.GetColor();
	if (col == -1)
		return button.GetAutomaticColor();
	return col;
}
コード例 #2
0
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);
}
コード例 #3
0
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));
}