Load and Unload Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi all,

i have written an addin in VC++ to add a new button in the Standard Toolbar of the Inspector Window-the window which appears when u double click on the message in the inbox.The button is added successfully but as soon as i close this window the button doesnt appear again...i have to load my addin again.

i have given the loadbehaviour as custom load because if i give it as load startup..it is giving error since there is no inspector winodw opened.

please give me a solution so that i can keep my addin active till the Outlook Application terminates....
no problem if it is VB...i can convert to VC++..

with regards,
chakkaradeep.
 
You must trap Inspectors.NewInspector event and add your button if it is not
there in the event handler.

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


Chakkaradeep said:
hi all,

i have written an addin in VC++ to add a new button in the Standard
Toolbar of the Inspector Window-the window which appears when u double click
on the message in the inbox.The button is added successfully but as soon as
i close this window the button doesnt appear again...i have to load my addin
again.
i have given the loadbehaviour as custom load because if i give it as load
startup..it is giving error since there is no inspector winodw opened.
please give me a solution so that i can keep my addin active till the
Outlook Application terminates....
 
hi Dmitry

thanks for the answer...well i thought that first....the BIG Problem is i have to submit this project in VC++ only..till now i have been converting all the VB code available to VC++...in VB i think u initialise an event variable as WithEvents i guess..pardon me if i am wrong....how will i do it in VC++...do u know anybody who knows Outlook Programming in VC++...if possible please send their email id.....if u give me a sample in Vb...i will be very happy..

with regards
chakkaradeep.
 
Either use the class wrappers created for you by the compiler or do the
events the regular COM way: QI the Inspectors collection for
IConnectionPointContainer, call
IConnectionPointContainer::FindConnectionPoint(IID_InspectorsEvents, ...),
then IConnectionPoint::Advise() passing your implementation of IDispatch.
Whenever an event is raised, your implementation of IDispatch::Invoke() will
be called with the appropriate dispid.

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


Chakkaradeep said:
hi Dmitry,

thanks for the answer...well i thought that first....the BIG Problem is i
have to submit this project in VC++ only..till now i have been converting
all the VB code available to VC++...in VB i think u initialise an event
variable as WithEvents i guess..pardon me if i am wrong....how will i do it
in VC++...do u know anybody who knows Outlook Programming in VC++...if
possible please send their email id.....if u give me a sample in Vb...i will
be very happy...
 
Back
Top