Click here to Skip to main content
15,915,328 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: can anyone give code in vc++ Pin
CPallini14-Apr-09 10:44
mveCPallini14-Apr-09 10:44 
GeneralRe: can anyone give code in vc++ Pin
Hamid_RT14-Apr-09 20:23
Hamid_RT14-Apr-09 20:23 
GeneralRe: can anyone give code in vc++ Pin
_AnsHUMAN_ 14-Apr-09 1:14
_AnsHUMAN_ 14-Apr-09 1:14 
AnswerRe: can anyone give code in vc++ Pin
pallaka14-Apr-09 0:02
pallaka14-Apr-09 0:02 
GeneralRe: can anyone give code in vc++ Pin
Cedric Moonen14-Apr-09 0:08
Cedric Moonen14-Apr-09 0:08 
GeneralRe: can anyone give code in vc++ Pin
Chris Losinger14-Apr-09 1:54
professionalChris Losinger14-Apr-09 1:54 
GeneralRe: can anyone give code in vc++ Pin
toxcct14-Apr-09 4:15
toxcct14-Apr-09 4:15 
GeneralRe: can anyone give code in vc++ Pin
David Crow14-Apr-09 2:44
David Crow14-Apr-09 2:44 
Questionsearch vectors Pin
kaminem13-Apr-09 23:20
kaminem13-Apr-09 23:20 
QuestionRe: search vectors Pin
David Crow14-Apr-09 2:47
David Crow14-Apr-09 2:47 
AnswerRe: search vectors Pin
kaminem14-Apr-09 3:41
kaminem14-Apr-09 3:41 
QuestionRe: search vectors Pin
David Crow14-Apr-09 3:43
David Crow14-Apr-09 3:43 
AnswerRe: search vectors Pin
kaminem14-Apr-09 3:53
kaminem14-Apr-09 3:53 
AnswerRe: search vectors Pin
kaminem16-Apr-09 5:41
kaminem16-Apr-09 5:41 
QuestionHow to Kill the Worker Thread ? Pin
Suresh H13-Apr-09 23:06
Suresh H13-Apr-09 23:06 
AnswerRe: How to Kill the Worker Thread ? Pin
Rajesh R Subramanian13-Apr-09 23:14
professionalRajesh R Subramanian13-Apr-09 23:14 
GeneralRe: How to Kill the Worker Thread ? Pin
Suresh H14-Apr-09 0:26
Suresh H14-Apr-09 0:26 
GeneralRe: How to Kill the Worker Thread ? Pin
Rajesh R Subramanian14-Apr-09 0:48
professionalRajesh R Subramanian14-Apr-09 0:48 
AnswerMessage Closed Pin
13-Apr-09 23:26
ParagPatel13-Apr-09 23:26 
GeneralRe: How to Kill the Worker Thread ? [modified] PinPopular
Hamid_RT13-Apr-09 23:39
Hamid_RT13-Apr-09 23:39 
GeneralRe: How to Kill the Worker Thread ? Pin
Cedric Moonen13-Apr-09 23:41
Cedric Moonen13-Apr-09 23:41 
GeneralRe: How to Kill the Worker Thread ? Pin
Suresh H14-Apr-09 0:00
Suresh H14-Apr-09 0:00 
GeneralRe: How to Kill the Worker Thread ? Pin
Rajesh R Subramanian14-Apr-09 0:04
professionalRajesh R Subramanian14-Apr-09 0:04 
GeneralRe: How to Kill the Worker Thread ? Pin
Cedric Moonen14-Apr-09 0:06
Cedric Moonen14-Apr-09 0:06 
GeneralRe: How to Kill the Worker Thread ? Pin
Cedric Moonen14-Apr-09 0:05
Cedric Moonen14-Apr-09 0:05 
Maybe you didn't see the replies to his post but it is strongly recommanded not to use TerminateThread.
A better approach would be to pass a pointer to your dialog class to the thread function, and within the thread cast it back to your dialog and call a public function on it. Inside that function you put the code you already provided except that in your loop, you also check if a flag is set or not (this flag is a simple bool which is a member of the dialog). If the flag is set, you simply stop the loop and the function terminates.
When you click on the end button, you can simply set this flag so that the loop stops.

Cédric Moonen
Software developer

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

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.