A picture is worth a thousand words, so:
I use DwmExtendFrameIntoClientArea(this.Handle, AeroMargins);
Where AeroMargins is a structure with Left, Right, Top, and Bottom properties. It works fine on Vista, Windows 7, and Windows 8 and 8.1.
However on Windows 10, there is a change in the window background where Left and Right margins end. It's exactly the same code that produces different results on Windows 10. Some colors (that you can pick in Settings, Personalization, Colors) are less obvious than others, but all show this defect. Has anything changed in Windows 10 that the old DWM code is not valid anymore?