It doesn't work. Here's my code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 | RECT rect;
rect.left = 0;
rect.right = 1280;
rect.top = 0;
rect.bottom = 720;
AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW|WS_VISIBLE, 0); // The function return true
HWND window = CreateWindowEx(
0,
windowClass.lpszClassName,
"Title",
WS_OVERLAPPEDWINDOW|WS_VISIBLE,
CW_USEDEFAULT,
CW_USEDEFAULT,
rect.right,
rect.bottom,
0,
0,
NULL,
0);
// Some place else
RECT clientRect;
GetClientRect(window, &clientRect); // (1272, 689)
|
It's output:
Begin: rect = (1280, 720)
Adjust: rect = (1288, 728)
GetClientRect: rect = (1272, 689)