![]() |
How to set a skin to CXTPropertySheet and Pages? |
Post Reply
|
| Author | |
evoX
Senior Member
Joined: 25 July 2007 Status: Offline Points: 207 |
Post Options
Thanks(0)
Quote Reply
Topic: How to set a skin to CXTPropertySheet and Pages?Posted: 30 July 2008 at 1:56pm |
|
I want to use the office 2007 skin for a CXTPropertySheet with TaskPanel navigator. The navigator appears with the office 2007 skin, but the main property sheet not, also the pages from property sheet don't load the skin. I have tried this line in oninitdialog and constructor, but no success BOOL bRes=XTPSkinManager()->LoadSkin(NULL, _T("NORMALBLUE.INI"));
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 31 July 2008 at 1:48am |
|
Hi,
Have to work in constructor. Send sample project.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
evoX
Senior Member
Joined: 25 July 2007 Status: Offline Points: 207 |
Post Options
Thanks(0)
Quote Reply
Posted: 31 July 2008 at 8:35am |
|
I don't have sample project, but this is the only code which deals with the property sheet
CPropSheetDlg::CPropSheetDlg() { //////////////////////////////////////////// // Apply the SkinBOOL bRes=XTPSkinManager()->LoadSkin(NULL, _T( "NORMALBLUE.INI"));} BOOL CPropSheetDlg::Create() { //////////////////////////////////////////CFont* pFont = m_pSheet->GetFont(); if (!CXTPTaskPanel::Create(WS_VISIBLE | WS_CHILD | WS_GROUP | WS_TABSTOP, CRect(0, 0, 0, 0), m_pSheet, 1000)) return FALSE;SetBehaviour(xtpTaskPanelBehaviourList); SetTheme(xtpTaskPanelThemeShortcutBarOffice2007); SetSelectItemOnFocus(TRUE); this->m_rcNavigatorMargin.top=80;SetIconSize(CSize(32, 32)); SetFont(pFont); CXTPTaskPanelGroup* pGroup1 = AddGroup(0); pGroup1->SetCaption(_T( "Main"));CXTPTaskPanelGroup* pGroup2 = AddGroup(1); pGroup2->SetCaption(_T( "Registry"));CXTPTaskPanelGroup* pGroup3 = AddGroup(2); pGroup3->SetCaption(_T( "Internet"));CXTPTaskPanelGroup* pGroup4 = AddGroup(3); pGroup4->SetCaption(_T( "Options")); for (int i = 0; i < m_pSheet->GetPageCount(); i++){ CXTPPropertyPage* pPage = m_pSheet->GetPage(i); CString strCaption = pPage->GetCaption(); CXTPTaskPanelGroupItem* pItem = pGroup1->AddLinkItem(i, i); pItem->SetCaption(strCaption); pItem->SetItemData((DWORD_PTR)pPage); pPage->m_dwData = (DWORD_PTR)pItem; } GetImageManager()->SetIcon(IDR_MAINFRAME, 0); //GetImageManager()->SetIcon(IDI_TASKS, 1); //GetImageManager()->SetIcon(IDI_NOTES, 2);
m_pSheet->SetPageBorderStyle(xtpPageBorderBottomLine); /////////////////////////////////////////// if (!m_wndCaption.Create(m_pSheet, _T("WinSysClean"), CPWS_EX_RAISED_EDGE,WS_VISIBLE|SS_CENTER|SS_CENTERIMAGE, CRect(0,-7,900,80), 1001)) { TRACE0( "Failed to caption window.\n"); return -1;} return TRUE;}
//////////////////////////////////////////////////////////////// void CPropSheetDlg::OnPageSelected(CXTPPropertyPage* pPage){ CXTPTaskPanelGroupItem* pItem = (CXTPTaskPanelGroupItem*)pPage->m_dwData; SetFocusedItem(pItem); } void CPropSheetDlg::SetFocusedItem(CXTPTaskPanelItem* pItem, BOOL bDrawFocusRect /*= FALSE*/, BOOL bSetFocus){ if (m_pItemFocused != pItem && pItem && pItem->GetType() == xtpTaskItemTypeLink){ CXTPPropertyPage* pPage = (CXTPPropertyPage*)pItem->GetItemData(); if (!m_pSheet->SetActivePage(pPage)){ return;} } CXTPTaskPanel::SetFocusedItem(pItem, bDrawFocusRect, bSetFocus); } |
|
![]() |
|
evoX
Senior Member
Joined: 25 July 2007 Status: Offline Points: 207 |
Post Options
Thanks(0)
Quote Reply
Posted: 31 July 2008 at 8:56am |
|
Is it possible to make a tabcontrol with a taskpanel navigator ? Then I can use a clasic dialog with a tabcontrol insde, instead of propertysheet. |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 August 2008 at 2:34am |
|
Check Samples\Controls\PropertySheet - shows how to use TaskPanel as navigator.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
evoX
Senior Member
Joined: 25 July 2007 Status: Offline Points: 207 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 August 2008 at 9:04am |
|
but in that sample it's used as navigator for a propertysheet, not for a tabcontrol
I want to use a TabControl inside a dialog with taskpanel navigator, but propertysheet is very limited in functionality and impossible to make it the main application window.
|
|
![]() |
|
evoX
Senior Member
Joined: 25 July 2007 Status: Offline Points: 207 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 August 2008 at 7:50pm |
|
I am still trying to figure out how to make a TabControl with taskpanel customnavigator, the sample Samples\Controls\ProtpertySheet shows how to use a propertysheet with a taskpanel navigator, but this does not work for a tabcontrol
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 August 2008 at 2:12am |
|
Hi, \TabControl can't be used with any navigator. Just add Taskanel and manually show hide child dialogs. without TabControl.
|
|
|
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 |