Geeks With Blogs
Prabhu Kumar a tech twaddler..
You could sure use some mouse input with the marbles. Remove the timer stuff from the DDEX3 program that we modified and add handling for WM_LBUTTONDOWN, WM_LBUTTONUP and WM_MOUSEMOVE messages in the WindowProc() function. You will need to add some code to find out if WM_LBUTTONDOWN was on the marble and then move the position of the marble relative to its last position whenever you get WM_MOUSEMOVE message.

Here is a video of it:




If you run this in debug mode you can notice considerable lag because it runs over the debugger. The video here shows the application running normally, i.e. I select the program to "Start Without Debugging" (ctrl + F5).

Posted on Friday, July 31, 2009 12:20 AM | Back to top


Comments on this post: Draggin the marbles around, DirectDraw, Part 9

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © TechTwaddle | Powered by: GeeksWithBlogs.net