Post-notifies an application when a document has closed.
.NET Syntax
Visual Basic (Declaration) | |
---|
Public Delegate Sub _IDocumentEvents_DestroyNotifyEventHandler() |
C# | |
---|
public delegate void _IDocumentEvents_DestroyNotifyEventHandler() |
JavaScript | |
---|
Event Not Supported |
COM native C++ | |
---|
DestroyNotify(); |
Example
See the following code snippets:
COM native C++
Header file
//Register the events for the IDocument class
BEGIN_SINK_MAP(CDsAddinDocument)
SINK_ENTRY_EX(IDC_DSAPPLICATIONEVENT, DIID__IDocumentEvents, dsDocument_DestroyNotify_id, OnDestroyNotify)
SINK_ENTRY_EX(IDC_DSAPPLICATIONEVENT, DIID__IDocumentEvents, dsDocument_FileSavePostNotify_id, OnFileSavePostNotify)
SINK_ENTRY_EX(IDC_DSAPPLICATIONEVENT, DIID__IDocumentEvents, dsDocument_ModifyNotify_id, OnModifyNotify)
END_SINK_MAP()
//Declare the callbacks for IDocument class
void __stdcall OnDestroyNotify();
void __stdcall OnFileSavePostNotify();
void __stdcall OnModifyNotify();
Source file
void
__stdcall CDsAddinDocument::OnDestroyNotify()
{
// TODO: Add your code here
}
C++
Header file
class
DSADDINSAMPLE_EXPORT DsAddinDocument :
public dsDocumentEvents_c
{
public
:
DsAddinDocument(dsDocument_c *dsDoc) : m_dsDoc(dsDoc) {
RegisterDocumentDestroyNotifyHook(m_dsDoc);
RegisterDocumentFileSavePostNotifyHook(m_dsDoc);
RegisterDocumentModifyNotifyHook(m_dsDoc);
}
~DsAddinDocument() {
UnRegisterDocumentDestroyNotifyHook(m_dsDoc);
UnRegisterDocumentFileSavePostNotifyHook(m_dsDoc);
UnRegisterDocumentModifyNotifyHook(m_dsDoc);
}
DeclareDocumentDestroyNotifyHook
DeclareDocumentFileSavePostNotifyHook
DeclareDocumentModifyNotifyHook
dsDocument_c* getMyDoc() {
return m_dsDoc;}
bool DestroyNotify();
bool FileSavePostNotify();
bool ModifyNotify();
Source file
ImplementDocumentDestroyNotifyHook(DsAddinDocument)
ImplementDocumentModifyNotifyHook(DsAddinDocument)
ImplementDocumentFileSavePostNotifyHook(DsAddinDocument)
bool
DsAddinDocument::DestroyNotify()
{
//TODO: Add your code here
return true;
}
bool
DsAddinDocument::FileSavePostNotify()
{
//TODO: Add your code here
return true;
}
bool
DsAddinDocument::ModifyNotify()
{
//TODO: Add your code here
return true;
}
Back to top
Example
Remarks
Availability
DraftSight V1R1