Tuesday 15 March 2011

c++ - WM_ENTERSIZEMOVE / WM_EXITSIZEMOVE - when using menu, not always paired -


To prevent your application from changing window contents, when the user is moving around its window, I WM_ENTERSIZEMOVE / WM_EXITSIZEMOVE and I stop the application between messages. However, sometimes it happens that I get WM_ENTERSIZEMOVE but no WM_EXITSIZEMOVE not at all.

  • Click on the size
  • Instead of resizing the window, click on the window
  • WM_EXITSIZEMOVE not received notice.

    While examining how it works, I have also tested the Microsoft DirectX sample and I have seen the same problem. Once you have followed the revised steps above, the sample application appears to be frozen (I have now tried to do it with a basic HLSL sample from March 200 6 SDK).

    How is the application expected to react to this? Are there some other conditions that "transferring or shaping modal loop"

    Should end?

    I know that it's too late, but it still can help you - and there is a possibility to help other people to do it like I did.

    It seems that in the case you mentioned, a WM_CAPTURECHANGED message is sent when the resizing is "Canceled". After extensive testing it seems that it is always sent before WM_EXITSIZEMOVE (or should!), And there is no other stage between WM_ENTERSIZEMOVE / WM_EXITSIZEMOVE.

    The WM_CAPTURECHANGED message is also sent at several other times, so if you have sent a WM_ENTERSIZEMOVE message, you only need a response to it, but the following is not WM_EXITSIZEMOVE.


    No comments:

    Post a Comment