Adds new lines to the content of a text window.
GSErrCode ACAPI_Database ( APIDb_AddTextWindowContentID, API_WindowInfo* windowInfo, const char* content, const GS::UniString* uniContent );
Parameters
- windowInfo
- [in] window identification
- content
- [in] the text to append
- uniContent
- [in] the Unicode text to append
Return Values
NoError
- The function has completed with success.
APIERR_BADPARS
windowPars
isnullptr,
APIERR_REFUSEDPAR
- not
APIWind_MyTextID
is referenced, APIERR_WINDNOTEXIST
- the referenced window does not exist
For other common API errors see the API Errors document.
Remarks
This function is used to append new lines to a text window.
It is limited to use for custom text windows only, which is opened by APIDb_NewWindowID in the same addon. The Report Window, Missing Library Parts Window etc cannot be addressed with this function.
The string must be ‘\0’ terminated. Line feeds should be passed with ‘\n’ characters.
Example
API_WindowInfo windowInfo = {}; GS::UniString buffer; GSErrCode err; windowInfo.typeID = APIWind_MyTextID; windowInfo.refCon = 1; buffer = GS::UniString::Printf ("Number of lines: %d\nOK\n", nLine); err = ACAPI_Database (APIDb_AddTextWindowContentID, &windowInfo, nullptr, &buffer);
Requirements
- Version: API 4.1 or later
- Header: APIdefs_Database.h
See Also
API_WindowInfo,
APIDb_NewWindowID,
ACAPI_Database, API Functions