A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

com addin button callbacks.



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 22nd 07, 03:27 PM posted to microsoft.public.outlook.program_addins
Daniel
external usenet poster
 
Posts: 5
Default com addin button callbacks.


I'm building an Outlook COM addin with C++. I've implemented a command bar
and button call back functions similarly to how things were explained in the
article http://www.codeproject.com/com/outlookaddin.asp. The command bar and
buttons live on the appointment item in outlook. I find that when two
appointment items are opened, and I click on the button in one, the call
back is fired in both. Any ideas? Thankyou.

Some pseudocode below

..h

//Appointment toolbar button events
extern _ATL_FUNC_INFO OnButtonClick;

typedef IDispEventSimpleImpl 4,CAppointmentAddin,
&__uuidof(Office::_CommandBarButtonEvents) ApptButton1Events;


class ATL_NO_VTABLE CAppointmentAddin :
public CComObjectRootEx
,public ISupportErrorInfo
,public IDispatchImpl
,public IInspectorEvents
,public IItemEvents
,public
IDispEventSimpleImpl4,CAppointmentAddin,&__uuidof (Office::_CommandBarButtonEvents)
//,public
IDispEventSimpleImpl5,CAppointmentAddin,&__uuidof (Office::_CommandBarButtonEvents)
,public IApptCommandBarsEvents
{

BEGIN_SINK_MAP(CAppointmentAddin)

SINK_ENTRY_INFO(4,
__uuidof(Office::_CommandBarButtonEvents),
0x01,
OnButtonClick,
&OnButtonClickInfo)
END_SINK_MAP


}


Ads
  #2  
Old February 22nd 07, 08:17 PM posted to microsoft.public.outlook.program_addins
Dan G
external usenet poster
 
Posts: 3
Default com addin button callbacks.

Never mind. A few posts down from this was the answer. Needed unique tags
for my buttons.


"Daniel" wrote:


I'm building an Outlook COM addin with C++. I've implemented a command bar
and button call back functions similarly to how things were explained in the
article http://www.codeproject.com/com/outlookaddin.asp. The command bar and
buttons live on the appointment item in outlook. I find that when two
appointment items are opened, and I click on the button in one, the call
back is fired in both. Any ideas? Thankyou.

Some pseudocode below

..h

//Appointment toolbar button events
extern _ATL_FUNC_INFO OnButtonClick;

typedef IDispEventSimpleImpl 4,CAppointmentAddin,
&__uuidof(Office::_CommandBarButtonEvents) ApptButton1Events;


class ATL_NO_VTABLE CAppointmentAddin :
public CComObjectRootEx
,public ISupportErrorInfo
,public IDispatchImpl
,public IInspectorEvents
,public IItemEvents
,public
IDispEventSimpleImpl4,CAppointmentAddin,&__uuidof (Office::_CommandBarButtonEvents)
//,public
IDispEventSimpleImpl5,CAppointmentAddin,&__uuidof (Office::_CommandBarButtonEvents)
,public IApptCommandBarsEvents
{

BEGIN_SINK_MAP(CAppointmentAddin)

SINK_ENTRY_INFO(4,
__uuidof(Office::_CommandBarButtonEvents),
0x01,
OnButtonClick,
&OnButtonClickInfo)
END_SINK_MAP


}



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Attaching an Addin to Send Button [email protected] Add-ins for Outlook 1 January 12th 07 03:18 PM
Help with AddIn nickdu Add-ins for Outlook 3 September 28th 06 02:35 PM
Another Addin Failure gandolf Add-ins for Outlook 1 September 7th 06 09:26 AM
Button location in button bar Leah Ann Add-ins for Outlook 1 August 11th 06 02:16 PM
Hummingbird Addin Danny Add-ins for Outlook 0 February 4th 06 07:00 PM


All times are GMT +1. The time now is 08:37 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.