Click here to Skip to main content
15,890,579 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCall Stack in Visual C++ 2005 Pin
DSPCottage9-Jan-09 6:52
DSPCottage9-Jan-09 6:52 
AnswerRe: Call Stack in Visual C++ 2005 Pin
CPallini9-Jan-09 7:05
mveCPallini9-Jan-09 7:05 
GeneralRe: Call Stack in Visual C++ 2005 Pin
DSPCottage9-Jan-09 7:19
DSPCottage9-Jan-09 7:19 
GeneralRe: Call Stack in Visual C++ 2005 Pin
CPallini9-Jan-09 7:42
mveCPallini9-Jan-09 7:42 
QuestionMoving window causes exception Pin
Paffinity9-Jan-09 6:30
Paffinity9-Jan-09 6:30 
AnswerRe: Moving window causes exception Pin
CPallini9-Jan-09 6:43
mveCPallini9-Jan-09 6:43 
QuestionHow to Close or Kill the thread Pin
Member 46517419-Jan-09 4:30
Member 46517419-Jan-09 4:30 
AnswerRe: How to Close or Kill the thread Pin
Cedric Moonen9-Jan-09 4:47
Cedric Moonen9-Jan-09 4:47 
Use a flag that you set from your main thread.

In your second thread, it looks like:

while (bContinue)
{
// Do processing
}


Once the flag is set to false by your main thread, the loop will finish and the thread function will return, terminating nicely the thread. Of course, how to implement this depends a lot of your current design, this is just the basic principle.

Cédric Moonen
Software developer

Charting control [v1.5]
OpenGL game tutorial in C++

GeneralRe: How to Close or Kill the thread Pin
Member 46517419-Jan-09 4:51
Member 46517419-Jan-09 4:51 
GeneralRe: How to Close or Kill the thread Pin
Cedric Moonen9-Jan-09 5:08
Cedric Moonen9-Jan-09 5:08 
AnswerRe: How to Close or Kill the thread Pin
Code-o-mat9-Jan-09 4:55
Code-o-mat9-Jan-09 4:55 
GeneralRe: How to Close or Kill the thread Pin
Member 46517419-Jan-09 5:00
Member 46517419-Jan-09 5:00 
GeneralRe: How to Close or Kill the thread Pin
Code-o-mat9-Jan-09 5:19
Code-o-mat9-Jan-09 5:19 
GeneralRe: How to Close or Kill the thread Pin
Mark Salsbery9-Jan-09 11:33
Mark Salsbery9-Jan-09 11:33 
QuestionC++ and Sqlite connection Pin
vanishaa9-Jan-09 2:45
vanishaa9-Jan-09 2:45 
QuestionRe: C++ and Sqlite connection Pin
David Crow9-Jan-09 3:03
David Crow9-Jan-09 3:03 
AnswerRe: C++ and Sqlite connection Pin
vanishaa9-Jan-09 3:11
vanishaa9-Jan-09 3:11 
GeneralRe: C++ and Sqlite connection Pin
David Crow9-Jan-09 3:20
David Crow9-Jan-09 3:20 
GeneralRe: C++ and Sqlite connection Pin
vanishaa9-Jan-09 3:30
vanishaa9-Jan-09 3:30 
GeneralRe: C++ and Sqlite connection Pin
CPallini9-Jan-09 7:10
mveCPallini9-Jan-09 7:10 
AnswerRe: C++ and Sqlite connection Pin
markkuk9-Jan-09 3:40
markkuk9-Jan-09 3:40 
GeneralRe: C++ and Sqlite connection Pin
Thilek9-Jan-09 3:54
Thilek9-Jan-09 3:54 
GeneralRe: C++ and Sqlite connection Pin
vanishaa9-Jan-09 4:05
vanishaa9-Jan-09 4:05 
GeneralRe: C++ and Sqlite connection Pin
Cedric Moonen9-Jan-09 4:07
Cedric Moonen9-Jan-09 4:07 
GeneralRe: C++ and Sqlite connection Pin
Stuart Dootson9-Jan-09 4:16
professionalStuart Dootson9-Jan-09 4:16 

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.