Click here to Skip to main content
16,017,297 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Class wizard in VC 2005 Pin
Mark Salsbery23-Nov-07 17:17
Mark Salsbery23-Nov-07 17:17 
GeneralRe: Class wizard in VC 2005 Pin
neha.agarwal2723-Nov-07 17:50
neha.agarwal2723-Nov-07 17:50 
GeneralRe: Class wizard in VC 2005 Pin
Prasann Mayekar23-Nov-07 18:32
Prasann Mayekar23-Nov-07 18:32 
JokeRe: Class wizard in VC 2005 Pin
ThatsAlok23-Nov-07 18:55
ThatsAlok23-Nov-07 18:55 
QuestionTerminateThread hangs Pin
maciu202023-Nov-07 15:10
maciu202023-Nov-07 15:10 
QuestionRe: TerminateThread hangs Pin
Mark Salsbery23-Nov-07 15:22
Mark Salsbery23-Nov-07 15:22 
AnswerRe: TerminateThread hangs [modified] Pin
maciu202023-Nov-07 21:11
maciu202023-Nov-07 21:11 
GeneralRe: TerminateThread hangs Pin
Mark Salsbery24-Nov-07 7:04
Mark Salsbery24-Nov-07 7:04 
maciu2020 wrote:
Unable to attach a debugger

hmm...why?

It really sounds like you have active threads left running.
Closing a thread handle does not eliminate the thread.
All threads should terminate themselves by returning.
Some thread, usually the "main" thread, should wait for all the threads to terminate.
If you're resorting to TerminateThread() and other abnormal ways of stopping a thread,
chances are you've got a bad design.  You shouldn't ever need to terminate a thread or
process forcefully.

Also, make sure you use the proper thread creation functions, depending on what
the thread uses:

   straight Win32 APIs, use CreateThread()
   C runtime (CRT), which includes using new/delete, use _beginthread[ex]()
   MFC (which uses all of the above), use AfxBeginThread()


Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: TerminateThread hangs Pin
maciu202024-Nov-07 7:28
maciu202024-Nov-07 7:28 
GeneralRe: TerminateThread hangs Pin
Mark Salsbery24-Nov-07 8:06
Mark Salsbery24-Nov-07 8:06 
GeneralRe: TerminateThread hangs [modified] Pin
maciu202024-Nov-07 8:47
maciu202024-Nov-07 8:47 
GeneralRe: TerminateThread hangs Pin
Mark Salsbery24-Nov-07 9:42
Mark Salsbery24-Nov-07 9:42 
GeneralRe: TerminateThread hangs Pin
maciu202024-Nov-07 10:15
maciu202024-Nov-07 10:15 
GeneralRe: TerminateThread hangs Pin
Mark Salsbery24-Nov-07 10:28
Mark Salsbery24-Nov-07 10:28 
GeneralRe: TerminateThread hangs Pin
maciu202024-Nov-07 22:27
maciu202024-Nov-07 22:27 
QuestionCan VC realize the localizable dialog ? Pin
BegtostudyBoy23-Nov-07 14:04
BegtostudyBoy23-Nov-07 14:04 
AnswerRe: Can VC realize the localizable dialog ? Pin
Nelek25-Nov-07 21:26
protectorNelek25-Nov-07 21:26 
GeneralRe: Can VC realize the localizable dialog ? Pin
BegtostudyBoy25-Nov-07 22:00
BegtostudyBoy25-Nov-07 22:00 
QuestionI have put PlaySound() in the View - and it dosent play any thing until at rest Pin
simon alec smith23-Nov-07 12:53
simon alec smith23-Nov-07 12:53 
QuestionRe: I have put PlaySound() in the View - and it dosent play any thing until at rest Pin
Mark Salsbery23-Nov-07 15:28
Mark Salsbery23-Nov-07 15:28 
AnswerRe: I have put PlaySound() in the View - and it dosent play any thing until at rest Pin
simon alec smith24-Nov-07 4:00
simon alec smith24-Nov-07 4:00 
GeneralRe: I have put PlaySound() in the View - and it dosent play any thing until at rest Pin
Mark Salsbery24-Nov-07 7:12
Mark Salsbery24-Nov-07 7:12 
QuestionMFC ON_COMMAND problem Pin
FredrickNorge23-Nov-07 10:19
FredrickNorge23-Nov-07 10:19 
QuestionRe: MFC ON_COMMAND problem Pin
Mark Salsbery23-Nov-07 10:23
Mark Salsbery23-Nov-07 10:23 
AnswerRe: MFC ON_COMMAND problem Pin
FredrickNorge23-Nov-07 10:27
FredrickNorge23-Nov-07 10:27 

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.