OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Handling Predefined Doc/View Events

There are a number of predefined Doc/View events.

Each event has a corresponding response table macro and handler function signature defined. Note that the Doc/View model doesn't provide versions of these functions. You must declare the functions in your view class and provide the appropriate functionality for each function.

Response table macroEvent nameEvent handlerEvent
EV_VN_VIEWOPENEDvnViewOpenedVnViewOpened(TView *)Indicates that a new view has been constructed.
EV_VN_VIEWCLOSEDvnViewClosedVnViewClosed(TView *)Indicates that a view is about to be destroyed.
EV_VN_DOCOPENEDvnDocOpenedVnDocOpened(int)Indicates that a new document has been opened.
EV_VN_DOCCLOSEDvnDocClosedVnDocClosed(int)Indicates that a document has been closed.
EV_VN_COMMITvnCommitVnCommit(bool)Indicates that changes made to the data in the view should be committed to the document.
EV_VN_REVERTvnRevertVnRevert(bool)Indicates that changes made to the data in the view should be discarded and the data should be restored from the document.
EV_VN_ISDIRTYvnIsDirtyVnIsDirty(void)Should return true if changes have been made to the data in the view and not yet committed to the document, otherwise returns false.
EV_VN_ISWINDOWvnIsWindowVnIsWindow(HWND)Should return true if the HWND parameter is the same as that of the view's display window.

All the event-handling functions used for these messages return bool.

See Also