I'm trying to pass a member function as an argument. Basically I have a class called AboutWindow, and the header looks as this (trimmed for brevity):
class AboutWindow
{
private:
AboutWindow(void);
~AboutWindow(void);
public:
int AboutWindowCallback(XPWidgetMessage inMessage, XPWidgetID inWidget, long inParam1, long inParam2);
};
and in the source I am trying to pass the AboutWindowCallback member function as a (pointer to / reference to) the function.
It looks something like this:
XPAddWidgetCallback(widgetId, this->AboutWindowCallback);
but I am getting the following IntelliSense warning:
A pointer to a bound function may only be used to call the function
Is it possible to pass the member function to XPAddWidgetCallback. Note it has to be that specific function, of that specific instance, as inside the AboutWindowCallback function, the this keyword is used.
Thanks in advance!