0

How does one read the current position of mouse in windows using C++ ?
I want to access the the raw data from mouse and display the coordinates.

1 Answer 1

2

Using the Windows API, you could GetCursorPos(). I can't compile the code right now to test it, but it should work out something like this:

POINT cursor; if (GetCursorPos(&cursor)) { // Print out cursor.x and cursor.y } 

I'm sure you've done this, but be sure to include windows.h.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.