This is the code I have:
//Create Window
DWORD windowStyle = WS_VISIBLE;
DWORD windowExStyle = WS_EX_OVERLAPPEDWINDOW;
SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_SYSTEM_AWARE);
RECT client{ 0, 0, 100, 40 };
UINT dpi = GetDpiForSystem();
AdjustWindowRectExForDpi(&client, windowStyle, false, windowExStyle, dpi);
UINT adjustedWidth = client.right - client.left;
UINT adjustedHeight = client.bottom - client.top;
m_hwnd = CreateWindowEx(windowExStyle,
className.c_str(),
windowName.c_str(),
windowStyle,
CW_USEDEFAULT,
CW_USEDEFAULT,
adjustedWidth,
adjustedHeight,
nullptr,
nullptr,
m_hInstance,
m_emu
);
The generated window has a client area of 1 pixel in height, even though I'm asking for 40. so I'm always getting 39 pixel less than what I need...can someone help me with this? x_x