关于WM_PAINT和InvalidateRect
在几乎所有的vc书籍中都这样描述InvalidateRect():“……发出WM_PAINT信息,引发对矩形区域的重绘……”
可是在MSDN中关于这个函数却有如下的描述:
The invalidated rectangle, along with all other areas in the update region, is marked for painting when the next WM_PAINT message is sent.
仔细读这段话,意思是这个函数仅仅作一个更新标志,而并非发送WM_PAINT信息。
到底InvaldateRect是否发送该信息?谢谢各位赐教!
问题点数:26、回复次数:3Top
1 楼xxxbird(*说你行,你就行,不行也行*)回复于 2001-06-25 00:10:00 得分 26
From MSDN:
------
The invalidated areas accumulate in the update region until the region is processed when the next WM_PAINT message occurs or until the region is validated by using the ValidateRect or ValidateRgn function.
The system sends a WM_PAINT message to a window whenever its update region is not empty and there are no other messages in the application queue for that window.
------
实际上InvalidateRect是不发送该消息的. 通常在InvalidateRect后要调用UpdateWindow. UpdateWindow 才发送WM_PAINT 消息。Top
2 楼toyee(toyee)回复于 2001-06-26 00:05:06 得分 0
那么调用UpdateWindow是系统自动进行的吗?Top
3 楼xxxbird(*说你行,你就行,不行也行*)回复于 2001-06-26 06:51:07 得分 0
UpdateWindow需要自己调用。Top
相关问题
- WM_PAINT消息
- 从CDialog派生的类处理WM_PAINT和WM_NCPAINT的问题
- 每次 case WM_PAINT:
- 为什么我在windowpro中的wm_paint中使用InValidateRect(hwnd,NULL,FALSE)使窗口无效,但系统出错说hwnd,NULL,FALSE不被声明,请问这是怎
- 关于WM_PAINT消息
- 关于WM_PAINT的疑问
- 关于WM_PAINT的疑问
- WM_PAINT的奇怪现象
- 如何发送WM_PAINT消息? GetParent()->SendMessage(WM_PAINT); ??????
- 关于几种消息的区别?WM_QUIT WM_DESTROY WM_DRAW WM_PAINT




