RECT rect; if(GetWindowRect(hwnd, &rect)) { int width = rect.right - rect.left; int height = rect.bottom - rect.top; }