Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What is the usage of CWnd::Invalidate ?

516 views
Skip to first unread message

jklioe

unread,
May 14, 2009, 10:23:17 AM5/14/09
to
What is the purpose of using CWnd::Invalidate ?

Msdn says:
"Invalidates the entire client area of CWnd." What does it mean?

Jonathan Wood

unread,
May 14, 2009, 10:37:06 AM5/14/09
to
In this case, "valid" means that any changes to the window have been drawn
to the screen. When you call this method, the window is flagged to be
redrawn.

Let's say your code makes a change to your data. Instead of writing special
code to update those changes displayed in your window, a better approach is
to write code to paint your window in just one location. After you've made
the changes, you could call Invalidate() to cause your painting code to be
called.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
http://www.softcircuits.com/blog/

"jklioe" <ranu...@gmail.com> wrote in message
news:41dc156f-9c81-462a...@s38g2000prg.googlegroups.com...

Mikel

unread,
May 14, 2009, 10:55:42 AM5/14/09
to

It tells the program that what's drawn in the client area is no longer
valid and it has to be redrawn when the next WM_PAINT is received.

Beginner to device driver

unread,
May 15, 2009, 1:28:20 AM5/15/09
to

Thanks !!!!!!!!!!!!!!!!

0 new messages