1

I have a CTabCtrl and I am using WindowsBlinds to skin my computer GUI.

Tab Control

This is a MFC CDialog object.

Is there anything I can do in code so that the grey area renders transparent?

I tried setting the transparent resource property but it did not work.

Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
  • What if u delete background with OnEraseBackground() function – Santosh Dhanawade Jul 05 '17 at 04:00
  • I am not sure that this works without using custom draw / ownerdraw. The function DrawThemeParentBackground will help you in a themed enviroment. – xMRi Jul 05 '17 at 08:49
  • @xMRi Thanks to you both. I was hoping there was a simple solution for this. I don't think it is worth creating a new control for such a cosmetic adjustment. Thanks all the same. – Andrew Truckle Jul 05 '17 at 08:54
  • 1
    Side note: There is no reason at this moment to use a `CTabCtrl`. A `CMFCTabCtrl` is far superior. – sergiol Jul 05 '17 at 14:27
  • @sergiol Interesting. In my case though I on need the tab buttons. Under that is just the same tree control. Is it worth changing over for that? – Andrew Truckle Jul 05 '17 at 14:35
  • @AndrewTruckle: It is. With `CTabCtrl` you have to manage manually visibility and enabled/disabled state of controls at the moment user switches among each tab. In `CFMCTabCtrl` you don't have to do anything manually; you only have to pass to `AddTab` a pointer to the control which will be the background of the tab, which can be anything cast'able to `CWnd*` – sergiol Jul 05 '17 at 14:56
  • @sergiol in my case it would be the same tree control. But it is already on the dialog resource. I only change what the control shows based on tab clicked. The tree event handlers are the same for both ways of showing data. – Andrew Truckle Jul 05 '17 at 14:59

0 Answers0