Click here to Skip to main content
15,918,003 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How can Terminate AfxbeginThread ? Pin
Le@rner12-Jan-11 20:40
Le@rner12-Jan-11 20:40 
AnswerRe: How can Terminate AfxbeginThread ? [modified] Pin
Andrew Brock12-Jan-11 20:58
Andrew Brock12-Jan-11 20:58 
GeneralRe: How can Terminate AfxbeginThread ? Pin
Le@rner12-Jan-11 21:17
Le@rner12-Jan-11 21:17 
AnswerRe: How can Terminate AfxbeginThread ? Pin
Andrew Brock12-Jan-11 21:21
Andrew Brock12-Jan-11 21:21 
GeneralRe: How can Terminate AfxbeginThread ? Pin
Le@rner12-Jan-11 21:30
Le@rner12-Jan-11 21:30 
GeneralRe: How can Terminate AfxbeginThread ? Pin
Andrew Brock12-Jan-11 22:26
Andrew Brock12-Jan-11 22:26 
GeneralRe: How can Terminate AfxbeginThread ? Pin
Le@rner12-Jan-11 23:13
Le@rner12-Jan-11 23:13 
GeneralRe: How can Terminate AfxbeginThread ? Pin
Andrew Brock13-Jan-11 0:11
Andrew Brock13-Jan-11 0:11 
Do you have any code that waits on some external input before returning in the thread, such as keyboard input (scanf, _getch), network input (recv), exclusive handle (mutex, semaphore), ... that the thread might be hanging in?

If you insert a breakpoint on the switch (WaitForSingleObject(hThread, nTimeoutMs)), then when the breakpoint is hit change the thread (Thread Window is Debug>Windows>Threads) and change to your worker thread, then view the call stack (Call Stack window is Debug>Windows>Call Stack) to see if the thread may be stuck in a function when you are trying to send it the quit message.
GeneralRe: How can Terminate AfxbeginThread ? Pin
Le@rner12-Jan-11 23:42
Le@rner12-Jan-11 23:42 
GeneralRe: How can Terminate AfxbeginThread ? Pin
Andrew Brock12-Jan-11 23:56
Andrew Brock12-Jan-11 23:56 
GeneralRe: How can Terminate AfxbeginThread ? Pin
Le@rner12-Jan-11 23:59
Le@rner12-Jan-11 23:59 
AnswerRe: How can Terminate AfxbeginThread ? Pin
Prasann Mayekar12-Jan-11 18:59
Prasann Mayekar12-Jan-11 18:59 
AnswerRe: How can Terminate AfxbeginThread ? Pin
Cedric Moonen12-Jan-11 20:49
Cedric Moonen12-Jan-11 20:49 
QuestionWhile Statement Issue. Pin
Mike Certini12-Jan-11 17:53
Mike Certini12-Jan-11 17:53 
AnswerRe: While Statement Issue. Pin
David Crow12-Jan-11 17:57
David Crow12-Jan-11 17:57 
GeneralRe: While Statement Issue. Pin
Andrew Brock12-Jan-11 18:06
Andrew Brock12-Jan-11 18:06 
GeneralRe: While Statement Issue. Pin
Mike Certini12-Jan-11 18:23
Mike Certini12-Jan-11 18:23 
GeneralRe: While Statement Issue. Pin
Andrew Brock12-Jan-11 18:35
Andrew Brock12-Jan-11 18:35 
GeneralRe: While Statement Issue. Pin
Mike Certini12-Jan-11 18:48
Mike Certini12-Jan-11 18:48 
GeneralRe: While Statement Issue. Pin
Malli_S12-Jan-11 19:02
Malli_S12-Jan-11 19:02 
GeneralCorrected Version. Pin
Mike Certini12-Jan-11 19:27
Mike Certini12-Jan-11 19:27 
GeneralRe: Corrected Version. Pin
Andrew Brock12-Jan-11 19:34
Andrew Brock12-Jan-11 19:34 
GeneralRe: Corrected Version. Pin
Andrew Brock12-Jan-11 19:37
Andrew Brock12-Jan-11 19:37 
GeneralRe: While Statement Issue. Pin
Andrew Brock12-Jan-11 19:31
Andrew Brock12-Jan-11 19:31 
AnswerRe: While Statement Issue. Pin
Luc Pattyn12-Jan-11 18:05
sitebuilderLuc Pattyn12-Jan-11 18:05 

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.