I am trying to replicate the GUI of the Powershell, Firefox, Word,... with the Win API in C++. We can see that the default title bar is removed and the client area is taking the whole window while keeping the default borders (see screenshot).
I want the window to respond to all functionalities correctly (aerosnap, resize, border colors, ...).
The closest I could get was by using a combination of
MARGINS margins = { 1 };
DwmExtendFrameIntoClientArea(hWnd, &margins);
and
case WM_NCCALCSIZE:
return 0;
But the window does not have the resize handles anymore and the borders are not taking the right color (when "Show accent color on title bars and window borders" is enabled in settings).
Do you know the recipe to get the desired result ?



SetWindowPos functionto move your window and resize it.