Click here to Skip to main content
15,889,900 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Disable a progress bar Pin
Rage26-Mar-06 20:00
professionalRage26-Mar-06 20:00 
GeneralRe: Disable a progress bar Pin
ariesaloksingh26-Mar-06 21:57
ariesaloksingh26-Mar-06 21:57 
GeneralRe: Disable a progress bar Pin
Rage26-Mar-06 23:52
professionalRage26-Mar-06 23:52 
GeneralRe: Disable a progress bar Pin
FarPointer2-Apr-06 5:00
FarPointer2-Apr-06 5:00 
GeneralRe: Disable a progress bar Pin
Nibu babu thomas26-Mar-06 20:02
Nibu babu thomas26-Mar-06 20:02 
AnswerRe: Disable a progress bar Pin
Michael Dunn27-Mar-06 9:03
sitebuilderMichael Dunn27-Mar-06 9:03 
QuestionPlease read it Pin
baldha rakesh26-Mar-06 18:44
baldha rakesh26-Mar-06 18:44 
AnswerRe: Please read it Pin
Stephen Hewitt26-Mar-06 19:15
Stephen Hewitt26-Mar-06 19:15 
Never call SuspendThread - Unless you're a threading expert it's just too dangerous. This is a common threading error, up there with calling TerminateThread. Here's a common failure scenario of how calling SuspendThread causes problems:
 1- The worker thread enters a Win32 API function, this function calls EnterCriticalSection.
 2- Another thread calls SuspendThread and stalls the worker thread before it can call LeaveCriticalSection.
 3- Another thread calls the same API, when it calls EnterCriticalSection it stalls waiting form the critical section to be released - It never is.

Any thread that calls this API now hangs.

This kind of bug is real, hard to reproduce and hard to find. Failure will be of a different nature depending on what the worker thread is doing at the time it is suspended. SuspendThread, TerminateThread and friends are only intended for experts and debuggers - Mere mortals should not use them.


Steve
GeneralRe: Please read it Pin
baldha rakesh26-Mar-06 19:29
baldha rakesh26-Mar-06 19:29 
GeneralRe: Please read it Pin
Stephen Hewitt26-Mar-06 19:32
Stephen Hewitt26-Mar-06 19:32 
AnswerRe: Please read it Pin
krmed27-Mar-06 5:11
krmed27-Mar-06 5:11 
Questionplaying flash files on dialog box without using Activex Control Pin
RahulOP26-Mar-06 18:21
RahulOP26-Mar-06 18:21 
AnswerRe: playing flash files on dialog box without using Activex Control Pin
Stephen Hewitt26-Mar-06 19:36
Stephen Hewitt26-Mar-06 19:36 
AnswerRe: playing flash files on dialog box without using Activex Control Pin
Eytukan26-Mar-06 21:53
Eytukan26-Mar-06 21:53 
Questionfonts: concept and samples Pin
includeh1026-Mar-06 17:16
includeh1026-Mar-06 17:16 
AnswerRe: fonts: concept and samples Pin
Cool Ju26-Mar-06 20:02
Cool Ju26-Mar-06 20:02 
QuestionHow to associate a scrollbar with image Pin
anilksingh26-Mar-06 17:15
anilksingh26-Mar-06 17:15 
AnswerRe: How to associate a scrollbar with image Pin
includeh1026-Mar-06 17:28
includeh1026-Mar-06 17:28 
AnswerRe: How to associate a scrollbar with image Pin
Hamid_RT26-Mar-06 17:46
Hamid_RT26-Mar-06 17:46 
QuestionAbout SDI Programming Pin
VPNampoothiri26-Mar-06 17:07
VPNampoothiri26-Mar-06 17:07 
AnswerRe: About SDI Programming Pin
includeh1026-Mar-06 17:36
includeh1026-Mar-06 17:36 
QuestionHCURSOR, animated or static? Pin
PJ Arends26-Mar-06 11:19
professionalPJ Arends26-Mar-06 11:19 
Questionselect multiple files instead of 1 only Pin
johnmc9394026-Mar-06 10:29
johnmc9394026-Mar-06 10:29 
AnswerRe: select multiple files instead of 1 only Pin
PJ Arends26-Mar-06 11:27
professionalPJ Arends26-Mar-06 11:27 
GeneralRe: select multiple files instead of 1 only Pin
johnmc9394026-Mar-06 16:54
johnmc9394026-Mar-06 16:54 

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.