January 9th, 2011, 04:17 PM
Callback (TIMERPROC) to a c++ class function ??
Just wondering if its possible in any way to give a function pointer from a class to a C callback.
Ex: I got the class "Animation" having the member function "Draw()":
Now there the SetTimer() APi from Window, which requires a callback function (function pointer) to execute each time the timer times-out.
Could it be possible to pass the a Draw function from an INSTANCIATED "Animation" class to the SetTimer() function ??
Ex : SetTimer(...,...,...,&myAnimationInstance.Draw);
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!