![]() |
Property sheet Problem |
Post Reply ![]() |
Author | |
kkkfengkkk ![]() Newbie ![]() Joined: 12 August 2006 Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() Posted: 16 August 2006 at 4:56am |
Hi, I am going to implement a series of wizard dialog and used MFC's CPropertySheet and CPropertyPage at first. But I need to have XP style toolbar in each dialog, so it seems that I have to derived from CXTPCustomizeSheet and CXTPCustomizeCommandsPage,and then it is able to use CXTPCommandBar. But I failed. how to construct CXTPCustomizeSheet and CXTPCustomizeCommandsPage, it seems defferent with MFC, Is there any sample code about Property sheet? Please give me a hand...
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
You can create toolbars without CXTPCommandBars just using CreateToolBar and manually position them.
See Samples\UserInterface\GUI_Whidbey\PropertiesPane.cpp
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
kkkfengkkk ![]() Newbie ![]() Joined: 12 August 2006 Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() |
Sorry, The sample of GUI_Whidbey is missing in my Samples\UserInterface\ **, is there any other sample could give me more information? I opened CommandBars_vc80.sln and search CXTPToolBar as keywords, it seems that all need a CXTPCommandBars,
i.e: CXTPToolBar* pStaticBar = (CXTPToolBar*)pCommandBars->Add(_T("Static Bar"), xtpBarTop);
But my dialog is derived from CPropertyPage,how to get the handle of CXTPCommandBars? It seems that I could not derived my dialog from CXTPDialog.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
I guess you have single CommandBars product... Yes Gui_Whidbey sample is part of toolkit pro...
Some hints:
1. Add CXTPToolBar m_wndToolBar member to class
2. create it:
VERIFY(m_wndToolBar.CreateToolBar(WS_TABSTOP|WS_VISIBLE|WS_CHILD|CBRS_TOOLTIPS, this));
m_wndToolBar.LoadToolBar(..); 3. manually calc size and move in OnSize handler:
void CClassViewPane::OnSize(UINT nType, int cx, int cy)
{ CWnd::OnSize(nType, cx, cy); int nTop = 0;
if (m_wndToolBar.GetSafeHwnd())
{ CSize sz = m_wndToolBar.CalcDockingLayout(cx, /*LM_HIDEWRAP|*/ LM_HORZDOCK|LM_HORZ | LM_COMMIT); m_wndToolBar.MoveWindow(0, nTop, cx, sz.cy);
m_wndToolBar.Invalidate(FALSE); nTop += sz.cy; } if (m_wndClassView.GetSafeHwnd())
{ m_wndClassView.MoveWindow(0, nTop, cx, cy - nTop); m_wndClassView.Invalidate(FALSE); } } |
|
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 |