Click here to Skip to main content
16,006,824 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Visual C++ 6 problems Pin
Paresh Solanki17-Jan-02 4:56
Paresh Solanki17-Jan-02 4:56 
GeneralRe: Visual C++ 6 problems Pin
Jon Hulatt17-Jan-02 5:34
Jon Hulatt17-Jan-02 5:34 
GeneralRe: Visual C++ 6 problems Pin
Kavitha Sama17-Jan-02 3:23
Kavitha Sama17-Jan-02 3:23 
GeneralRe: Visual C++ 6 problems Pin
Paresh Solanki17-Jan-02 5:01
Paresh Solanki17-Jan-02 5:01 
GeneralCWinThread derived worker-thread Pin
16-Jan-02 22:17
suss16-Jan-02 22:17 
GeneralRe: CWinThread derived worker-thread Pin
Mustafa Demirhan17-Jan-02 0:50
Mustafa Demirhan17-Jan-02 0:50 
GeneralRe: CWinThread derived worker-thread Pin
18-Jan-02 2:56
suss18-Jan-02 2:56 
GeneralRe: CWinThread derived worker-thread Pin
Mustafa Demirhan18-Jan-02 3:59
Mustafa Demirhan18-Jan-02 3:59 
AFAIK, a worker thread is always message-loopless. Otherwise it is called user interface threads. Smile | :)

In InitInstance() method, you can do the initializations. You should have a method called int Run() which will be called automatically when the thread is initialized. The thread should do its job in this method.
CMyThread *pThread = new CMyThread ();
pThread->CreateThread ();

This creates the thread, and starts running it. If you want it to be started later, CreateThread takes a parameter for this (CREATE_SUSPENDED or something like this. I could not remember it right now Frown | :( )

Have a look at the following pages

http://www.codeproject.com/threads/cthread.asp -> This really a very good example!
http://www.codeproject.com/threads/usingworkerthreads.asp

Hope this helps.

Kind regards
Mustafa Demirhan

http://www.macroangel.com

Sonork ID 100.9935:zoltrix
GeneralRe: CWinThread derived worker-thread Pin
19-Jan-02 5:26
suss19-Jan-02 5:26 
GeneralRe: CWinThread derived worker-thread Pin
Mustafa Demirhan19-Jan-02 10:27
Mustafa Demirhan19-Jan-02 10:27 
GeneralRe: CWinThread derived worker-thread Pin
21-Jan-02 2:52
suss21-Jan-02 2:52 
GeneralRe: CWinThread derived worker-thread Pin
Mustafa Demirhan21-Jan-02 6:42
Mustafa Demirhan21-Jan-02 6:42 
GeneralRe: CWinThread derived worker-thread Pin
Philip Patrick17-Jan-02 4:14
professionalPhilip Patrick17-Jan-02 4:14 
GeneralRe: CWinThread derived worker-thread Pin
18-Jan-02 3:00
suss18-Jan-02 3:00 
GeneralRe: CWinThread derived worker-thread Pin
Philip Patrick18-Jan-02 4:02
professionalPhilip Patrick18-Jan-02 4:02 
Generalgetting a pointer to a child view (cwnd) Pin
16-Jan-02 16:35
suss16-Jan-02 16:35 
GeneralRe: getting a pointer to a child view (cwnd) Pin
Christian Graus16-Jan-02 16:44
protectorChristian Graus16-Jan-02 16:44 
GeneralRe: getting a pointer to a child view (cwnd) Pin
16-Jan-02 16:46
suss16-Jan-02 16:46 
GeneralRe: getting a pointer to a child view (cwnd) Pin
Christian Graus16-Jan-02 17:06
protectorChristian Graus16-Jan-02 17:06 
GeneralRe: getting a pointer to a child view (cwnd) Pin
Nish Nishant16-Jan-02 20:28
sitebuilderNish Nishant16-Jan-02 20:28 
GeneralRe: getting a pointer to a child view (cwnd) Pin
16-Jan-02 22:41
suss16-Jan-02 22:41 
GeneralRe: getting a pointer to a child view (cwnd) Pin
Christian Graus17-Jan-02 0:23
protectorChristian Graus17-Jan-02 0:23 
GeneralSetActiveWindow / Win2K Pin
sankar16-Jan-02 14:46
sankar16-Jan-02 14:46 
GeneralRe: SetActiveWindow / Win2K Pin
Nish Nishant16-Jan-02 16:12
sitebuilderNish Nishant16-Jan-02 16:12 
GeneralConvert exe to dll Pin
arsen3d16-Jan-02 14:45
arsen3d16-Jan-02 14:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.