Advertisement

Mouse cords?

Started by November 05, 2003 04:19 PM
1 comment, last by psan 21 years, 4 months ago
Hi! I was just wondering if there is a easy way to get the mouse cords over the opengl screen? And how to hide the mouse.. I don´t want to use aux or glut.. Thanks //psan
You can find the mouse cords like you can with the virtual keys in winproc. Like:

case WM_MOUSEMOVE:{	mouse_x = LOWORD(lParam);          	mouse_y = HIWORD(lParam);	return 0;}


Oh and to enable and disable the mouse you use ShowCursor();
In the () just use TRUE or FALSE
---------------------------
The pipes clangor all the time.

[edited by - pipes clangor on November 5, 2003 12:19:53 AM]
---------------------------The pipes clangor all the time.
Advertisement
thx, the showcursor() function workes great, but I can´t get the other to work.. My intelligent guess is that I need to write some other code to get it to work

I´ve checked some webpages about it, maybe i´m stupid, but I can´t see what else I need in my program.

the code i´m refering to is:

case WM_MOUSEMOVE:{	  mouse_x = LOWORD(lParam);          	  mouse_y = HIWORD(lParam);	  return 0;}


edit: think i understand now, had to place it in "WndProc", know i just have to translate those cords to use them as -1,1 opengl cords

//Psan

[edited by - psan on November 6, 2003 8:04:42 AM]

This topic is closed to new replies.

Advertisement