Event Handler in Visio / ShapeDeleted / VSL

N

naklov

hi,

want to catch the ShapeDeleted Event to delete a part of my
SolutionXML.
The EventMonitor, distribute by the Visio SDK, shows me this Event,
but my VSL doesnt realize that.

I also use MyClass as a derived Class from VEventHandler, and call
after i create an instance of MyClass, an Init - Method, which should
create my Eventlistener.

Does anybody knows the difference between CoCreateAddonSinkForHandler
and CoCreateAddonSink ???

############# Begin INIT Method Code ###################

CVisioDocument clVsoDoc;
CVisioEventList clVsoEList;
CVisioEvent clVsoEvent;

IUnknown FAR* clPtrSink = NULL;

hr = clVsoApp.ActiveDocument(clVsoDoc);

hr = clVsoDoc.EventList(clVsoEList);
hr = CoCreateAddonSinkForHandler(NULL, this, &clPtrSink);
hr = clVsoEList.AddAdvise((short)visEvtCodeQueryCancelSelDel,
VVariant(clPtrSink), VBstr(_T("")), VBstr(_T("")), clVsoEvent);

############# END Code ###################
 

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