Click here to Skip to main content
16,011,585 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: VC++ 6.0 string bug ? (take a look plz) Pin
Stan Shannon16-Mar-02 2:45
Stan Shannon16-Mar-02 2:45 
GeneralRe: Are you running the latest VC6? Pin
Tim Smith16-Mar-02 3:39
Tim Smith16-Mar-02 3:39 
GeneralRe: Are you running the latest VC6? Pin
Lockhart16-Mar-02 4:39
Lockhart16-Mar-02 4:39 
GeneralDouble Click on List Control Pin
15-Mar-02 22:35
suss15-Mar-02 22:35 
GeneralRe: Double Click on List Control Pin
Christopher Duncan16-Mar-02 7:40
Christopher Duncan16-Mar-02 7:40 
GeneralRe: Double Click on List Control Pin
Derek Waters17-Mar-02 12:36
Derek Waters17-Mar-02 12:36 
GeneralPlaySound and SND_RESOURCE Pin
Rickard Andersson2015-Mar-02 21:48
Rickard Andersson2015-Mar-02 21:48 
QuestionHow to create multithread? Pin
15-Mar-02 21:23
suss15-Mar-02 21:23 
Hi, I read the MSDN online and get the following sample of using AfxBeginThread:

UINT MyThreadProc( LPVOID pParam )
{
CMyObject* pObject = (CMyObject*)pParam;

if (pObject == NULL ||
!pObject->IsKindOf(RUNTIME_CLASS(CMyObject)))
return 1; // if pObject is not valid

// do something with 'pObject'

return 0; // thread completed successfully
}

// inside a different function in the program
.
.
.
pNewObject = new CMyObject;
AfxBeginThread(MyThreadProc, pNewObject);
.
.
.


I understand that.....but :

1. if I want to create 50 threads that doing the stuff in MyThreadProc(), how can i do it? Add a for loop to create 50 times???

2. If I want to suspend 10th thread, how can i identify the 10th thread and suspend it?
3. Same as 2....to do resume and kill the thread.

Thank you very much !!!
AnswerRe: How to create multithread? Pin
Mazdak15-Mar-02 21:37
Mazdak15-Mar-02 21:37 
GeneralRe: How to create multithread? Pin
15-Mar-02 21:45
suss15-Mar-02 21:45 
GeneralRe: How to create multithread? Pin
Nish Nishant15-Mar-02 22:13
sitebuilderNish Nishant15-Mar-02 22:13 
GeneralRe: How to create multithread? Any example? Pin
16-Mar-02 6:53
suss16-Mar-02 6:53 
QuestionClient/Server programming over internet??? Pin
Rickard Andersson2015-Mar-02 20:47
Rickard Andersson2015-Mar-02 20:47 
AnswerRe: Client/Server programming over internet??? Pin
Nish Nishant15-Mar-02 21:07
sitebuilderNish Nishant15-Mar-02 21:07 
GeneralRe: Client/Server programming over internet??? Pin
Rickard Andersson2015-Mar-02 21:44
Rickard Andersson2015-Mar-02 21:44 
GeneralRe: Client/Server programming over internet??? Pin
Nish Nishant15-Mar-02 22:00
sitebuilderNish Nishant15-Mar-02 22:00 
GeneralRe: Client/Server programming over internet??? Pin
Rickard Andersson2015-Mar-02 22:20
Rickard Andersson2015-Mar-02 22:20 
QuestionHow do you call a default view in MDI application? Pin
Jasmyn15-Mar-02 19:55
Jasmyn15-Mar-02 19:55 
GeneralA strange problem! Pin
Davidlou15-Mar-02 18:42
Davidlou15-Mar-02 18:42 
GeneralRe: A strange problem! Pin
Nish Nishant15-Mar-02 18:42
sitebuilderNish Nishant15-Mar-02 18:42 
GeneralRe: A strange problem! Pin
Davidlou15-Mar-02 19:00
Davidlou15-Mar-02 19:00 
GeneralRe: A strange problem! Pin
Christian Graus15-Mar-02 19:06
protectorChristian Graus15-Mar-02 19:06 
GeneralRe: A strange problem! Pin
Christian Graus15-Mar-02 19:08
protectorChristian Graus15-Mar-02 19:08 
GeneralRe: A strange problem! Pin
Davidlou15-Mar-02 19:12
Davidlou15-Mar-02 19:12 
GeneralRe: A strange problem! Pin
Christian Graus15-Mar-02 18:52
protectorChristian Graus15-Mar-02 18:52 

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.