A callback function is supplied to ShapeUp in fnInit() to set the function which should be notified on the subscribed events. This is the pfnHook member of the SUImport supplied in the SUExport argument to the function.
For the purpose of adding notification hooks, the ShapeUp API exposes several functions on the form ShapeUp_AddXxxHook(), see example_hooks.cpp.
As an example, study the following:
SURESULT __cdecl fnInit(SUExport *pExport) { ... ShapeUp_AddPostDrawHook(0); ... }
A sample of the hook function might look like:
SURESULT __cdecl MyHookFunc(SUHANDLE hWorkspace, int hookType, SUHookData *args) { switch (hookType) { case HOOKTYPE_POSTDRAW: DrawSomething(); break; default: break; } return SURESULT_OK; }
Make sure you have first read the introduction.