How could you achive it?
It always specified in screen coordinates! See MSDN article GetCursorPos Function:
The cursor position is always specified in screen coordinates and is not affected by the mapping mode of the window that contains the cursor.
The calling process must have WINSTA_READATTRIBUTES access to the window station.
The input desktop must be the current desktop when you call GetCursorPos. Call OpenInputDesktop to determine whether the current desktop is the input desktop. If it is not, call SetThreadDesktop with the HDESK returned by OpenInputDesktop to switch to that desktop.
...I tried GetCursorPos, it gives those screen coordinates but only inside the active window.
I meant that I receive the screen coordinates of the mouse pointer IF I'm above my application window. If I leave that window the GetCursorPos won't update - it shows the last values when the pointer was inside my window.