CommandBarButton::Enabled

  • Thread starter Thread starter MON205
  • Start date Start date
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.
 
What version of Outlook? Where is this toolbar, Explorers or Inspectors?
What code are you using?
 
I'm using the _CommandBarButton::PutEnabled( VARIANT_TRUE );
in Outlook 2003.. The toolbar on explorer.
 
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?
 
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).
 
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.
 
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.
 
Back
Top