设置对话框(Dialog)的背景色
2008-10-28 17:39
246 查看
重载WM_CTLCOLOR响应函数
HBRUSH CDlgTest::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
//HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
switch (nCtlColor)
{
case CTLCOLOR_DLG:
{
CBrush* back_brush;
COLORREF color;
color = RGB(255,255,255);
back_brush = new CBrush(color);
return (HBRUSH) (back_brush->m_hObject);
}
}
return(CDialog::OnCtlColor(pDC, pWnd, nCtlColor));
// TODO: Return a different brush if the default is not desired
//return hbr;
}
HBRUSH CDlgTest::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
//HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
switch (nCtlColor)
{
case CTLCOLOR_DLG:
{
CBrush* back_brush;
COLORREF color;
color = RGB(255,255,255);
back_brush = new CBrush(color);
return (HBRUSH) (back_brush->m_hObject);
}
}
return(CDialog::OnCtlColor(pDC, pWnd, nCtlColor));
// TODO: Return a different brush if the default is not desired
//return hbr;
}
相关文章推荐
- jQuery dialog 对话框,可以改变外形和设置的dialog
- MFC对话框背景色的设置
- 文本框字体色,对话框和静态文件背景色设置方法
- 对话框背景色的设置
- 2010.10.21 设置对话框背景色
- 30-datePickerDialog和TimePickerDialog对话框设置日期和时间
- dialogFragment xml设置背景色透明没有效果
- 文本框字体色,对话框和静态文件背景色设置方法(OnCtlColor消息)
- 设置对话框中控件的背景色
- 对话框背景色的设置
- Dialog设置对话框宽高
- Android对话框中设置内容背景色是透明的
- 设置对话框背景色
- 设置对话框、static和group的背景色和字体颜色
- 设置对话框的背景色(转)
- 如何JOPtionPane的showConfirmDialog对话框button设置监视器
- 如何设置对话框背景色
- 设置对话框的背景色
- 设置对话框的背景色(VC)
- MFC对话框设置背景色及透明度