question about MarkerEvent

B

bird528

i want to develop a add-on for visio 2003. At first i have readed the SDK
sample with VB "folwchart" that it is supplyed by Microsoft. But i have not
understand for some Problems.
In the project we have created a event-handler class "clsEventSink" for the
Markerevent(eventcode : visEvtApp + visEvtMarker). if documents are created
or opend, the MarkerEvent is caused by the QueueMarkerEvent method. and then
the event handler begins to handle the MarkerEvent.
But i have not found in the code, where has the application object fired the
MarkerEvent.

thanks

bird528
 
A

AlEdlund

open the sample document, then

Tools=>add-ons=>sdk=>tools=>PersistentEvent

should show you the persistent events defined in the sample document that
fires the marker event for the document.

al
 
B

bird528

thank you AlEdlund
i hava tried to use the tools. the MarkerEvent has been fired two times.
(DocumentOpend and DocumentClosed) But i do not know, where is the method
"QueueMarkerEvent" called in the Code, if the doc is opend or created.
It muss be called in the VB code before the doc is opend or creaded.

thanks
 
A

AlEdlund

Add-ons are loaded when visio loads. so when visio opens the document, it
sees the persistent event and fires it. your add-on is listening (since you
loaded the add advise and event handler when you did the connect) for the
event that visio forwards to the handler.
The initial events are fired by visio, not your code...
al
 
B

bird528

But the returned EventInfo is "/doc=1/event=1/eventid=3/solution=SDKFLW" when
visio loads. the first three substrings are normal. but the last substring
can not be initialised by visio application. I think that the context
"solution=SDKFLW" is created by QueueMarkerEvent method. but i have not
found. : (
 
A

AlEdlund

when you open a template (in your case the flowchart example), visio creates
a document and fires off the event based on the persistent event that was
coded in the template. "solution=SDKFLW" is in the template document upon
which the opened document was based.
Did you look at the document with the "persistent events" tool that I
mentioned in my previous post? You will have to add your own event to your
template that you create in your solution.
al
 
B

bird528

thank you very much. I have understood. Without your help i muss need many
times.
thank!!! AlEdlund
 

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