Print Page | Close Window

Tab + Vista style = transparency problem

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Skin Framework
Forum Description: Topics Related to Codejock Skin Framework
URL: http://forum.codejock.com/forum_posts.asp?TID=7362
Printed Date: 14 May 2024 at 7:26am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Tab + Vista style = transparency problem
Posted By: znakeeye
Subject: Tab + Vista style = transparency problem
Date 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 . Any ideas? Thanks!




Replies:
Posted By: Oleg
Date Posted: 12 June 2007 at 7:29am
Don't set transparent flag and call

XTPSkinManager()->EnableThemeDialogTexture(m_hWnd, ETDT_ENBLED); for both pages.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: znakeeye
Date Posted: 12 June 2007 at 8:25am
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);


Posted By: znakeeye
Date Posted: 12 June 2007 at 8:41am
I made a sample to make it easier to track the problem.
http://forum.codejock.com/uploads/20070612_084123_tabctrl_hell.zip - uploads/20070612_084123_tabctrl_hell.zip


Posted By: znakeeye
Date Posted: 12 June 2007 at 8:46am
Lol... the flag should be ETDT_ENABLETAB.
 
Thanks for the hint.


Posted By: Oleg
Date Posted: 13 June 2007 at 12:27am
Right. :)

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net