Can I redraw a entire client area of window at processing of WM_PAINT? It is necessary for me to redraw all completely, and not just a part of a window which needs to be updated. Is there something except InvalidateRect () and RedrawWindow ()?
Printable View
Can I redraw a entire client area of window at processing of WM_PAINT? It is necessary for me to redraw all completely, and not just a part of a window which needs to be updated. Is there something except InvalidateRect () and RedrawWindow ()?
If in your program the need to redraw everything arises, you need to call
InvalidateRect(HWND hWnd,RECT rect,BOOL erasebkgnd);
The second two can be set to 0/false if you want to redraw everything.
The problem is - when you already are getting the WM_PAINT message, windows clips everything that has not been included in the InvalidateRect call (even if the system issues it), and you cannot redraw everything.
Edit: I did not answer your question clearly: No, there is nothing you can do about it. Unless you call InvalidateRect yourself, windows will clip your hDC automatically.