S
suhas
Hi,
I have an MDI app that allows user to create flowcharts.
User can drag flowchart objects (squares, rectangles,
elipses, etc) from the toolbar and put on a form. They
should be able to move the objects around on the form.
This is where the problem is, I have implemented this
using the mouse_down, mouse_up and mouse_move events of
the form. When user selects a object, I receive the
mouse_down mesg, in which I save the current mouse
coordinates. When user drags the object around I receive
mouse move events, in which I compute the distance that
the mouse has moved and move the object by that distance.
When the object is moved, that itself generates new
mouse_move events in the opposite direction. Why are these
events generated and how can I prevent them?
Thanks,
Suhas
I have an MDI app that allows user to create flowcharts.
User can drag flowchart objects (squares, rectangles,
elipses, etc) from the toolbar and put on a form. They
should be able to move the objects around on the form.
This is where the problem is, I have implemented this
using the mouse_down, mouse_up and mouse_move events of
the form. When user selects a object, I receive the
mouse_down mesg, in which I save the current mouse
coordinates. When user drags the object around I receive
mouse move events, in which I compute the distance that
the mouse has moved and move the object by that distance.
When the object is moved, that itself generates new
mouse_move events in the opposite direction. Why are these
events generated and how can I prevent them?
Thanks,
Suhas