When you create a window you specify its size and position.
Alternatively there's GetWindowRect in the WinAPI.