Click here to Skip to main content
15,881,630 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
I want to determine if user is dragging listview item, by pressing ( and holding ) left mouse button.

I am processing WM_MOUSEMOVE[^] and testing if user is dragging with if( wParam & MK_LBUTTON ).

Does this condition give me 100% accurate info about user dragging the mouse, or are there other pitfalls ( when testing like this ) I am unaware of?
Posted
Updated 9-Mar-15 8:40am
v2

1 solution

You should consult this fine article on our site. Pay attention to the handling of the notifications. :-O
 
Share this answer
 
Comments
AlwaysLearningNewStuff 9-Mar-15 14:38pm    
That code has serious flaw when user selects multiple items, as was reported in one of the messages. I have managed to write my own code that seems to remedy the problem. I just want to remove variable that detects dragging, hence this question.

Thanks for answering.

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