AeroSnap is another type of resize sent by your window manager application. This way, you won’t recognize that it was a binding, and not some other type of resizing.
The best you can hope for is to find that the opposite edges were moved during the size event. You will need to check if the height or width has changed to distinguish it from the move event.
The reason you are not told that this is fast is because it is hard to imagine why the application will care about what the resizing mechanism is.
Comments more revealed your problem. You are trying to maintain your position and size of the applications when the application closes in order to restore it upon restart. You use GetWindowPlacement() for this and find that it returns the wrong position when the last window size was Aero Snap.
My own application works the same way, and I ran into the same problem. The solution I used was to call GetWindowRect() instead of GetWindowPlacement() to get the position and size of the window. You declare that this is not suitable for you, and in this case I have no idea what to offer. I must say, it’s hard for me to believe that GetWindowRect() does not return the correct rect window.
source share