Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / May 2008

Tip: Looking for answers? Try searching our database.

CommandBarButton::Enabled

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MON205 - 05 May 2008 15:50 GMT
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.
Ken Slovak - [MVP - Outlook] - 06 May 2008 14:25 GMT
What version of Outlook? Where is this toolbar, Explorers or Inspectors?
What code are you using?

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Hello all,
> In my add-in I create a toolbar and set some buttons disabled. After some
[quoted text clipped - 7 lines]
>
> Thanks a lot.
MON205 - 06 May 2008 16:01 GMT
I'm using the _CommandBarButton::PutEnabled( VARIANT_TRUE );
in Outlook 2003.. The toolbar on explorer.

> What version of Outlook? Where is this toolbar, Explorers or Inspectors?
> What code are you using?
[quoted text clipped - 10 lines]
> >
> > Thanks a lot.
Ken Slovak - [MVP - Outlook] - 07 May 2008 00:04 GMT
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?

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> I'm using the _CommandBarButton::PutEnabled( VARIANT_TRUE );
> in Outlook 2003.. The toolbar on explorer.
MON205 - 08 May 2008 09:20 GMT
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).

> 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?
>
> > I'm using the _CommandBarButton::PutEnabled( VARIANT_TRUE );
> > in Outlook 2003.. The toolbar on explorer.
Ken Slovak - [MVP - Outlook] - 08 May 2008 14:29 GMT
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.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> 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).
MON205 - 11 May 2008 08:44 GMT
Thank you Ken.
I'll try doing that.

> 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.
[quoted text clipped - 8 lines]
> > The same problem also happen when I set an icon for the button
> > (PutPicture).

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.