如何改变对话框程序中"标题栏的颜色"和"静态文本控件中字的颜色"???谢谢!
解决方案 »
- 怎么封装成com控件?
- VC中如何将ACCESSS数据库中的二进制数据转成CString?
- ::GetDIBits 返回值为0。请各位指教下。
- 通过代码设置 禁止运行 activex控件,但是打开网站时总会弹出 模态对话框,如何取消?
- 想在listctrl添加带图片的item
- 上次发的盗号者删除在这里重发 多文档打印问题.分不够加上次回答我问题的希望能再来
- 谁能介绍一个IBM笔记本电脑的详细产品介绍网址???
- 急急!请大家帮我看看这个问题!是不是逻辑上有什么错误!
- 如何在自建的视类中获得文档类的指针?
- 数码相机的二次开发问题,SDK
- 关于创建摸态对话框的一点小问题,请各位多多帮助!
- ATL中如何实现将 CComVariant 变量做类似于MFC 的COleDateTime的GetDay(),和求TimeSpan 的功能?
{
// Call the base class implementation first! Otherwise, it may
// undo what we're trying to accomplish here.
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); // Are we painting the IDC_MYSTATIC control? We can use
// CWnd::GetDlgCtrlID() to perform the most efficient test.
if (pWnd->GetDlgCtrlID() == IDC_MYSTATIC)
{
// Set the text color to red
pDC->SetTextColor(RGB(255, 0, 0)); // Set the background mode for text to transparent
// so background will show thru.
pDC->SetBkMode(TRANSPARENT); // Return handle to our CBrush object
hbr = m_brush;
} return hbr;
}
// This OnCtlColor handler will change the color of a static control
// with the ID of IDC_MYSTATIC. The code assumes that the CMyDialog
// class has an initialized and created CBrush member named m_brush.
// The control will be painted with red text and a background
// color of m_brush. if (pWnd->GetDlgCtrlID() == IDC_MYSTATIC)
{
// Set the text color to red
pDC->SetTextColor(RGB(255, 255, 0));
// Set the background mode for text to transparent
// so background will show thru.
pDC->SetBkMode(TRANSPARENT);
// Return handle to our CBrush object
hbr = m_brush;
}如果是改变按纽的颜色,可不可以用这个呢?
可没有SetButtonColor阿?