title: Dialog box as a tab page has different background color from a tab control it belongs
body: <p>I am creating a dialog with a tab control. Each tab should show different set of controls, so I have created <em>child dialog boxes</em> in resource editor to behave like pages.</p>
  <p>I have used instructions from <a href="https://stackoverflow.com/questions/776304/tab-control-background-in-atl-app-xp-styles/1237525#1237525">this</a> post to do this.</p>
  <p>In resource editor I made dialog boxes without border, set their styles to <code>Child</code>, removed system menu, and I have set flags <code>Control</code> and <code>Control Parent</code> to <code>true</code>.</p>
  <p>In my child dialog box procedures I have handled <code>WM_INITDIALOG</code> by adding <code>EnableThemeDialgTexture(handleOfmyDialog, ETDT_ENABLETAB);</code> and returning <code>TRUE</code>. No <code>WM_ERASEBKGND</code>, <code>WM_PAINT</code> or <code>WM_CTLCOLORDLG</code> have been overridden.</p>
  <p>In main dialog box that contains tab control, I have created &quot;child dialogs&quot; with <code>CreateDialog</code> function, and have used <code>MoveWindow</code> to properly position them.</p>
  <p>I did not use <code>EndDialog</code> to destroy &quot;child dialogs&quot; on <code>IDCANCEL</code> or <code>WM_CLOSE</code>, I think that they will get destroyed automatically.</p>
  <p>I have used Visual Studio 2013 on Windows 8.1 to do all this.</p>
  <p>There seems to be no problem on Windows 7 and Windows 8.1, but maybe my eyes are playing tricks with me, since the background color of the tab control is similar to the default background color of the dialog box. The problem is best seen on Windows XP, as shown on the picture below:</p>
  <p><img src="https://i.stack.imgur.com/mwG4f.png" alt="enter image description here" /></p>
  <p>How can I make background color of &quot;child dialogs&quot; ( and their child controls like checkbox/trackbar/radio button/static control ) to be transparent ( match the background color of tab control )?</p>
  <p>Thank you.</p>