Passing AfxBeginThread a Class Function

Is it possible to pass a function such as AfxBeginThread, a pointer to a Class Member Function.  So far I've only been able to create stand-alone functions (CALLBACK), and use their name to pass to functions like AfxBeginThread.

Is it possible, and can some one show me an example please?

eg
class cblah
{
  int blahfunct();
  void mainfunc();
}

class blah::mainfunc()
{
  AfxBeginThread(blahfunct, ..., ..., ..., ...);
}
This is only an example..not actual code!
jubjubAsked:
Who is Participating?
 
Andy_KeysConnect With a Mentor Commented:
Only if you make the it a static member fn. eg
class cblah
{
  static int blahfunct();
  void mainfunc();
}

0
All Courses

From novice to tech pro — start learning today.