Why is CTabCtrl background white, not the colour of the dialog

632 views Asked by At

Within Visual Studio 2017 I created an MFC dialog-based application from scratch. In the dialog editor I dropped a Tab Control on then used Add Variable... to create a data member of type CTabCtrl and added a couple of lines in OnInitDialog() to create some empty tabs. The result is here:

Tab control white

When I add content (dialogs) to the tabs, and the dialogs are smaller than the tab control, the white background looks especially ugly.

If I do the same in Visual Studio 2008 the background is grey, like the dialog.

My questions are:

  1. Why did this change from VS2008 to VS2017?
  2. What can I do simply to make the background the same as the dialog? My current fix is to derive from CTabCtrl, and handle WM_ERASEBKGND and WM_PAINT (as mentioned here) which is much more code than I want to support.
0

There are 0 answers