GetCursorPos function (winuser.h) - Win32 apps
Retrieves the position of the mouse cursor, in screen coordinates.