Prototype
bool __cdecl fnLoadShapes ( LoadShapeInfo *pInfo );
Return value
This function should return true if loading of shapes was ok, otherwise false.
Parameters
pInfo
Pointer to a LoadShapeInfo structure.
Remarks
This function handles the transfer of shape information to the ShapeUp application. The actual shapes may be created here or earlier in the call chain, but this is where they are communicated with ShapeUp. The idea is to send each shape through the pfnAGCB member of the LoadShapeInfo parameter, and store enough information to be able to clean up this layer when requested. The shape created must correspond to the type member of LoadShapeInfo .
The ulThemeKey member is a plugin definable value which is used in calls to other exported functions.
If false is returned, the function fnGetLastErrMsg is called, and it should return a description of the error.
Example
bool __cdecl fnLoadShapes ( LoadShapeInfo *pInfo ) { /* Create a key to this theme */ MyThemeData *pData = new MyThemeData; pInfo->ulThemeKey = (unsigned long) pData; /* Load some data here */ /* Push shapes into ShapeUp via callback */ for (size_t i = 0; i < pData->nShapeCount; ++i) { (*pInfo->pfnGCB)(pInfo->ulSessionData, pData->pShapePoint[i], 0); } return true; }
See Also
Loader API, fnGetLastErrMsg, LoadShapeInfo