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

ComboBox label

 Post Reply Post Reply
Author
Message
Michl View Drop Down
Senior Member
Senior Member


Joined: 14 September 2007
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote Michl Quote  Post ReplyReply Direct Link To This Post Topic: ComboBox label
    Posted: 19 December 2007 at 10:27am
Hi,
 
in our ribbonbar is a combobox. To show a label we changed the style to xtpButtonCaption. But if you add this combobox to quickaccess with right mouse button, the label is hiding!?
 
I found the place where style is overwritten:

LRESULT CXTPRibbonBar::OnCustomizeCommand(WPARAM wParam, LPARAM lParam)
{
 NMXTPCONTROL* tagNMCONTROL = (NMXTPCONTROL*)lParam;
 CXTPControl* pControl = (CXTPControl*)tagNMCONTROL->pControl->GetTag();
 if (wParam == XTP_ID_RIBBONCUSTOMIZE_ADD)
 {
  GetCommandBars()->ClosePopups();
  m_bInRecalcLayout = TRUE;
  pControl = m_pQuickAccessControls->AddClone(pControl, -1, TRUE);
  pControl->SetBeginGroup(FALSE);
  pControl->SetVisible(TRUE);
  if (pControl->GetType() == xtpControlGallery || pControl->GetType() == xtpControlPopup)
   pControl->SetStyle(xtpButtonIcon);
  else
   pControl->SetStyle(xtpButtonAutomatic);
  m_bInRecalcLayout = FALSE;
  OnRecalcLayout();
  return TRUE;
 }

Ok. I can overwrite the message, copy the source and remove the line

   pControl->SetStyle(xtpButtonAutomatic);
 
But why is this done??? Make this sense?
 
Regards
Michael
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.

This page was generated in 2.203 seconds.