![]() |
Tab + Vista style = transparency problem |
Post Reply ![]() |
Author | |
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() Posted: 12 June 2007 at 4:08am |
I have a CXTTabCtrl with two CPropertyPage items. The problem is that the background of the property page is painted in gray, where a white color is expected:
![]() Ok, so let's enable transparency in dialog template. That should do it!
![]() It turns out that this causes many problems. First of all the controls disappear when moving the mouse (see above). Secondly, sometimes the application hangs completely and its window cannot be seen when pressing Alt+Tab. "Did I do that?"
I also tried the previously mentioned hack where this call was made in CMyPropertyPage::OnInitDialog:
XTPSkinManager()->EnableThemeDialogTexture(m_hWnd, ETDT_DISABLE); ... but it did not help |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Don't set transparent flag and call
XTPSkinManager()->EnableThemeDialogTexture(m_hWnd, ETDT_ENBLED); for both pages. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
Hi,
I've tried both ETDT_DISABLE and ETDT_ENABLE and I can't get rid of the gray background. This is what I do:
// CMyDialog::OnInitDialog
m_pageOne.Create(CPageOne::IDD, &m_tabCtrl);
m_pageTwo.Create(CPageTwo::IDD, &m_tabCtrl); m_tabCtrl.ModifyStyle(0, WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
m_tabCtrl.AddControl(_T("One"), &m_pageOne); m_tabCtrl.AddControl(_T("Two"), &m_pageTwo); m_tabCtrl.SetCurFocus(0); Then in OnInitDialog of CPageOne/CPageTwo:
XTPSkinManager()->EnableThemeDialogTexture(m_hWnd, ETDT_ENABLE);
|
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
I made a sample to make it easier to track the problem.
uploads/20070612_084123_tabctrl_hell.zip
|
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
Lol... the flag should be ETDT_ENABLETAB.
Thanks for the hint.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Right. :)
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |