Load and Unload Problem

C

Chakkaradeep

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.
 
D

Dmitry Streblechenko \(MVP\)

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....
 
C

Chakkaradeep

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.
 
D

Dmitry Streblechenko \(MVP\)

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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top