1.对话框背景
在CWinApp中的初始化函数中,在第一行添加
this->SetDialogBkColor(RGB(220,233,248));//设置对话框背景颜色
还可以定义一个CBrush的变量m_brush;然后创建新的画刷
m_brush.CreateSolidBrush(RGB(220,233,248));
然后在color控制事件中返回新的画刷即可
HBRUSH CMy_PCSCDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
// TODO: Return a different brush if the default is not ......
阅读全文