Long story short, I'm building an i3-style tiling window manager, and need to override the chrome of arbitrary windows to compeltely remove borders, the titlebar, and associated buttons.
Having tried just about every logical combination of WS_STYLE and WS_EX styles relating to chroming, I'm getting nothing for most apps. It's fine with simple native programs (terminals work as expected), but for the vast majority of other apps, the same problem occurs;
The above result is present in most cases. There is a surrounding border which is of the same size, but with variant behaviour per app. As far as I can tell, this is the "transparent" (obviously not in this case) border used for mouse drag hittesting (although with the frame disabled in styling, this shouldn't be present). It seems that the framebuffer isn't being cleared in this area (i.e. if the window is resized into itself, the border is filled with previous pixels at that location).
This is a quick weekend project- my job isn't related to WinAPI programming, so this is all new to me, but if I'm assuming right then this border is effectively the non-client area? In other words, the non-clientarea must be zeroed so that the client area takes up the entire window rect. I've attempted to handle this by subclassing all target windows with GWL_WNDPROC and zeroing WM_NCCALCSIZE, but I'm getting the same result.
How can I force an arbitrary window (which I don't create myself) to completely remove it's entire non-client area?