Need to remove a sub-menu item |
Post Reply |
Author | |
71SoCal
Newbie Joined: 15 April 2008 Location: United States Status: Offline Points: 6 |
Post Options
Thanks(0)
Posted: 02 May 2008 at 7:32pm |
How do I delete a sub-menu item?
I'm talking about a sub-menu item from a standard dropdown menu (menu item cascades to the right-side with an arrow indicating a sub-menu).
Once I've got the CXTPControl* object for the menu item, if I do the following code, it blows up:
// Get the control object from the menu item
CXTPControl* pControl = pControls->GetAt(nIndex);
if (pControl)
{
// Trying here to get the sub-menu controls...
CXTPControls* pSubMenuControls =
pControl->GetCommandBar()->GetControls(); // Blows up!!!
}
My plan was to get the pSubMenuControls object, then call:
CXTPControl* pSubControl = pSubControls->FindControl(nID);
if (pSubControl)
{
pSubControls->Remove(pSubControl);
}
Thanks for any help on this one!
Mike |
|
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 |