Helper function to set the proper attribute callback for a user control.
GSErrCode ACAPI_Interface ( APIIo_SetUserControlCallbackID, API_UCCallbackType* callbackType );
Parameters
- callbackType
- [in] identifies the control to set the callback for.
Return Values
NoError
- The function has completed with success.
APIERR_BADPARS
callbackType
isnullptr
, or the supplieddialogID
is invalid.APIERR_BADID
- the given dialog is closed, or the supplied callback type is invalid.
For other common API errors see the API Errors document.
Remarks
This function provides an easy way for your user control items to use the default attribute set in the server application. By settings this callback, you don’t have to write your own.
Example
API_UCCallbackType ucb; GSErrCode err; // initialize user controls BNZeroMemory (&ucb, sizeof (ucb)); ucb.dialogID = TAB_ATTRIBUTE; // dialog or tab page ID ucb.type = APIUserControlType_Pen; // control type ucb.itemID = IDC_PENSET; // user control's item ID err = ACAPI_Interface (APIIo_SetUserControlCallbackID, &ucb);
Requirements
- Version: API 4.1 or later
- Header: APIdefs_Interface.h