View Single Post
  #4  
Old June 13th 06, 08:31 AM posted to microsoft.public.outlook.program_addins
davidb
external usenet poster
 
Posts: 2
Default Getting no Events ! - IDispEventSimpleImpl , DispEventAdvise

Dmitry Save'd the day ! Thank you !

The Problem as follows:
First I made my Button like this:

//---------------------------
// Connect.cpp
//---------------------------

CComQIPtr Office::_CommandBarButton spCmdButton(spNewBar);

m_spButton = spCmdButton;

pHdl-DispEventAdvise((IDispatch*)m_spButton,&__uuidof( Office::_CommandBarButtonEvents));

//---------------------------
// Connect.h
//---------------------------

CComPtrOffice::_CommandBarButton m_spButton;

Now I make it like this:

//---------------------------
// Connect.cpp
//---------------------------

spCmdButton = spNewBar;

pHdl-DispEventAdvise((IDispatch*)spCmdButton,&__uuidof (Office::_CommandBarButtonEvents));

//---------------------------
// Connect.h
//---------------------------

CComPtrOffice::_CommandBarButton spCmdButton;

---------------------------------
Greetings, Dave
---------------------------------

Ads