Prev: To check POP3 mailbox from Visual C++ app
Next: Windows Message sent when Mouse is no in Client Area OR NCClient area
From: David Given on 23 Jan 2010 19:48 I find myself confused about the way Windows handles window resizing. What appears to happen, from my observations, is this: - user grabs edge of window. - event (don't know which one yet) arrives at app. - app calls DispatchMessage() which invokes the app's window proc. - app calls DefWindowProc(). - DefWindowProc() enters captive event loop, handles sizing, sending WM_SIZE / WM_SIZING to the app. - user lets go of window. - app's call to DefWindowProc() returns. - app returns from window proc. - app's call to DispatchMessage() returns. Is this correct? The reason why I ask is that my app's architecture --- dictated by the need to be portable --- uses an external event loop and calls into my Windows interface layer to receive events, rather than the Windows event loop calling out to the app to send it events. As such, I cannot return an event to the app unless DispatchMessage() returns. Since DefWindowProc() does not return during resizing, the app therefore cannot be notified that its window has resized, and therefore can't update the content. What I'm seeing is that the app only notices the window has resized when I let go of the edge of the window. Is there any way to make the window behave differently, i.e. to process one event at a time rather than entering a captive event loop to handle the entire resize operation? -- ┌─── dg@cowlark.com ───── http://www.cowlark.com ───── │ │ life←{ ↑1 ⍵∨.^3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵ } │ --- Conway's Game Of Life, in one line of APL |