CWnd::OnEraseBkgnd(MSDN)
来源:互联网 发布:面板数据虚拟变量 编辑:程序博客网 时间:2024/05/08 21:34
(还需要修改!!)
The framework calls this member function when the CWnd object background needs erasing (for example, when resized).
afx_msg BOOL OnEraseBkgnd( CDC* pDC );
It is called to prepare an invalidated regionfor painting.
The default implementation erases the background using the window class background brush specified by thehbrBackground member of the window class structure.
(缺省的实现使用窗口类结构中hbrBackground成员指定的窗口类背景刷子擦除窗口背景。)
If the hbrBackground member is NULL, your overridden version ofOnEraseBkgnd should erase the background color. Your version should also align the origin of the intended brush with theCWnd coordinates by first calling UnrealizeObject for the brush, and then selecting the brush.
An overridden OnEraseBkgnd should return nonzero in response toWM_ERASEBKGND if it processes the message and erases the background; this indicates that no further erasing is required. If it returns 0, the window will remain marked as needing to be erased. (Typically, this means that thefErase member of thePAINTSTRUCT structure will beTRUE.)
Windows assumes the background is computed with the MM_TEXT mapping mode. If the device context is using any other mapping mode, the area erased may not be within the visible part of the client area.
Note:This member function is called by the framework to allow your application to handle a Windows message. The parameters passed to your function reflect the parameters received by the framework when the message was received. If you call the base-class implementation of this function, that implementation will use the parameters originally passed with the message and not the parameters you supply to the function.
问: OnEraseBkgnd函数中返回TRUE或FALSE有什么区别?
默认的函数
BOOL CdirectUITestDlg::OnEraseBkgnd(CDC* pDC){return CDialog::OnEraseBkgnd(pDC);}
如果改为下面代码,则绘制背景为白色。
BOOL CdirectUITestDlg::OnEraseBkgnd(CDC* pDC)
{
//return CDialog::OnEraseBkgnd(pDC);
return true;
}
- CWnd::OnEraseBkgnd(MSDN)
- CWnd::OnEraseBkgnd
- MSDN中关于CWnd::OnChar()帮助有误?
- 转MSDN里的CWnd::OnHScroll
- OnEraseBkgnd
- OnEraseBkGnd()
- OnEraseBkGnd()
- OnEraseBkGnd()
- OnEraseBkGnd()
- CWnd
- CWnd
- CWnd
- CWnd
- CWnd
- OnEraseBkGnd()函数
- OnEraseBkGnd() 使用
- msdn
- MSDN
- Android开发网上的一些重要知识点
- Perl编程之基于XML::XPath和XML::Simple的XML文件读写浅析
- ORACLE 11G卸载方法
- 软件测试成功之本:项目风险的监控
- LinkedList 的局限
- CWnd::OnEraseBkgnd(MSDN)
- 开源软件的七大盈利模式
- 关于触点坐标
- POJ 1269
- Retrive session wait
- 管理理念:下属不长记性,怎么办?
- 成为编程巨星的唯一秘诀
- 亲情,感情,爱情,您都珍惜了,有木有,有木有?
- 消除word中空格的方法