After painting to the screen's dc, how do I tell the screen dc to repaint itself so that what ever I drew will disappear?
I tried the following, but it doesn't work:
SendMessage HWND_BROADCAST, WM_PAINT, 0, 0
Any help would be appreciated..
Dan
Printable View
After painting to the screen's dc, how do I tell the screen dc to repaint itself so that what ever I drew will disappear?
I tried the following, but it doesn't work:
SendMessage HWND_BROADCAST, WM_PAINT, 0, 0
Any help would be appreciated..
Dan
InvalidateRect will do it. You will need the hwnd of the desktop though.
Try this code, I got it from ALLAPI.net, a very usefull website!
Code:Private Declare Function InvalidateRect Lib "user32" (ByVal hwnd As Long, lpRect As Long, ByVal bErase As Long) As Long
' This will repaint all windows and the desktop
InvalidateRect 0&, 0&, False
Thanks for the refresh code. Worked like a charm!
i think u can use the RedrawWindow API
or UpdateWindow
YAY another response to a 2 year old post :D
i did't saw the date of submition