CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2011
    Posts
    4

    Question Does DefWindowProc while processing WM_ERASEBKGND use update region?

    Hi,
    I process WM_ERASEBKGND message for WS_CHILD window:
    Code:
      case WM_ERASEBKGND:
         GetUpdateRect(hWnd,&urect,FALSE);
        //...........
    In urect i always get {0,0,0,0}. That's why I ask: does DefWindowProc while processing WM_ERASEBKGND use update region or erase entire client area?

  2. #2
    Join Date
    Jun 2011
    Posts
    4

    Re: Does DefWindowProc while processing WM_ERASEBKGND use update region?

    Sorry, I was mistaken. In urect there is no always {0,0,0,0}. But my question still in force: Does DefWindowProc while processing WM_ERASEBKGND use update region or erase entire client area?

  3. #3
    Join Date
    Jun 2011
    Posts
    4

    Re: Does DefWindowProc while processing WM_ERASEBKGND use update region?

    I answer my question myself(it was checked) - Yes. But when BeginPaint send WM_ERASEBKGND internally, the update rect is always {0,0,0,0}. Why?
    I know that before returning BeginPaint validate the update rect and that's why it is always {0,0,0,0}. But how DefWindowProc or my own code in processing WM_ERASEBKGND message will know update region if GetUpdateRect always return {0,0,0,0}?

Tags for this Thread

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