Solved

Passing AfxBeginThread a Class Function

Posted on 1998-06-10
1
1,026 Views
Last Modified: 2013-11-20
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!
0
Comment
Question by:jubjub
1 Comment
 
LVL 1

Accepted Solution

by:
Andy_Keys earned 100 total points
ID: 1317835
Only if you make the it a static member fn. eg
class cblah
{
  static int blahfunct();
  void mainfunc();
}

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Question regarding Copy/Paste 16 96
Process filename extension 3 194
iSeries DB2 Query 2 97
only14 challenge 19 81
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question