Jump to content
Software FX Community

Re: Enabled property


User (Legacy)
 Share

Recommended Posts

Serge,

I use this in VB and it works fine. I wonder that the interface expects a

VARIANT_BOOL type, and hence you would want to pass VARIANT_FALSE?

Cheers,

Abe Krebs

"Serge S. Spiridonoff" <sss@corbina.net> wrote in message

news:4agjvU2uAHA.2592@sfxserver.softwarefx.com...

> Hi!

>

> I am trying to disable a custom command (and a toolbar button) with the

> following code.

>

> ICommandBarPtr pCommandBar = m_pChartFX->Commands;

> ... // add pictures here

>

> ICommandItemPtr pCommand = pCommandBar->AddCommand(200);

> if (pCommand != NULL)

> {

> pCommand->Text = "My command";

> pCommand->Picture = 1;

> pCommand->Enabled = 0; // should make it disabled?

> }

>

> ... // add toolbar button here

>

> The toolbar button is added ok but it is not disabled (i.e. it's not

greyed

> and sends InternalCommand event).

>

> Is it a bug or am I missing something?

>

> I'm using ChartFX DLL, 4.0.21.1

> SfxBar 1.0.15.1

>

> Thanks,

> Serge

>

>

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.

Guest
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.

 Share

×
×
  • Create New...