Click here to Skip to main content
15,901,373 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Win32 API: top-level window without focus Pin
Zoomby18-Jun-06 11:41
Zoomby18-Jun-06 11:41 
GeneralRe: Win32 API: top-level window without focus Pin
Shog918-Jun-06 12:53
sitebuilderShog918-Jun-06 12:53 
GeneralRe: Win32 API: top-level window without focus Pin
Zoomby19-Jun-06 7:37
Zoomby19-Jun-06 7:37 
QuestionCRichEditCtrl not working :( Pin
YaronNir18-Jun-06 2:28
YaronNir18-Jun-06 2:28 
AnswerRe: CRichEditCtrl not working :( Pin
Dominik Reichl18-Jun-06 7:32
Dominik Reichl18-Jun-06 7:32 
QuestionStop working thread from UI thread Pin
Manjunath S18-Jun-06 2:05
Manjunath S18-Jun-06 2:05 
AnswerRe: Stop working thread from UI thread Pin
Randor 18-Jun-06 3:18
professional Randor 18-Jun-06 3:18 
AnswerRe: Stop working thread from UI thread Pin
Shog918-Jun-06 8:46
sitebuilderShog918-Jun-06 8:46 
In the UI thread, you'll set a flag of some sort, and have the worker thread check it. You can use a message (as Randor suggested) providing you're pumping messages regularly in the worker thread. You could use an event object, or even just a global variable (which you might want to protect using a critical section). The important thing is that, whatever sort of flag you use, you design your worker thread in such a way that it gets checked periodically.

And yes, you can force a thread to stop execution programatically, but you really don't want to do this - it'll likely leave your application in an unknown and potentially dangerous state, to say nothing of the state it'll leave whatever it was working on.


----
Scripts i’ve known...
CPhog 1.0.0.0 - make CP better.
Forum Bookmark 0.2.5 - bookmark forum posts on Pensieve
Print forum 0.1.2 - printer-friendly forums
Expand all 1.0 - Expand all messages
In-place Delete 1.0 - AJAX-style post delete
Syntax 0.1 - Syntax highlighting for code blocks in the forums

Questionproblem with Open() method Pin
SWDevil18-Jun-06 1:52
SWDevil18-Jun-06 1:52 
GeneralRe: problem with Open() method Pin
Laxman Auti18-Jun-06 19:23
Laxman Auti18-Jun-06 19:23 
GeneralRe: problem with Open() method Pin
SWDevil18-Jun-06 20:09
SWDevil18-Jun-06 20:09 
QuestionHow to copy so much characters from string to string? Pin
Lord Kixdemp18-Jun-06 1:46
Lord Kixdemp18-Jun-06 1:46 
AnswerRe: How to copy so much characters from string to string? Pin
Justin Tay18-Jun-06 2:26
Justin Tay18-Jun-06 2:26 
AnswerRe: How to copy so much characters from string to string? Pin
Randor 18-Jun-06 3:40
professional Randor 18-Jun-06 3:40 
GeneralRe: How to copy so much characters from string to string? Pin
Lord Kixdemp18-Jun-06 3:55
Lord Kixdemp18-Jun-06 3:55 
Questionconversion problem with visual studio 2005 Pin
NorGUI18-Jun-06 1:23
NorGUI18-Jun-06 1:23 
AnswerRe: conversion problem with visual studio 2005 Pin
Gary R. Wheeler18-Jun-06 2:04
Gary R. Wheeler18-Jun-06 2:04 
AnswerRe: conversion problem with visual studio 2005 Pin
Michael Dunn18-Jun-06 11:06
sitebuilderMichael Dunn18-Jun-06 11:06 
QuestionHow sending message to Non CWnd class Pin
zrahimic18-Jun-06 0:27
zrahimic18-Jun-06 0:27 
AnswerRe: How sending message to Non CWnd class Pin
Jun Du18-Jun-06 5:17
Jun Du18-Jun-06 5:17 
Questionhow to turn off harddisk? Pin
andreasm8217-Jun-06 21:38
andreasm8217-Jun-06 21:38 
AnswerRe: how to turn off harddisk? Pin
andreasm8220-Jun-06 4:14
andreasm8220-Jun-06 4:14 
Questionrun time problem Pin
mt_samiei17-Jun-06 21:06
mt_samiei17-Jun-06 21:06 
Questioninteresting shapes and formulas Pin
includeh1017-Jun-06 20:37
includeh1017-Jun-06 20:37 
Questionmarshalling Pin
kumar_mk17-Jun-06 18:58
kumar_mk17-Jun-06 18:58 

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.