Returns the identifier of the current (active) window.
GSErrCode ACAPI_Database ( APIDb_GetCurrentWindowID, API_WindowInfo* windowInfo );
- [out] The identification parameters of the front window
- The function has completed with success.
- the type of the current front window is not known by the API
For other common API errors see the API Errors document.
This function is used to return the parameters of the front window of the server application. It can be used to identify which window your command was called on.
Generally the current window and the window of the current database are the same. However you must be careful; the database dependent functions work on the current database not on the database of the current window. The interface functions work on the current window always.
Note that this function fills out only the fields which are needed to identify the window type and the database behind the window. In order to retrieve the additional parameters of the database (
masterLayoutUnId) call the APIDb_GetDatabaseInfoID function with the
databaseUnId of the current window.
Use the APIDo_ChangeWindowID function to change the current window.
API_WindowInfo windowInfo; BNZeroMemory (&windowInfo, sizeof (API_WindowInfo)); GSErrCode err = ACAPI_Database (APIDb_GetCurrentWindowID, &windowInfo, nullptr);
- Version: API 4.1 or later
- Header: APIdefs_Database.h
ACAPI_Database, API Functions