Where is the mouse now?

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.

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

In GLFW the solution is glfwGetMousePos(&x,&y) - which also happens to be a lot more portable and flexible than any win32api/MFC/whatever-proprietary solution.

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

I’m not using GLFW and I’m running out of time to learn it now . Thanks anyway marcus256 .