Hi all,
Apologies in advance if this is a bit of a noob question, but I'm not yet too proficient in the subtleties of C++, so function pointers are a new topic for me.
I'm trying to set up a callback from the callFunctionOnMessageThread method in order that I can process GUI events (hiding and showing a window) from a real-time thread.
What I have so far (super simplified), looks a bit like this:
class MyClass
{
private:
void* showMyWindow(void*);
void ProcessStuffOnRealtimeThread();
ScopedPointer<DocumentWindow> myWindow;
}
void* MyClass::showMyWindow(void*)
{
myWindow = new DocumentWindow();
}
void MyClass::ProcessStuffOnRealtimeThread()
{
MessageManager* mm = MessageManager::getInstance();
mm->callFunctionOnMessageThread(MyClass::showMyWindow, nullptr);
}
Again, please don't laugh too hard at me :)
Thanks in advance,
Will
P.S. I read and re-read the documentation, plus all the material on function pointers that I could find and then just tried everything I could think of...
