Hierarchical menu: How? |
Post Reply |
Author | |
Number8
Groupie Joined: 29 July 2008 Location: United States Status: Offline Points: 17 |
Post Options
Thanks(0)
Posted: 10 October 2008 at 4:36pm |
C++:
I create a menu: ICommandBarPopupPtr pPopupMenu = 0; pPopupMenu = m_pCmdBar->ActiveMenuBar->GetControls()->Add(xtpControlPopup, 0, _bstr_t("TEST"), -1, false); pPopupMenu->PutId(32000); pPopupMenuControls = pPopupMenu->GetCommandBar()->GetControls(); Add a menu item: pAction = pActions->Add(101, _bstr_t("New"), _bstr_t(""), _bstr_t(""), _bstr_t("TEST)); pControl = pPopupMenuControls->Add(xtpControlButton, 101, ""); I create another menu (as above), and want to add this first menu to it. I iterate over the CommandBar controls to find the control with this menuname/menuid (TEST/32000), and try to add it to the new menu: assert(xtpControlPopup == pCtrl->GetType()); OutputDebugString(pCtrl->GetCaption()); OutputDebugString("\n"); // This looks like the control -- popupMenu -- that I am looking for.... pPopupMenuControls->AddControl(pCtrl); Unfortunately, the TEST menu does not appear on the second menu I create. What am I doing wrong? TIA for any advice... |
|
Product: Xtreme SuitePro (ActiveX) version 12.1.0
Platform: Windows XP (32bit) - SP 3 Language: C / C++ |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
You can't add again already added menu. Have to remove it first or Copy (see Copy method).
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
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 |