如题

解决方案 »

  1.   

    在CButtonST有这么个东西,仔细研究一下,设置字体,背景颜色的
    enum
    {
    BTNST_COLOR_BK_IN = 0,// Background color when mouse is INside

    BTNST_COLOR_FG_IN,   // Text color when mouse is INside
     BTNST_COLOR_BK_OUT, // Background color when mouse is OUTside
    BTNST_COLOR_FG_OUT, // Text color when mouse is OUTside
    BTNST_COLOR_BK_FOCUS, // Background color when the button is focused
    BTNST_COLOR_FG_FOCUS, // Text color when the button is focused
    BTNST_MAX_COLORS
    };
    下面 我的一个例子,
    m_btTurnTo.SetColor(CButtonST::BTNST_COLOR_BK_OUT,RGB(101,97,162)); //设置背景颜色
     m_btTurnTo.SetColor(CButtonST::BTNST_COLOR_FG_OUT,RGB(255,255,255));
    m_btTurnTo.OffsetColor(CButtonST::BTNST_COLOR_BK_IN, shBtnColor);
    m_btTurnTo.SetRounded(TRUE);
    m_btTurnTo.SetTooltipText("跳转到该页面");
      

  2.   

    直接使用CButtonST可以的,
    但是用CShadeButtonST  ,就不能改变背景了啊
      

  3.   

    CShadeButtonST 里面不是有渐变色吗?
      

  4.   

    摘抄于他的例子中的代码 m_btnButtons[8].SetShade(CShadeButtonST::SHS_DIAGSHADE,8,10,5,RGB(55,255,55));
    m_btnButtons[8].SetIcon(IDI_IEDOCUMENT);
    m_btnButtons[8].SetColor(CButtonST::BTNST_COLOR_FG_IN, RGB(0, 178, 0));
    m_btnButtons[8].SetColor(CButtonST::BTNST_COLOR_FG_OUT, RGB(0, 128, 0));