Welcome to Lockergnome.com!
HomeHome FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Adding image to Outlook commandbar button

 
   Home -> Office -> Program Add-Ins RSS
Next:  Program Add-Ins: Items ItemAdd Outlook 2007 problem  
Author Message
saturn

External


Since: Aug 01, 2007
Posts: 3



(Msg. 1) Posted: Wed Aug 01, 2007 12:54 am
Post subject: Adding image to Outlook commandbar button
Archived from groups: microsoft>public>outlook>program_addins (more info?)

I am writing a VC++ application where I have to add a commandbar and a
button to commandbar on any new inspector window. I have successfully
added the commandbar and button to my commandbar. I have done these in
a handler of New Inspector.

Now I am stuck with following issues:
1. I have to add an image to my button added to the commandbar. How
can I do this in VC++?
2. How do I register a handler for my button click?
3. Is there any property of commandbar through which I can uniquely
identify it? This will help in making decision of adding commandbar if
already not present.

Any pointers on these will be very helpful.

Regards,
Pradeep
Back to top
Login to vote
Ken Slovak - [MVP - Outlo

External


Since: Oct 17, 2003
Posts: 3213



(Msg. 2) Posted: Wed Aug 01, 2007 8:59 am
Post subject: Re: Adding image to Outlook commandbar button [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Please do not multipost. I answered your question in
developer.outlook.addins.

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


"saturn" <pradeep.agrawal7.DeleteThis@gmail.com> wrote in message
news:1185954885.638424.171730@g12g2000prg.googlegroups.com...
>I am writing a VC++ application where I have to add a commandbar and a
> button to commandbar on any new inspector window. I have successfully
> added the commandbar and button to my commandbar. I have done these in
> a handler of New Inspector.
>
> Now I am stuck with following issues:
> 1. I have to add an image to my button added to the commandbar. How
> can I do this in VC++?
> 2. How do I register a handler for my button click?
> 3. Is there any property of commandbar through which I can uniquely
> identify it? This will help in making decision of adding commandbar if
> already not present.
>
> Any pointers on these will be very helpful.
>
> Regards,
> Pradeep
>
Back to top
Login to vote
saturn

External


Since: Aug 01, 2007
Posts: 3



(Msg. 3) Posted: Fri Aug 03, 2007 5:57 am
Post subject: Re: Adding image to Outlook commandbar button [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Now I am able to trap the click of my button. But the callback
function receives CommandBarButton. Using this how I can identify the
inspector on which the button was clicked? How suitable is to conside
the active window?

Regards,
Pradeep
Back to top
Login to vote
Ken Slovak - [MVP - Outlo

External


Since: Oct 17, 2003
Posts: 3213



(Msg. 4) Posted: Fri Aug 03, 2007 9:13 am
Post subject: Re: Adding image to Outlook commandbar button [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

ActiveInspector usually works, but not always.

The best practice is to construct a unique Tag property for each button you
create. I usually use a GUID or unique string value with a Key value
assigned to each open Inspector. The key value gets incremented each time an
Inspector is opened. That key is stored in a public property in the
Inspector wrapper class so it's accessible. I make up the tag value with the
GUID and key, then when a Click occurs it will only occur in that wrapper
class in the Click event handler inside that class.

If you don't use a unique Tag then Click will fire in every single open
Inspector, so if you're handling Click in one place and there are 3 open
Inspectors then you'll get 3 click events firing. Using Inspector wrappers
is another best practice, as is using Explorer wrappers to handle open
Explorers.

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


"saturn" <pradeep.agrawal7.RemoveThis@gmail.com> wrote in message
news:1186145852.162138.324360@i13g2000prf.googlegroups.com...
> Now I am able to trap the click of my button. But the callback
> function receives CommandBarButton. Using this how I can identify the
> inspector on which the button was clicked? How suitable is to conside
> the active window?
>
> Regards,
> Pradeep
>
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Program Add-Ins All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 General
 Microsoft Windows XP
 Microsoft Windows Vista
 Microsoft Windows (other)
  Microsoft Office
 Microsoft Office (other)
 Computer Security
 Linux
 Movies


[ Contact us | Terms of Service/Privacy Policy ]