Drag and Drop Text
-
Hi , I am trying to create an editor similar to MS VisualStudio's Resource Editor for Dialog. In this I need to create a Label, which would contain Text and be dragged around and also be resized. Can some one tell me how it can be done. Thanks, Sansky :-D
-
Hi , I am trying to create an editor similar to MS VisualStudio's Resource Editor for Dialog. In this I need to create a Label, which would contain Text and be dragged around and also be resized. Can some one tell me how it can be done. Thanks, Sansky :-D
Howdy, I think you would need to override several mouse functions in your Label class to do the following: OnLButtonDown: Track when the user clicks and if they have the left button down so that you can know what to do when they move the mouse OnLButtonUp: Again, use this to remember the mouse button state OnMouseMove: Inside here test to find out if the mouse button is down and if so, use MoveWindow to move your window to the same coordinates as the mouse is moving to I think that should do it, but this is just a guess. Hope it gives you a good direction to start looking... Dave
-
Howdy, I think you would need to override several mouse functions in your Label class to do the following: OnLButtonDown: Track when the user clicks and if they have the left button down so that you can know what to do when they move the mouse OnLButtonUp: Again, use this to remember the mouse button state OnMouseMove: Inside here test to find out if the mouse button is down and if so, use MoveWindow to move your window to the same coordinates as the mouse is moving to I think that should do it, but this is just a guess. Hope it gives you a good direction to start looking... Dave
Hi, Thanks, What I need is, how do I create, display ,move and resize Label Also I might need to display the Label in the CView, as I am not sure if I could drag and resize objects in CDialog. Any suggestions Regards, Sansky :-D