Click here to Skip to main content
15,894,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionLoad DLL resource which contain custom control Pin
dungpapai2-Feb-07 14:47
dungpapai2-Feb-07 14:47 
AnswerRe: Load DLL resource which contain custom control Pin
Atul232-Feb-07 18:45
Atul232-Feb-07 18:45 
QuestionTerminating a thread Pin
BuckBrown2-Feb-07 11:00
BuckBrown2-Feb-07 11:00 
AnswerRe: Terminating a thread Pin
Ravi Bhavnani2-Feb-07 11:31
professionalRavi Bhavnani2-Feb-07 11:31 
GeneralRe: Terminating a thread Pin
BuckBrown2-Feb-07 13:09
BuckBrown2-Feb-07 13:09 
AnswerRe: Terminating a thread Pin
Garth J Lancaster2-Feb-07 11:52
professionalGarth J Lancaster2-Feb-07 11:52 
GeneralRe: Terminating a thread Pin
BuckBrown2-Feb-07 13:09
BuckBrown2-Feb-07 13:09 
AnswerRe: Terminating a thread Pin
Mark Salsbery2-Feb-07 13:23
Mark Salsbery2-Feb-07 13:23 
The worker thread runs in your app's address space so a down-n-dirty method is to have it
periodically check a flag (maybe a bool variable somewhere) and if the flag is set stop doing
the worker thread stuff and exit. Set the flag false at the start, set it to true when the
user clicks cancel.

More elegant and thread safe is using an event. Pretty much the same as a flag except you'd
use WaitForSingleObject() (with a timeout == 0ms) periodically to check if the event has been
set. Create the event reset (non-signalled) at the start and set it when the user clicks
cancel.

Mark

AnswerRe: Terminating a thread Pin
Stephen Hewitt4-Feb-07 12:30
Stephen Hewitt4-Feb-07 12:30 
QuestionPointer to Document Pin
DanYELL2-Feb-07 8:24
DanYELL2-Feb-07 8:24 
AnswerRe: Pointer to Document Pin
Mark Salsbery2-Feb-07 8:38
Mark Salsbery2-Feb-07 8:38 
AnswerRe: Pointer to Document Pin
led mike2-Feb-07 8:44
led mike2-Feb-07 8:44 
AnswerRe: Pointer to Document Pin
David Crow2-Feb-07 9:30
David Crow2-Feb-07 9:30 
QuestionCMyDocument::Serialize(CArchive& ar) is not called Pin
lucy2-Feb-07 8:01
lucy2-Feb-07 8:01 
AnswerRe: CMyDocument::Serialize(CArchive& ar) is not called Pin
led mike2-Feb-07 11:10
led mike2-Feb-07 11:10 
GeneralRe: CMyDocument::Serialize(CArchive& ar) is not called Pin
lucy3-Feb-07 16:51
lucy3-Feb-07 16:51 
GeneralRe: CMyDocument::Serialize(CArchive& ar) is not called Pin
led mike5-Feb-07 6:07
led mike5-Feb-07 6:07 
GeneralRe: CMyDocument::Serialize(CArchive& ar) is not called Pin
lucy5-Feb-07 8:28
lucy5-Feb-07 8:28 
QuestionLinking with NcFreeNetconProperties Pin
werpa2-Feb-07 7:58
werpa2-Feb-07 7:58 
AnswerRe: Linking with NcFreeNetconProperties Pin
Mark Salsbery2-Feb-07 8:45
Mark Salsbery2-Feb-07 8:45 
GeneralRe: Linking with NcFreeNetconProperties Pin
werpa2-Feb-07 10:43
werpa2-Feb-07 10:43 
GeneralRe: Linking with NcFreeNetconProperties Pin
Mark Salsbery2-Feb-07 12:17
Mark Salsbery2-Feb-07 12:17 
QuestionNeed to add "{{" , "}}" and | to a CString Pin
earlgraham2-Feb-07 7:27
earlgraham2-Feb-07 7:27 
QuestionRe: Need to add "{{" , "}}" and | to a CString Pin
David Crow2-Feb-07 7:31
David Crow2-Feb-07 7:31 
AnswerRe: Need to add "{{" , "}}" and | to a CString Pin
Hamid_RT3-Feb-07 5:40
Hamid_RT3-Feb-07 5:40 

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.