Inspector windows Active and Deactive event for outlook 2003 (C++)

C

CoolSanil

Hello I am developing Outlook Addin using ATL-COM. I want to capture
inspector windows active and deactive/ close event. Where should i advise
these event. Right now I am adding button on NewInspector Event but if new
inspector windows focus is lost then added button get deleted. any sample
code / suggestion will be usefull
 
K

Ken Slovak - [MVP - Outlook]

You can set up the handlers for those events in NewInspector.

If you declare a button you must declare it at a level where it will have
scope for as long as you need that button. Usually any UI such as a
CommandBarButton is added in the first Inspector.Activate() event, in later
versions of Outlook the Inspector.CommandBars interface isn't fully
instantiated until that event fires, it usually isn't fully there in
NewInspector() where you get a weak object reference to the
Inspector.CurrentItem.
 
Top