Converted from SourceForge issue 2930967, submitted by ttencate
Sometimes, moving/resizing doesn't stop when I let go of the mouse button. This happen due to a race condition, that causes the mouse-up to be eaten. This eating of messages that arrive at a bad moment needs to be reconsidered.
Possible solution: do not call any API functions from the hook handler, but post everything into a message queue for a separate thread. That thread will not do any GUI stuff or modal loops, so everything will be processed right away, and sequentially.