![]() |
CXTPTabControl not skinned |
Post Reply ![]() |
Author | |
FSauer ![]() Groupie ![]() ![]() Joined: 10 May 2006 Location: Germany Status: Offline Points: 96 |
![]() ![]() ![]() ![]() ![]() 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 |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi
Try set xtpTabAppearancePropertyPage appearance to tab control.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
FSauer ![]() Groupie ![]() ![]() Joined: 10 May 2006 Location: Germany Status: Offline Points: 96 |
![]() ![]() ![]() ![]() ![]() |
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(); |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
its still xtpTabAppearancePropertyPageFlat .
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
FSauer ![]() Groupie ![]() ![]() Joined: 10 May 2006 Location: Germany Status: Offline Points: 96 |
![]() ![]() ![]() ![]() ![]() |
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? |
|
![]() |
|
FSauer ![]() Groupie ![]() ![]() Joined: 10 May 2006 Location: Germany Status: Offline Points: 96 |
![]() ![]() ![]() ![]() ![]() |
tabcontrol should be skinned with the matalic effect like menubar or statusbar
|
|
![]() |
|
FSauer ![]() Groupie ![]() ![]() Joined: 10 May 2006 Location: Germany Status: Offline Points: 96 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Tab content is separate window ?
Try add call m_wndTabControl.EnableTabThemeTexture(hWndChild, TRUE); |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
FSauer ![]() Groupie ![]() ![]() Joined: 10 May 2006 Location: Germany Status: Offline Points: 96 |
![]() ![]() ![]() ![]() ![]() |
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? |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Call EnableTabThemeTexture for Child window, not TabControl.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
FSauer ![]() Groupie ![]() ![]() Joined: 10 May 2006 Location: Germany Status: Offline Points: 96 |
![]() ![]() ![]() ![]() ![]() |
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? |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
FSauer ![]() Groupie ![]() ![]() Joined: 10 May 2006 Location: Germany Status: Offline Points: 96 |
![]() ![]() ![]() ![]() ![]() |
Hi Oleg,
thank you very much! Now it works. ![]() |
|
![]() |
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 |