CommandBarButton::Enabled

M

MON205

Hello all,
In my add-in I create a toolbar and set some buttons disabled. After some
actions I want to set these buttons enabled, so I set the Enabled property to
true. I noticed that sometimes these buttons still disabled until I point at
them (redraw problem). I think that the problem that setting the Enabled
property doesn't redraw the buttons.
What can I do to solve this?

Thanks a lot.
 
K

Ken Slovak - [MVP - Outlook]

What version of Outlook? Where is this toolbar, Explorers or Inspectors?
What code are you using?
 
M

MON205

I'm using the _CommandBarButton::putEnabled( VARIANT_TRUE );
in Outlook 2003.. The toolbar on explorer.
 
K

Ken Slovak - [MVP - Outlook]

I don't do C++, but I've never seen that with an Explorer button if the
Explorer has focus in any VB6, VB.NET or C# code. Does the Explorer have
focus? Is _CommandBarButton a valid object that is in scope?
 
M

MON205

Hello Ken,
Yes, the Explorer has the focus and the button is valid.
The same problem also happen when I set an icon for the button (PutPicture).
 
K

Ken Slovak - [MVP - Outlook]

Well, I've never seen that happen in any of the addin I've worked on. As I
said, I don't do C++ but I've never seen it in any VB6, C# or VB.NET addins.
I'd still think it has to be something in how you're handling the code.

About the only thing I can think of is to test the scenario on a sample
addin written using C++, I think you can find one or two at
www.outlookcode.com.
 
M

MON205

Thank you Ken.
I'll try doing that.

Ken Slovak - said:
Well, I've never seen that happen in any of the addin I've worked on. As I
said, I don't do C++ but I've never seen it in any VB6, C# or VB.NET addins.
I'd still think it has to be something in how you're handling the code.

About the only thing I can think of is to test the scenario on a sample
addin written using C++, I think you can find one or two at
www.outlookcode.com.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top