Not perfect may be, but works for me
"Not perfect", indeed. You're responding to "button down" messages instead of letting Windows process button
clicks. It may not matter that much normally but introduces an element of surprise that will annoy users some times (and some users all the times). Best of luck to you
What is happening here (simplyfied a lot) is that as soon as Windows detects a button-down event on the non-client area it stops sending update messages, gets a snapshot of the window and gets ready to start drawing all those nice effects for window-moving, -resizing, etc. The window then stays frozen until the corresponding mouse-up ends the impasse.
Nothing you can do about it, except--as shown by boblx--interfere with the process, which is not recomended.