property page inside property sheet paints incorrect background on windows 11

184 Views Asked by At

My standard win32 program overrides WM_CTLCOLORDLG to offer "dark mode" dialogs, returning a brush according to the documentation. The code works fine for all windows from 98 to 10.

For windows 11, although plain dialogs show with a dark background without problem, those inside a property sheet (again standard using PropertySheet API) don't paint correctly, as in this picture

dark property page in w10 and w11

notice that individual controls in the page paint correct dark backgrounds, but the property page dialog doesn't

The WM_CTLCOLORDLG handler is called, but the returned background brush is ignored in this case. Has anyone tried "custom" property pages in windows 11?

0

There are 0 best solutions below