"expand"-button shown when not needed |
Post Reply |
Author | |
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Posted: 21 September 2009 at 10:30am |
I have a toolbar in one of my panes. The last button contains a label which is updated every now and then. For some reason, the "expand-dropdown" is shown even though there is plenty of space left... why? Relevant creation code:
int CMyPane::OnCreate(LPCREATESTRUCT lpCreateStruct)
{ if (CWnd::OnCreate(lpCreateStruct) == -1) return -1; InitCommandBars();
CXTPCommandBars* pCommandBars = GetCommandBars();
m_wndToolBar.SetCommandBars(pCommandBars); if (!m_wndToolBar.CreateToolBar(WS_TABSTOP | WS_VISIBLE | WS_CHILD | CBRS_TOOLTIPS, this) || !m_wndToolBar.LoadToolBar(IDR_PANE_CASE_EXPLORER))
return -1; m_wndToolBar.SetOwner(AfxGetMainWnd()); And when updating the caption of the last item:
pLabel->SetCaption(pszCaption);
pLabel->SetTooltip(pszTooltip);
CXTPClientRect rc(this);
// Also called in OnWindowPosChanged():
CSize sz = m_wndToolBar.CalcDockingLayout(cx, LM_HIDEWRAP | LM_HORZDOCK | LM_HORZ | LM_COMMIT); m_wndToolBar.MoveWindow(0, 0, cx, sz.cy); m_wndToolBar.Invalidate(FALSE); |
|
PokerMemento - http://www.pokermemento.com/
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
lol...
ShowExpandButton(FALSE); ... :P
|
|
PokerMemento - http://www.pokermemento.com/
|
|
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 |