-
CreateThread
Hello :wave:
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) :cool:
But this, I have no idea of what I am doing :ehh:, 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 :D (Pssss because my problem is simple :blush: )
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 :wave:
-
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.
-
Re: CreateThread
Thanks buddy VictorN :wave:
But why and for what advantages should I do so ? :cool:
-
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...