Can someone direct to place get code for using the windows mouse detection? I need to detect motion and clicks to move a box.
I meant to say motion without the open gl function. I want to use the windows mouse detection. Any help?
It depends on what you’re using for your Window creation. For Glut, you can setup mouse callback functions using glutMouseFunc and glutMotionFunc (I think MotionFunc is right, but I haven’t actually played with glut that much yet).
For standard Win32 applications, you trap for the WM_MOUSEMOVE, WM_LBUTTONDOWN, WM_RBUTTONDOWN, WM_RBUTTONUP, WM_LBUTTONUP events.
For MFC you override the OnLButtonDown (And OnRButtonDown and the Up variant for both) and OnMouseMove virtual functions of one of your classes (I usually do that from the CView derived class.)