Archived

This topic is now archived and is closed to further replies.

Merc22

what is InvalidateRect()?

Recommended Posts

Merc22    122
i was tryin to compile a program that used SendMessage to send a message to WM_PAINT but it wouldnt work so i used InvalidateRect the only thing is i dont knoe wat InvalidateRect is? y is it i could only use InvalidateRect instead of SendMessage? thanx

Share this post


Link to post
Share on other sites
Null and Void    1088
InvalidateRect tells Windows that a certain rectangle needs to be updated. Then windows will give all of the applications that are visible in that rect a WM_PAINT with the area they must update.

"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
Resist Windows XP''s Invasive Production Activation Technology!
http://www.gdarchive.net/druidgames/

Share this post


Link to post
Share on other sites
MatrixCubed    199
Any Windows program you create has its own rectangle (even if it''s invisible or 0x0 pixels in size). Just like you use CreateWindow, every window has parameters (client rect, window rect, foreground status, etc) that you can tell Windows to do things with. So when you Invalidate a rectangle, you forcibly tell Windows that the rectangle owned by the window in question needs to be redrawn.


MatrixCubed
http://MatrixCubed.org

Share this post


Link to post
Share on other sites