Invalidate window...
-
Hi, Is there any way to Invalidate the window without using Invalidate() or RedrawWindow(..RDW_INVALIDATE )?
Why do you need another way ? Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
-
Why do you need another way ? Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
-
Neha wrote: I want to send WM_ERASEBKGND message to the control. SendMessage(YourHandle, WM_ERASEBKGND, YourHDC,0)???? But for what? It can't give you anything useful. Use InvalidateRect if you want to repaint certain rectangle of the window.
-
Use RedrawWindow with the RDW_ERASENOW flag, and if you want a WM_PAINT message to be sent before the function exits use the RDW_UPDATENOW flag as well.
Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life! -
Hi, Is there any way to Invalidate the window without using Invalidate() or RedrawWindow(..RDW_INVALIDATE )?
InvalidateRect, InvalidateRgn, UpdateWindow, ValidateRect adn ValidateRgn are all implemented in terms of RedrawWindow with a different combination of flags. Just look at the documentation for all of hte flags for RedrawWindow in order to do the task that you are looking to do. You can force the window to repaint before the function returns, or you can simply queue it to repaint a certain portion. You can force the child windows to repaint as well as the parent windows of your current window. Here is an article that I wrote that goes into detail about RedrawWindow and the update region of a window: Guide To Win32 Paint for Intermediates[^]
Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life!