|
-
September 4th, 2010, 02:13 PM
#1
CreateThread
Hello 
I have some buttons on my Dialog, and for each of them I will do some jobs,
I'd like to createthread for each call (each time I press a button) 
But this, I have no idea of what I am doing , that is, Is this CreateThread used for each button necessary and for what advantages ? clearly I don't need to call it but still can make the program work (Pssss because my problem is simple )
So I am looking forward to your replies
I am not in a hurry because this program will finish in 2012, to be sure 
Thank you
-
September 4th, 2010, 02:41 PM
#2
Re: CreateThread
If your project is an MFC one - use AfxBeginThread instead of CreateThread API.
If it is a Win32 application - use _beginthreadex C-runtime function to start a thread.
Victor Nijegorodov
-
September 4th, 2010, 03:08 PM
#3
Re: CreateThread
Thanks buddy VictorN 
But why and for what advantages should I do so ?
-
September 5th, 2010, 09:10 PM
#4
Re: CreateThread
VictorN means how to create a worker thread. http://www.google.com/search?q=what+...ient=firefox-a
When multiple createthreads are used, you will need a message queue implemented to process each thread's messages, which complicates your problem. Normal IPC approach definitely is the way to go in your case...
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
|