Mouse cords?
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:
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]
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.
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:
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]

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
Popular Topics
Advertisement
Recommended Tutorials
Advertisement