![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
Ads |
#2
|
|||
|
|||
![]()
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" wrote in message oups.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 |
#3
|
|||
|
|||
![]()
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 |
#4
|
|||
|
|||
![]()
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" wrote in message oups.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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
outlook 2007- image in custom button | lencastro | Outlook - General Queries | 1 | January 24th 07 01:16 PM |
Adding button to New Message Window | Joshua Ellul | Add-ins for Outlook | 5 | March 22nd 06 01:10 PM |
Adding a button to the Appointment Form | [email protected] | Add-ins for Outlook | 6 | March 21st 06 02:09 PM |
how to add a custom button on the explorer "standard" commandbar | Herve cadieu | Outlook and VBA | 1 | March 17th 06 03:33 PM |
Adding a 2nd button (functionality not working) | Newt | Outlook and VBA | 3 | March 6th 06 05:35 PM |