shmnsw
shmnsw

Reputation: 649

Mouse event return value units

I'm not sure about the units of X and Y, but it's definitely not in pixels, is there a way to retrieve them as pixels (using the console with mouse clicks)

HANDLE hStdin; 
DWORD cNumRead; 
INPUT_RECORD irInBuf[1];

...    

irInBuf[i].Event.MouseEvent.dwMousePosition.X
irInBuf[i].Event.MouseEvent.dwMousePosition.Y

Upvotes: 1

Views: 111

Answers (1)

david.pfx
david.pfx

Reputation: 10863

The underlying units for mouse movements are (wait for it) mickeys. Seriously. And that's around 0.1 mm. But that isn't the answer you want.

According to MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/ms684239%28v=vs.85%29.aspx the units are character cells. Given that this is the character mode mouse on the console, I think that's correct.

Upvotes: 1

Related Questions