Click here to Skip to main content
15,563,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can i get the coordinates (initial and final both) from the drag of mouse on a message box in MFC.

What I have tried:

I have tried OnMouseMove() from whose CPoint i can get the coordinates of the drag in a mesaage box but i want initial coordinates when the mouse started to drag. So i am confused at that part how to get that.
Posted
Updated 3-Oct-21 13:21pm

1 solution

You need to implement an OnLButtonDown method to handle when the left mouse button is pressed and save the point that is passed to it.

For more info on drag and drop operations, this article might be useful : Drag & Drop Images and Drop Descriptions for MFC Applications[^]
 
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