Archived

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

what is InvalidateRect()?

This topic is 6116 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
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
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