PDA

View Full Version : Where is the mouse now?



04-07-2004, 10:50 AM
Hello ,

I wonder if ther is a tutorial to show me how to determine the moue pointer location (x,y) when moving over a window.

Thanks in advance for any help.

dlswimmer
04-07-2004, 11:38 AM
in just opengl, or in VS? in VS, allyou have to do is call getCursorPos(&Point) where Point is a POINT structure. Then just do Point.x and Point.y to get the current position

marcus256
04-07-2004, 11:10 PM
In GLFW (http://glfw.sf.net) the solution is glfwGetMousePos(&x,&y) - which also happens to be a lot more portable and flexible than any win32api/MFC/whatever-proprietary solution.

glcrazy
04-10-2004, 11:18 AM
What is meant by VS ?! Do you mean VC++ ?

I beleive I shoul use Motion Function , something about mouse events but don't know how exactly . who could show me the code of how to locate mouse pointer location in the window and output it as x and y ?.

Thanks for any cooperative

glcrazy
04-10-2004, 11:20 AM
I'm not using GLFW and I'm running out of time to learn it now . Thanks anyway marcus256 .