Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Property sheet Problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Property sheet Problem

 Post Reply Post Reply
Author
Message
kkkfengkkk View Drop Down
Newbie
Newbie


Joined: 12 August 2006
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote kkkfengkkk Quote  Post ReplyReply Direct Link To This Post Topic: Property sheet Problem
    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...
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: 16 August 2006 at 11:35am
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
Back to Top
kkkfengkkk View Drop Down
Newbie
Newbie


Joined: 12 August 2006
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote kkkfengkkk Quote  Post ReplyReply Direct Link To This Post Posted: 16 August 2006 at 8:09pm
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.
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: 16 August 2006 at 9:45pm
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
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.172 seconds.