Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - CXTPTabControl not skinned
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPTabControl not skinned

 Post Reply Post Reply
Author
Message
FSauer View Drop Down
Groupie
Groupie
Avatar

Joined: 10 May 2006
Location: Germany
Status: Offline
Points: 96
Post Options Post Options   Thanks (0) Thanks(0)   Quote FSauer Quote  Post ReplyReply Direct Link To This Post Topic: CXTPTabControl not skinned
    Posted: 26 May 2011 at 8:14am
Hi Oleg,

I subclassed my CXTPTabControl from STATIC and set SS_NOTIFY style, but the tabcontrol isn't skinned with the matalic effect.
I skin my app in CMainFrame::OnCreate like below:
    XTPSkinManager()->LoadSkin(NULL, _T("Normalitunes.ini"));
    XTPPaintManager()->SetTheme(xtpThemeNativeWinXP);
    XTPPaintManager()->m_bFlatMenuBar = TRUE;
    XTPSkinManager()->SetApplyOptions
        (xtpSkinApplyMetrics|xtpSkinApplyFrame|xtpSkinApplyColors/*|xtpSkinApplyMenus*/);

What did I wrong?



Regards
FS
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: 27 May 2011 at 4:01am
Hi

Try set xtpTabAppearancePropertyPage appearance to tab control.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
FSauer View Drop Down
Groupie
Groupie
Avatar

Joined: 10 May 2006
Location: Germany
Status: Offline
Points: 96
Post Options Post Options   Thanks (0) Thanks(0)   Quote FSauer Quote  Post ReplyReply Direct Link To This Post Posted: 30 May 2011 at 10:35am
Hi Oleg,

I already set xtpTabAppearancePropertyPageFlat appearance to my tab control.
Just now, I set xtpTabAppearancePropertyPage appearance to my control, but this dont work, too.

Here is my code. Do you have an idea what could be wrong?

        CXTPClientRect rc(TabCtrl);
        TabCtrl->AdjustRect(FALSE, &rc);

        TabCtrl->ModifyStyle(0, WS_CLIPCHILDREN|WS_CLIPSIBLINGS|WS_TABSTOP);
        TabCtrl->ModifyStyleEx(0, WS_EX_CONTROLPARENT);
        TabCtrl->SetAppearance(xtpTabAppearancePropertyPageFlat );
        TabCtrl->SetAllowReorder(FALSE);
        TabCtrl->GetPaintManager()->m_bHotTracking = FALSE;
        TabCtrl->GetPaintManager()->m_bBoldSelected = TRUE;
        TabCtrl->GetPaintManager()->m_bStaticFrame = FALSE;
        TabCtrl->GetPaintManager()->SetLayout(xtpTabLayoutAutoSize);
        TabCtrl->GetPaintManager()->SetPosition(xtpTabPositionTop);
        TabCtrl->GetPaintManager()->m_rcControlMargin = CRect(0,0,0,0);
        TabCtrl->GetPaintManager()->m_rcClientMargin = CRect(0,0,0,0);
        TabCtrl->GetPaintManager()->m_rcButtonMargin = CRect(5,4,5,0);
        TabCtrl->GetPaintManager()->RefreshMetrics();

        TabCtrl->FindNavigateButton(xtpTabNavigateButtonLeft)->
                SetFlags((XTPTabNavigateButtonFlags)0);
        TabCtrl->FindNavigateButton(xtpTabNavigateButtonRight)->
                SetFlags((XTPTabNavigateButtonFlags)0);
        TabCtrl->GetPaintManager()->m_bDrawFocusRect=FALSE;
        TabCtrl->Reposition();

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: 30 May 2011 at 1:35pm
its still xtpTabAppearancePropertyPageFlat .
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
FSauer View Drop Down
Groupie
Groupie
Avatar

Joined: 10 May 2006
Location: Germany
Status: Offline
Points: 96
Post Options Post Options   Thanks (0) Thanks(0)   Quote FSauer Quote  Post ReplyReply Direct Link To This Post Posted: 30 May 2011 at 4:02pm
Hi Oleg,

also TabCtrl->SetAppearance(xtpTabAppearancePropertyPage );
dont set the metalic theme like the menubar or the statusbar. xtpTabAppearancePropertyPage and  xtpTabAppearancePropertyPageFlat seems to be different only by the flat state.

Have I misunderstood something?
Back to Top
FSauer View Drop Down
Groupie
Groupie
Avatar

Joined: 10 May 2006
Location: Germany
Status: Offline
Points: 96
Post Options Post Options   Thanks (0) Thanks(0)   Quote FSauer Quote  Post ReplyReply Direct Link To This Post Posted: 30 May 2011 at 4:03pm
tabcontrol should be skinned with the matalic effect like menubar or statusbar
Back to Top
FSauer View Drop Down
Groupie
Groupie
Avatar

Joined: 10 May 2006
Location: Germany
Status: Offline
Points: 96
Post Options Post Options   Thanks (0) Thanks(0)   Quote FSauer Quote  Post ReplyReply Direct Link To This Post Posted: 06 June 2011 at 8:10am
Hi Oleg,

I dont know what still wrong? I set xtpTabAppearancePropertyPage appearance to tab control, but the tab doesn't has the matalic effect!

Can you help me with this, please!

CXTPClientRect rc(TabCtrl);
TabCtrl->AdjustRect(FALSE, &rc);
TabCtrl->SetAppearance(xtpTabAppearancePropertyPage);

Best Regards

FS
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: 06 June 2011 at 11:24am
Hi,

Tab content is separate window ?
Try add call m_wndTabControl.EnableTabThemeTexture(hWndChild, TRUE);
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
FSauer View Drop Down
Groupie
Groupie
Avatar

Joined: 10 May 2006
Location: Germany
Status: Offline
Points: 96
Post Options Post Options   Thanks (0) Thanks(0)   Quote FSauer Quote  Post ReplyReply Direct Link To This Post Posted: 06 June 2011 at 12:44pm
Hi Oleg,

now the tab-buttons are skinned, but the background not yet:


The childwindow is derivated from CXTResizePropertyPage.


    CXTPTabControl* TabCtrl = (CXTPTabControl*)pTab;
    if(TabCtrl)
    {
        CXTPClientRect rc(TabCtrl);
        TabCtrl->AdjustRect(FALSE, &rc);

        TabCtrl->ModifyStyle(0, WS_CLIPCHILDREN|WS_CLIPSIBLINGS|WS_TABSTOP);
        TabCtrl->ModifyStyleEx(0, WS_EX_CONTROLPARENT);
        TabCtrl->SetAppearance(xtpTabAppearancePropertyPage);
        TabCtrl->SetAllowReorder(FALSE);
        TabCtrl->GetPaintManager()->SetColor(xtpTabColorWinXP);
        TabCtrl->EnableTabThemeTexture(TabCtrl->GetSafeHwnd(), TRUE);
        TabCtrl->GetPaintManager()->m_bHotTracking = FALSE;
        TabCtrl->GetPaintManager()->m_bBoldSelected = TRUE;
        TabCtrl->GetPaintManager()->m_bStaticFrame = FALSE;
        TabCtrl->GetPaintManager()->SetLayout(xtpTabLayoutAutoSize);
        TabCtrl->GetPaintManager()->SetPosition(xtpTabPositionTop);
        TabCtrl->GetPaintManager()->m_rcControlMargin = CRect(0,0,0,0);
        TabCtrl->GetPaintManager()->m_rcClientMargin = CRect(0,0,0,0);
        TabCtrl->GetPaintManager()->m_rcButtonMargin = CRect(5,4,5,0);
        TabCtrl->GetPaintManager()->RefreshMetrics();
        TabCtrl->FindNavigateButton(xtpTabNavigateButtonLeft)->SetFlags((XTPTabNavigateButtonFlags)0);
        TabCtrl->FindNavigateButton(xtpTabNavigateButtonRight)->SetFlags((XTPTabNavigateButtonFlags)0);
    //    TabCtrl->GetPaintManager()->m_clientFrame = (XTPTabClientFrame)1;
        TabCtrl->GetPaintManager()->m_bDrawFocusRect=FALSE;
        TabCtrl->Reposition();
    }



Could you please help me?
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: 07 June 2011 at 1:52am
Call EnableTabThemeTexture for Child window, not TabControl.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
FSauer View Drop Down
Groupie
Groupie
Avatar

Joined: 10 May 2006
Location: Germany
Status: Offline
Points: 96
Post Options Post Options   Thanks (0) Thanks(0)   Quote FSauer Quote  Post ReplyReply Direct Link To This Post Posted: 07 June 2011 at 3:20am
Hi Oleg,

that has no effect on my childwindow (m_pageContacts derivated from CXTResizePropertyPage) background color!
        TabCtrl->SetAppearance(xtpTabAppearancePropertyPage);
        TabCtrl->GetPaintManager()->SetColor(xtpTabColorWinXP);
        TabCtrl->EnableTabThemeTexture(m_pageContacts.GetSafeHwnd(), TRUE);


Do you have an further idea what could be wrong? Is in childwindow something to set?
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: 07 June 2011 at 3:58am
Tested with our TabbedToolbar sample, and seems this one should finally work:

m_wndTabControl.SetAppearance(xtpTabAppearancePropertyPage);
m_wndTabControl.SetColor(xtpTabColorWinXP);

XTPSkinManager()->EnableThemeDialogTexture(m_pageTheme, ETDT_ENABLETAB);
XTPSkinManager()->EnableThemeDialogTexture(m_pageTabControl, ETDT_ENABLETAB);

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
FSauer View Drop Down
Groupie
Groupie
Avatar

Joined: 10 May 2006
Location: Germany
Status: Offline
Points: 96
Post Options Post Options   Thanks (0) Thanks(0)   Quote FSauer Quote  Post ReplyReply Direct Link To This Post Posted: 07 June 2011 at 4:49am
Hi Oleg,

thank you very much!
Now it works. Tongue


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.234 seconds.