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

Thread: Flooded WndProc

Threaded View

  1. #1
    Join Date
    Jul 2009
    Posts
    154

    Flooded WndProc

    Hello,

    I have this situation on Windows XP:

    My program is a window, so it has an entry in the task bar.

    If you rightmouse click on the item in taskbar (so that menu appears with Close, Maximize, Minimize, etc), then the window freezes because the WndProc gets flooded.

    1. WM_NCHITTEST
    2. WM_SETCURSOR
    3. WM_MOUSEMOVE
    and then start at 1. again. Infinitely until the rightmouse menu is gone again.

    How to prevent this? The messages get passed to the "return DefWindowProc()", so my code doesnt even handle the message in my WndProc.

    Code:
    while( DoAllPeekMessage() ) //<--- stuck here because flooded with message see above
    {
       Render(); //<-- never gets here in the stuck situation so window looks 'frozen'
    
       //etc.
    }
    Thank you for your time.
    Last edited by ProgrammerC++; June 29th, 2011 at 05:24 PM.

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