[SOLVED] Subscribing to a global function.
Posted: Fri May 07, 2010 20:14
For my wrapper to work, I need to be able to subscribe to a global function, using a pointer to a function memory location.
I cannot figure out how to do this. I can't even figure out how to subscribe to a global function...
Here is the code:
There's no error here, but it does not seem to fire at all. The test eventString is "FrameWindow:::EventClicked".
I cannot figure out how to do this. I can't even figure out how to subscribe to a global function...
Here is the code:
Code: Select all
void DLL_EXPORT CEGUIwindowSubscribeEvent (u32 *windowPtr, char *eventString, unsigned int *funcPtr) {
((CEGUI::Window*)windowPtr)->subscribeEvent (eventString, (reinterpret_cast<bool(*)(const CEGUI::EventArgs&)>(funcPtr)) );
}
There's no error here, but it does not seem to fire at all. The test eventString is "FrameWindow:::EventClicked".