|
-
March 28th, 1999, 02:38 PM
#1
Re: CreateThread ---- BIG problem - URGENT
You need to do two things:
1. Make sure your CProgramView::ThreadProc function is declared as a static member of your CProgramView class. Note that once you make it static, you won't have a "this" pointer so you'll need to access your object some other way. I recommend you pass it as a parameter inside the CreateThread function (see below).
2. Call CreateThread like this:
CreateThread(...., (LPTHREAD_START_ROUTINE)CProgramView::ThreadProc, this);
This tells it to use the static CProgramView::ThreadProc function and passes it the "this" pointer as the LPVOID parameter which you can then use to access the object.
Good luck!
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
|