Advertisement

mouseControl

Started by September 18, 2000 08:01 AM
0 comments, last by heywhatever 24 years, 3 months ago
Im currently removing all the glut elements of an old opengl rubiks cube program I wrote. My problem is replacing the mouse callbacks (glutmotionfunc, glutpassivefunc etc) with windows equivalents, for instance vk_lmbutton etc dont seem to work could anybody help me out here cheers
You could get a good Win32 help file or reference of any kind and lookup messages:
  • WM_LBUTTONDOWN
  • WM_LBUTTONUP
  • WM_RBUTTONDOWN
  • WM_RBUTTONUP
  • WM_MOUSEMOVE


  • To use keys, you can check out:
  • WM_KEYDOWN
  • WM_KEYUP
  • WM_COMMAND (in combination with an accelerator)
  • Or check directly:
        #define KEYDOWN(vk_code) (GetAsyncKeyState(vk_code) & 0x8000)if (KEYDOWN(VK_UP)){   ...}    



    (ps: Just wish we had a nice New Win32 Forum for problems like these )

  • This topic is closed to new replies.

    Advertisement