Click here to Skip to main content
15,914,109 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalhandlin WM_KILLFOCUS in CWnd-derived Pin
mishgun15-Oct-02 6:23
mishgun15-Oct-02 6:23 
GeneralRe: handlin WM_KILLFOCUS in CWnd-derived Pin
Roger Allen16-Oct-02 2:07
Roger Allen16-Oct-02 2:07 
GeneralLast Thread post for me... Pin
15-Oct-02 6:14
suss15-Oct-02 6:14 
GeneralRe: Last Thread post for me... Pin
jmkhael15-Oct-02 6:32
jmkhael15-Oct-02 6:32 
GeneralRe: Last Thread post for me... Pin
Anonymous15-Oct-02 6:56
Anonymous15-Oct-02 6:56 
GeneralRe: Last Thread post for me... Pin
Jon Hulatt15-Oct-02 6:42
Jon Hulatt15-Oct-02 6:42 
GeneralRe: Last Thread post for me... Pin
Anonymous15-Oct-02 7:02
Anonymous15-Oct-02 7:02 
GeneralRe: Last Thread post for me... Pin
Jon Hulatt15-Oct-02 21:24
Jon Hulatt15-Oct-02 21:24 
Thats cool. Just these two lines in your sample code made me suspicious:-

CFtThread* pThread = (CFtThread*)AfxGetThread();
pThread->ExitInstance();


Anyway. Only your CFtThread thread can terminate itself safely. You need to devise a mechanism for signaling to it that it needs to terminate. For a suitable signalling mechanism, see CWinThread::PostThreadMessage. You could use a custom message for it.

When your thread receives the message, it should call AfxEndThread().

for detailed info, see msdn "multithread programming | with mfc"

Signature space for rent. Apply by email to....
GeneralHere's the memory dump, if it helps.. Pin
Anonymous15-Oct-02 7:29
Anonymous15-Oct-02 7:29 
GeneralRe: Here's the memory dump, if it helps.. Pin
Jon Hulatt15-Oct-02 21:16
Jon Hulatt15-Oct-02 21:16 
GeneralRe: Here's the memory dump, if it helps.. Pin
jhwurmbach15-Oct-02 22:30
jhwurmbach15-Oct-02 22:30 
GeneralRe: Last Thread post for me... Pin
KaЯl16-Oct-02 0:23
KaЯl16-Oct-02 0:23 
GeneralPrint preview and OnClose Pin
-Dy15-Oct-02 4:45
-Dy15-Oct-02 4:45 
GeneralRe: Print preview and OnClose Pin
Tomasz Sowinski15-Oct-02 4:58
Tomasz Sowinski15-Oct-02 4:58 
GeneralRe: Print preview and OnClose Pin
-Dy15-Oct-02 5:31
-Dy15-Oct-02 5:31 
GeneralSCroll bar size Pin
suresh_sathya15-Oct-02 3:30
suresh_sathya15-Oct-02 3:30 
GeneralRe: SCroll bar size Pin
Tomasz Sowinski15-Oct-02 3:41
Tomasz Sowinski15-Oct-02 3:41 
GeneralUse CRecordSet with Access Pin
MyEden15-Oct-02 2:58
MyEden15-Oct-02 2:58 
GeneralRe: Use CRecordSet with Access Pin
Tomasz Sowinski15-Oct-02 3:14
Tomasz Sowinski15-Oct-02 3:14 
GeneralRe: Use CRecordSet with Access Pin
MyEden15-Oct-02 3:14
MyEden15-Oct-02 3:14 
GeneralRe: Use CRecordSet with Access Pin
Tomasz Sowinski15-Oct-02 3:20
Tomasz Sowinski15-Oct-02 3:20 
GeneralNeed Help: MFC Date and Time Pin
leonwoo15-Oct-02 1:45
leonwoo15-Oct-02 1:45 
GeneralRe: Need Help: MFC Date and Time Pin
Tomasz Sowinski15-Oct-02 1:54
Tomasz Sowinski15-Oct-02 1:54 
GeneralMouse coordinates are too big Pin
rkwan15-Oct-02 0:14
rkwan15-Oct-02 0:14 
GeneralRe: Mouse coordinates are too big Pin
Jon Hulatt15-Oct-02 1:03
Jon Hulatt15-Oct-02 1:03 

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.