对话框上有一个静态文本控件,我调用该控件的OnPaint(),这个函数会不会调用对话框的OnPaint()
谢谢 问题点数:50、回复次数:2Top
1 楼liu_feng_fly(笑看风云 搏击苍穹 衔日月)回复于 2002-04-23 12:26:29 得分 40
onpaint()函数是不应该自己调用的,需要重画,可以调用
invalidate()函数
CWnd::Invalidate
void Invalidate( BOOL bErase = TRUE );
Parameters
bErase
Specifies whether the background within the update region is to be erased.
Remarks
Invalidates the entire client area of CWnd. The client area is marked for painting when the next WM_PAINT message occurs. The region can also be validated before a WM_PAINT message occurs by the ValidateRect or ValidateRgn member function.
The bErase parameter specifies whether the background within the update area is to be erased when the update region is processed. If bErase is TRUE, the background is erased when the BeginPaint member function is called; if bErase is FALSE, the background remains unchanged. If bErase is TRUE for any part of the update region, the background in the entire region, not just in the given part, is erased.
Windows sends a WM_PAINT message whenever the CWnd update region is not empty and there are no other messages in the application queue for that window.
Top
2 楼alexzhou(你的明天会怎样)回复于 2002-04-23 12:32:25 得分 10
updateWindow 发送WM_PAINT 消息Top




