#define WINDOW_WIDTH 800
#define Window_height 600
Windows (non-client area) that are set up with a length of
So when we use the function GetClientRect (hwnd, &rect) to get the client area size rect.right for 782 rect.bottom for 555
So if you want to set up a client area of 600 x
RECT Rect1;
RECT Rect2;
GetWindowRect (hwnd, &RECT1); Four coordinates representing the upper-left and lower-right corners of the window rectangle in the x y-coordinate of the screen
GetClientRect (Main_window_handle, &rect2); Four coordinates represent the X y-coordinate of the upper-left and lower-right corners of the customer area, respectively
2*window_width-rect2.right equivalent to Window_width + (window_width–rect2.right)
Window_width–rect2.right Customer Area – 782
Expanding the window by 18 (800-782) pixels is also equivalent to expanding the client area by 18 pixels
MoveWindow (hwnd,
Rect1.left, Rect1.top,
2*window_width-rect2.right,
2*window_height-rect2.bottom,
true);
Windows client Area window size settings