The SetWindowPos() function takes coordinates relative to the parent window. However, GetWindowRect() returns screen coordinates. So you have to call the ScreenToClient() function using the same parent window in order to get the original coordinates. The GetClientRect() function returns coordinates relative to the window being used, so the top & left coordinate is always (0,0). In all cases, the width & height are always the same.