界面问题-窗口重绘?
我的MFC应用程序主要功能是读取数据库内容,并用图形显示其数据。
问题是绘制图形的模块,当有浮动窗口或其他应用程序挡住或移过所绘制的图形区域时,图形会被擦除,留下大片白块。
我看了看源程序发现负责该模块的类为:CReportSpace.
在该类下总共只有以下几个成员函数:
::OnClickTab()
::OnCreate()
::OnSize() //改变图形区域尺寸时所调用的函数;
::OnPaint()//如果没错的话,这个函数就是负责窗口重绘的。
对于::OnPaint()其源代码如下:
void CReportspace::OnPaint()
{
CPaintDC dc(this); // device context for painting
}
我觉得这个函数没有写完整,请高手指教!
顺便附上图片更好的解释出现的问题。
<a href="http://tinypic.com" target="_blank"><img src="http://i33.tinypic.com/2mmxnvk.jpg" border="0" alt="Image and video hosting by TinyPic"></a>
<a href="http://tinypic.com" target="_blank"><img src="http://i37.tinypic.com/iwnr4j.jpg" border="0" alt="Image and video hosting by TinyPic"></a>
<a href="http://tinypic.com" target="_blank"><img src="http://i37.tinypic.com/2638rr6.jpg" border="0" alt="Image and video hosting by TinyPic"></a>