I want the user to be able to specify their own functions for the handlers, so
__declspec(__stdcall) __cdecl pointers would be ideal. The problem is that classes derived from
ConsoleObject use the
__thiscall calling convention. I'm guessing I'd use a template for the argument types...? Perhaps something like this is what you meant?
Code:
template <typename funcPtrType>
void onMouseOver(funcPtrType (*p)(void))
{
if(p != NULL)
(*p)();
else
//default handler goes here
}