Hey everyone.
So i have a grid in my program that i want the user to be able to click and drag items around.
Im using the CALLBACK WindowProc to handle my mouseclicks at the moment, but that can only handle a click at one location (as far as i can work out). Is there an easy way to simulate click and hold and click and dragging? Maybe a way to constantly keep getting the mouse location that i dont know of?
Thanks,
M
Thanks for your reply, sorry its taken me so long to get back to you on this.
Im kinda rubbish with c++, but .net especially. Im not too sure how WM_MOUSEMOVE works. Say you wanted to just click and item and drag it across the screen, would you need a while loop constantly checking the co-ordinates?
Would you be able to provide some reading or sample code to describe how its used?
Thanks for your help either way,
M
When the mouse moves you get a message. Process the message. If the mouse is "continuously" moving, you will get the message repeatedly. The message also tells you what mouse buttons are pressed (if any), and whether the CTRL or SHIFT keys are pressed.
No need to constantly check coords. They are passed to you in the message.
Bookmarks