Question

For some time I have been struggling with this glitch in MFC. It can be easily observed.

  • In Visual Studio 2012 Update 1 create a new MFC application,
  • in wizard settings set Multiple documents/Tabbed documents, Office 2007 Black style
  • run the application on Windows 7:

Application launched while Windows 7 Aero theme is on:

Windows 7 Aero

Theme in Windows control panel set to Windows 7 Basic:

Windows 7 Basic

Theme in Windows control panel set back to Windows 7 Aero:

Windows 7 Aero again

Notice the unpainted gaps when aero off, and black title with missing close button when aero back on.

This problem has always been around, in Visual Studio 2010 wizard generated application used to work ok with themes switching through Windows control panel, but still showed black title after aero was disabled/reenabled with DwmEnableComposition() API call.

I hoped that in Visual Studio 2012 the problem was sorted out, but seems it was not. So what can I do to workaround the bug?

Was it helpful?

Solution

I suppose that Windows Aero Glass background is broken after hibernate. How can I solve this? is basically the same problem.

Hence the answer to that question should be what you are looking for.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top