CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Wm_paint

  1. #1
    Join Date
    Apr 2003
    Posts
    4

    Wm_paint

    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 ()?

  2. #2
    Join Date
    Mar 2001
    Posts
    168
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured