Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
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.
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.
windows.h
Add a comment
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.