怎样修改窗口toolbar的背景色,怎样修改窗口菜单栏的背景色,怎样修改按钮的颜色

解决方案 »

  1.   

    问题很普遍,CSDN 点搜索 背景色, 有你要的
      

  2.   

    修改按钮的背景色,可以在网上搜索cbuttonst,下载源文件把其中的BCMenu.cpp,BCMenu.h,
    BtnST.cpp,BtnST.h  四个文件加入工程中,用类向导为按钮创建变量,将变量类型CButton手动
    改为CButtonST,然后在BOOL CBankDlg::OnInitDialog()中添加
    m_btn1.SetColor(CButtonST::BTNST_COLOR_BK_OUT, RGB(170,170,255));
    m_btn1.SetColor(CButtonST::BTNST_COLOR_FG_IN, RGB(255,0,0));
    m_btn1.SetColor(CButtonST::BTNST_COLOR_BK_IN, RGB(170,170,255));
    m_btn1.SetColor(CButtonST::BTNST_COLOR_BK_FOCUS, RGB(170,170,255));
    m_btn1.SetColor(CButtonST::BTNST_COLOR_FG_FOCUS, RGB(170,170,255));
    注意要添加头文件到相应的文件中。
      

  3.   

    the means you must inherit the cbutton,and create 
    a new class.?right,there is not a good way?
      

  4.   

    我想问,的是在dialog中怎么设定toolbar的背景色,并不是toolbar上的按钮的颜色?
      

  5.   

    我目前只会设置按钮的颜色,不会设置工具条的颜色。sorry!!!!
      

  6.   

    1、重载OnCtlColor
    2、选中Owner Draw, 重载各个控件的实现
      参考http://www.codeproject.com/buttonctrl/
      

  7.   

    重载OnCtlColor并不能设定工具栏的颜色