Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Despite ShowExpandButton(TRUE) no buttons
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Despite ShowExpandButton(TRUE) no buttons

 Post Reply Post Reply
Author
Message
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Topic: Despite ShowExpandButton(TRUE) no buttons
    Posted: 10 March 2008 at 12:07pm
Hi;
I created a toolbar within my on CWnd derives class. This class is the child of a docking pane also.
When I shrink the pane the toolbar expand button appears but none of the hidden buttons are shown in the popup window. What's wrong here?
 
I built the toolbar / commandbars object like this:

_pCmdBars=reinterpret_cast<CXTPCommandBars*>(CXTPCommandBars::CreateObject());

_pCmdBars->GetToolTipContext()->SetStyle(xtpToolTipOffice2007);
_pCmdBars->SetSite(
this
);
_pCmdBars->EnableCustomization(FALSE);
_pCmdBars->GetCommandBarsOptions()->bShowExpandButtonAlways=FALSE;
_toolbar.SetCommandBars(_pCmdBars);
_toolbar.ShowExpandButton(TRUE);
VERIFY(_toolbar.CreateToolBar(WS_TABSTOP|WS_VISIBLE|WS_CHILD|CBRS_TOOLTIPS,
this
));
VERIFY(_toolbar.LoadToolBar(IDR_TOOLBAR_PROCESSEXPLORER));
 
Any help is very welcome!
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 12 March 2008 at 5:05am
Hi,
 
if someone else encounters the same problem. The solution is a fix in XTPToolbar.cpp function BOOL CXTPToolBar::CControlButtonExpand::OnSetPopup(BOOL bPopup)

replace

CXTPCommandBars* pCommandBars = m_pParent->GetCommandBars();

if (pCommandBars)

to

CXTPCommandBars* pCommandBars = m_pParent->GetCommandBars();

if (pCommandBars && ((CXTPToolBar*)m_pParent)->m_pDockContext)

Many thanks to Oleg!!!

Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017
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.