Solved

Passing AfxBeginThread a Class Function

Posted on 1998-06-10
1
1,027 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
string initialization in java 11 117
conditional code and condition difference 9 85
sum28 challenge 31 117
Unix Command -- Challenging  question 7 102
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

733 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