Jump to content
Software FX Community

Re: How to remove menu items from pop-ups

User (Legacy)

Recommended Posts

Thanks for the info but I'm still confused as to how to implement this in 

C++. I tried the following but it throws an exception:

ICommandItem* iCi = m_pChartFX->Commands->Item[CFX_ID_CM_BACKGROUND];


Further, I am uncomfortable removing commands by position (I assume that's

the argument for RemoveSubCommand). If SoftwareFX decides to later add

another item to the menu then my code will break. How can I remove commands

based on umambiguous command ID's? For instance, I remove toolbar items as

j = m_pChartFX->ToolBarObj->FindID( CFX_ID_TOOLBAR );


Is this possible for menu items?

Francisco Padron <frankp@softwarefx.com> wrote in message


> You can do this using the RemoveSubCommand method. For example lets say


> want to remove the DataEditor menu option from the right-click menu (chart

> background). You can do:


> ChartFX1.Commands(CFX_ID_CM_BACKGROUND).RemoveSubCommand 1


> Other commands for other menus:


> CFX_ID_CM_SERIES // Right click on a point marker/bar

> CFX_ID_CM_BACKGROUND, // Right click on the chart background

> CFX_ID_CM_AXIS, // Right click on an axis

> CFX_ID_CM_TITLE, // Right click on a title

> CFX_ID_CM_BAR, // Right click on a legend box


> Frank




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...