B
b.alex
Hi,
I've created a template with a DocumentCreated event handler. In that
handler, I look for certain conditions and may end up closing the document.
It works fine, but if I run Visio under a C++ debugger, I get "Unhandled
exception at 0x7c901230 in VISIO.EXE: User breakpoint" at some point after
closing the document. As an experiment, I can boil the code down to:
Private Sub Document_DocumentCreated(ByVal doc As IVDocument)
doc.Close
End Sub
I save that in a template, try creating a new drawing from the template a
couple of times, and the debugger gets the error. If I ignore the error and
keep running, things are fine. But the error worries and annoys me
nonetheless.
Am I breaking something by closing a document in its create event? Is there
an alternative way to do this?
Thanks,
Bob
I've created a template with a DocumentCreated event handler. In that
handler, I look for certain conditions and may end up closing the document.
It works fine, but if I run Visio under a C++ debugger, I get "Unhandled
exception at 0x7c901230 in VISIO.EXE: User breakpoint" at some point after
closing the document. As an experiment, I can boil the code down to:
Private Sub Document_DocumentCreated(ByVal doc As IVDocument)
doc.Close
End Sub
I save that in a template, try creating a new drawing from the template a
couple of times, and the debugger gets the error. If I ignore the error and
keep running, things are fine. But the error worries and annoys me
nonetheless.
Am I breaking something by closing a document in its create event? Is there
an alternative way to do this?
Thanks,
Bob