I want to set anexact client size (say 300 x 300) when I create a normal ‘overlapped’ window.
There is the AdjustWindowRectEx() function where I can pass the desired client
area and get sizes that I can pass to CreateWindowEx but it says
in the documentation that I should not use it for overlapped windows
and I do not understand why.
When I pass 300 x 300, I got 306 x 326 from it, and when I receive
WM_SIZE, the client size is 298 x 298 so it is 2 pixels too small.
How to create overlapped window with exact given client size?
My mistake in my case was the following:
Changing to this fixes it: