Print Page | Close Window

Despite ShowExpandButton(TRUE) no buttons

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=9840
Printed Date: 05 July 2024 at 5:34am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Despite ShowExpandButton(TRUE) no buttons
Posted By: mgampi
Subject: Despite ShowExpandButton(TRUE) no buttons
Date 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



Replies:
Posted By: mgampi
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net