Intercepting WM_WINDOWPOSCHANGED

I'm intercepting WM_WINDOWPOSCHANGED for my MainWindow to do some stuff.
My problem is now, when I drag the window with the mouse, I'm getting 100s of WM_WINDOWPOSCHANGED messages from Windows per second and I would like to execute just the last of them, meaning after the user has released the mouse button and the window has reached it's desired position.
Is there a way to combine other windows messages like mousebutton actions with WM_WINDOWPOSCHANGED, to tell when the moving is finished without missing the last of these messages?
In WM_WINDOWPOSCHANGED, you could try just setting a bool variable like window_moved = true;

Then, in the mouse release event, check if window_moved is true, and if so do the corresponding action, and set window_moved back to false.
Hmm, yes, that's an idea, thanks.
You may have a look at the WM_EXITSIZEMOVE message.
Topic archived. No new replies allowed.