|
-
April 22nd, 1999, 03:21 PM
#1
MFC Worker Threads ??
I have an ActiveX control that uses a worker thread. I need the worker thread to be able to fire events for the control, so I am trying to declare the worker thread's function as a member of the class, but I am getting the following compiler error:
'AfxBeginThread' : none of the 2 overloads can convert parameter 1 from type 'unsigned int (void *)'
The code looks like this
// This is in the class declaration
private:
UINT WorkerThread(LPVOID pInfo);
// This is in one of the classes member functions
AfxBeginThread(WorkerThread, NULL, 0, 0, 0, NULL);
// And this is the way the actual function is defined
UINT MyClass::WorkerThread(LPVOID pInfo)
Is there a way that I can type-cast WorkerThread in the call to AfxBeginThread? Or is there a way I can have a non-member function fire the classes event? Has anyone run into this before?
Thanks,
sfought
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|