_IDocumentEvents FileSavePostNotify Event Send Feedback
See Also  Example
Obsolete. Superseded by IDocumentEvents::FileSavePostNotify2.

Syntax

Visual Basic 
Public Delegate Sub _IDocumentEvents_FileSavePostNotifyEventHandler() 
C# 
public delegate void _IDocumentEvents_FileSavePostNotifyEventHandler()
JavaScript 
Event Not Supported
COM native C++ 
FileSavePostNotify();
C++ 
FileSavePostNotify();

Example

See the following code snippets:

  • COM native C++
  • C++

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::OnFileSavePostNotify()

{

       //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;

}

Example

Remarks

If developing a C++ application, use dsDocument_FileSavePostNotify_id to register for this notification.

See Getting Started for more information about C++ interface add-in template callback functions.

See Also

Availability

DraftSight V1R1