Click here to Skip to main content
15,885,890 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello.
I added wm_mousemove event in dlgClass.
When I moved mouse point on ListCtrl, ButtonCtrl, Combobox, editCtrls in Dialog, it didn't enter MouseMove Event.
why didn't enter mousemove....

how to enter wm_mousemove event regardless of ctrls.
Posted

1 solution

The WM_MOUSEMOVE message is posted to the window beneath the mouse cursor when the mouse is not captured. So the message is posted to the control window and not the dialog window when the mouse is over a control.

The solution is to capture the mouse in the dialog window. Then all mouse messages are send to the captured window when the cursor is over the window, or the mouse button was pressed when over the window and the button is still down.

See CWnd::SetCapture[^] in the MSDN. The article Using SetCapture() and ReleaseCapture() correctly (usually during a drag n' drop operation).[^] may be also useful.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900