Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - Tab + Vista style = transparency problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Tab + Vista style = transparency problem

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: Tab + Vista style = transparency problem
    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!

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post 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);
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2007 at 8:41am
I made a sample to make it easier to track the problem.
uploads/20070612_084123_tabctrl_hell.zip
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2007 at 8:46am
Lol... the flag should be ETDT_ENABLETAB.
 
Thanks for the hint.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 13 June 2007 at 12:27am
Right. :)
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.