Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: c++ and New Inspector event

Geek News

c++ and New Inspector event
"JahMic" <jahmic[ at ]gmail.com> 3/20/2007 10:03:44 AM
Can somebody tell how to handle a New Inspector event in c++. I
realize I need to setup an event handler, but how?

It would be great to do this with the Outlook Object Model, but COM
events is ok too.

Thanks, J

Re: c++ and New Inspector event
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 3/20/2007 9:05:15 PM
On the low level, you will need to QI the object for
IConnectionPointContainer, call
IConnectionPointContainer::FindConnectionPoint, the ncall
IConnectionPoint::Advise passigng your implementation of IDispatch. Whenever
an event is raised, your implemenattion of IDispatch::Invoke() will be
invoked with the appropriate dispid.
Both MFC san ATL have COM events support, but don't use either of them. You
migth want to look at the C++ samples from
http://www.outlookcode.com/d/comaddins.htm

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"JahMic" <jahmic[ at ]gmail.com> wrote in message
news:1174385024.292925.85300[ at ]l77g2000hsb.googlegroups.com...
[Quoted Text]
> Can somebody tell how to handle a New Inspector event in c++. I
> realize I need to setup an event handler, but how?
>
> It would be great to do this with the Outlook Object Model, but COM
> events is ok too.
>
> Thanks, J
>


Re: c++ and New Inspector event
"JahMic" <jahmic[ at ]gmail.com> 3/21/2007 2:25:43 PM
Thanks. I pretty much figured it out, a lot of work to setup a
button...


On Mar 21, 6:05 am, "Dmitry Streblechenko" <dmi...[ at ]dimastr.com> wrote:
[Quoted Text]
> On the low level, you will need to QI the object for
> IConnectionPointContainer, call
> IConnectionPointContainer::FindConnectionPoint, the ncall
> IConnectionPoint::Advise passigng your implementation of IDispatch. Whenever
> an event is raised, your implemenattion of IDispatch::Invoke() will be
> invoked with the appropriate dispid.
> Both MFC san ATL have COM events support, but don't use either of them. You
> migth want to look at the C++ samples fromhttp://www.outlookcode.com/d/comaddins.htm
>
> Dmitry Streblechenko (MVP)http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "JahMic" <jah...[ at ]gmail.com> wrote in message
>
> news:1174385024.292925.85300[ at ]l77g2000hsb.googlegroups.com...
>
>
>
> > Can somebody tell how to handle a New Inspector event in c++. I
> > realize I need to setup an event handler, but how?
>
> > It would be great to do this with the Outlook Object Model, but COM
> > events is ok too.
>
> > Thanks, J- Hide quoted text -
>
> - Show quoted text -


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net