S
Stee
Hi,
I am creating a Menu and a toolbar button which will do
exactly same thing. To capture this event in my add-in,
should I create two events like below? Is it not possible
to have one event getting fired for both the menu and
toolbar clicks? Any suggestions?
typedef IDispEventSimpleImpl</*nID =*/ 3,CAddin, &__uuidof
(Office::_CommandBarButtonEvents)> CommandMenuEvents;
typedef IDispEventSimpleImpl</*nID =*/ 2,CAddin, &__uuidof
(Office::_CommandBarButtonEvents)> CommandButton2Events;
.....
SINK_ENTRY_INFO(2, __uuidof
(Office::_CommandBarButtonEvents),/*dispid*/ 0x01,
OnClickButton, &OnClickButtonInfo)
SINK_ENTRY_INFO(3, __uuidof
(Office::_CommandBarButtonEvents),/*dispid*/ 0x01,
OnClickMenu, &OnClickButtonInfo)
I am creating a Menu and a toolbar button which will do
exactly same thing. To capture this event in my add-in,
should I create two events like below? Is it not possible
to have one event getting fired for both the menu and
toolbar clicks? Any suggestions?
typedef IDispEventSimpleImpl</*nID =*/ 3,CAddin, &__uuidof
(Office::_CommandBarButtonEvents)> CommandMenuEvents;
typedef IDispEventSimpleImpl</*nID =*/ 2,CAddin, &__uuidof
(Office::_CommandBarButtonEvents)> CommandButton2Events;
.....
SINK_ENTRY_INFO(2, __uuidof
(Office::_CommandBarButtonEvents),/*dispid*/ 0x01,
OnClickButton, &OnClickButtonInfo)
SINK_ENTRY_INFO(3, __uuidof
(Office::_CommandBarButtonEvents),/*dispid*/ 0x01,
OnClickMenu, &OnClickButtonInfo)