Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - make toolbar fill a row of dockbar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

make toolbar fill a row of dockbar

 Post Reply Post Reply
Author
Message
blueseaing View Drop Down
Groupie
Groupie


Joined: 14 June 2004
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote blueseaing Quote  Post ReplyReply Direct Link To This Post Topic: make toolbar fill a row of dockbar
    Posted: 23 January 2005 at 1:15am

I want to implement a CXTPToolbar which can auto fill a row of dockbar , the toolbar   contain some controls which can stretch such as CXTPComBox, I realize such code:

//the above code can stretch the toolbar
void CXTPToolBar::AdjustWidth(int nAddedWidth, BOOL bFill)
{
 for(int i=0;i<GetControls()->GetCount();i++)
 {
  CXTPControl* pControl = m_pControls->GetAt(i);

  if(pControl->IsKindOf(RUNTIME_CLASS(CXTPContr olComboBox))
   &&(pControl->GetFlags()&xtp FlagControlStretched)) 
  {
   CXTPControlComboBox* pCombox = (CXTPControlComboBox*) pControl;
   if(bFill)
    nAddedWidth = GetDockBar()->GetMaxFreeWidth(this);   

   pCombox->SetWidth(pCombox->GetWidth( )+nAddedWidth);
   pCombox->SetDropDownWidth(pCombox->G etWidth()+nAddedWidth);
  }
 }
}

but my problem lies in: when I make a toolbar fill a row of dockbar, the drag action
will change ,for example, if I drag a toolbar to the stretched toolbar, the drag can't
happen, to avoid this, the stretched toolbar should auto decrease its width to meet the
drag requirement. How can do? 

Back to Top
blueseaing View Drop Down
Groupie
Groupie


Joined: 14 June 2004
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote blueseaing Quote  Post ReplyReply Direct Link To This Post Posted: 23 January 2005 at 1:21am

I think the change should include the above:

     CSize CXTPToolBar::CalcDynamicLayout(int nLength, DWORD nMode);   

     void CXTPDockContext::Move(CPoint pt);

     BOOL CXTPCommandBars::DockCommandBar(CXTPToolBar* pBar, LPRECT lpRect, CXTPDockBar* pDockBar);
 

Back to Top
blueseaing View Drop Down
Groupie
Groupie


Joined: 14 June 2004
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote blueseaing Quote  Post ReplyReply Direct Link To This Post Posted: 26 January 2005 at 9:00am

no one can help me?

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 31 January 2005 at 5:37am
Please wait next version. It will be new xtpFlagControlStretched flag.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
kinook View Drop Down
Groupie
Groupie


Joined: 13 May 2003
Location: United States
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote kinook Quote  Post ReplyReply Direct Link To This Post Posted: 08 March 2005 at 9:34am
How is xtpFlagControlStretched used? I have a combo on a command bar that I want to size automatically to the size of the command bar rather than being fixed in size. I tried this in the WordPad sample in CMainFrame::CreateToolBars()

pFormatBar->GetControls()->FindControl(ID_COMBO_FONT)- >SetFlags(xtpFlagControlStretched);

but it had no apparent effect. I can't find any samples using it either, and the docs just say "Indicates the control is stretched in the parent command bar".
Automate software builds with Visual Build Pro

http://www.visualbuild.com
Back to Top
kinook View Drop Down
Groupie
Groupie


Joined: 13 May 2003
Location: United States
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote kinook Quote  Post ReplyReply Direct Link To This Post Posted: 08 March 2005 at 10:02am
Oops, I now see that my IssueTrak issue was responded to (never received an email notification of it). The missing code was

     pFormatBar->EnableDocking(x tpFlagAlignAny|xtpFlagFloating|xtpFlagStretched);

Unfortunately, it doesn't help me, because I don't want the toolbar to take up the entire row and not allow other toolbars to be docked beside it.
Automate software builds with Visual Build Pro

http://www.visualbuild.com
Back to Top
docman View Drop Down
Newbie
Newbie


Joined: 07 May 2005
Location: China
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote docman Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 2005 at 11:03am
I have the same problem.anybody resolved?
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.061 seconds.