Ets_Tool_Close_Callback_Register()
Note: Requires OPNET Development Kit
Abstract
Registers a function to be called when the current tool window needs to be closed (by clicking its close box, or choosing a menu item that calls the standard close or quit procedure).
Syntax
Ets_Tool_Close_Callback_Register (close_callback_proc)
| Argument | Type | Description |
|---|---|---|
close_callback_proc |
EtsT_Tool_Close_Callback |
function to be called when the current tool window needs to be closed |
Return Type
EtsT_Tool_Close_Callback
The previous value of the tool window's close procedure.
Header
ets_api_tool.h
Details
Returns the previous value of the tool window's close procedure. It is likely that the registered function will need to call this function to actually cause the window to be closed. Other steps may also need to be taken to avoid the original function from causing user interaction (for example, marking the current model as saved via Ets_Model_Saved_Set()).
Before the application calls this function, it will call the "close check" function to determine whether it is OK to close the window without user interaction. See Ets_Tool_Close_Check_Callback_Register(). If that function returns FALSE, the application might redraw or expand the tool window before calling the "close" procedure.
Because the callback function is being called directly by the application, caution should be taken in implementing it.