winapi - Spying while dragging the windows title bar -


After a

one click on the title bar of a normal WS_OVERLAPPEDWINDOW window, pulls only after a few mouse and feels a button release Are there.

Summary of messages received from Spies:

WM_SYSCOMMAND (SC_MOVE)

WM_MOUSEMOVE (*)

WM_CAPTURECHANGED

WM_ENTERSIZEMOVE

WM_MOUSEMOVE (*)

. .

WM_MOUSEMOVE (*)

WM_LBUTTONUP (*)

WM_CAPTURECHANGED

WM_EXITSIZEMOVE

WM_SYSCOMMAND (return) < / P>

I'm trying to understand the messages (*) I do not understand:

1) Mouse movements and buttons release windows are not in the client area. Therefore, instead of WM_MOUSEMOVE and WM_LBUTTONUP, I should have WM_NCMOUSEMOVE and WM_NCLBUTTONUP.

2) If I put a break on those messages (WM_MOUSEMOVE and WM_LBUTTONUP), in my window process, I do not have to stop the message by dragging the title bar of the search window!

1) Mouse movements and buttons are not in the release window client area, therefore, instead WM_MOUSEMOVE And WM_LBUTTONUP, I should be WM_NCMOUSEMOVE and WM_NCLBUTTONUP

I'm not sure about this one, but I think that can:. Perhaps the system always sends WM_MOUSEMOVE , and so on WM_NCMOUSEMOVE (based on the result of WM_NCHITTEST )

During a drag operation, the application does not get to see these messages anyway (as you saw), there is no point in conversion.

2) If I put a break on those messages (WM_MOUSEMOVE and WM_LBUTTONUP), in the process of my window, I do not stop the mixers while dragging the window's title bar !!!

Remember that WM_MOUSEMOVE and friends have not been posted, have not been sent. This means that they will usually flick through their message loop, and DispatchMessage .

will access your window process. When you start dragging a window, the loop will not return until the app has a so-called Model message loop drag, so until that time, your own message loop will not run! WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE are sent in the message window process when the modal loop is entered and runs out respectively.

Now, it may be that the modal loop sends messages in the process of your window; But (at least for WM_MOUSEMOVE and so on) this is not so. And this should not be done, because the modal loop itself is handling those messages - passing them through the process of victory can lead to confusion.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -