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];

iCi->RemoveSubCommand(1);

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 );

m_pChartFX->ToolBarObj->RemoveItems(1,j);

Is this possible for menu items?

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

news:DE0379D14694D211B4CE00609770710D050496@sftfx-221.wamnet.net...

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

you

> 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

> SFX

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...