Click here to Skip to main content
15,891,905 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to create dynamically popupmenu? Pin
yogish29312-Jan-11 21:11
yogish29312-Jan-11 21:11 
QuestionRe: how to create dynamically popupmenu? Pin
CPallini12-Jan-11 21:28
mveCPallini12-Jan-11 21:28 
AnswerRe: how to create dynamically popupmenu? Pin
Cedric Moonen12-Jan-11 21:35
Cedric Moonen12-Jan-11 21:35 
AnswerRe: how to create dynamically popupmenu? Repost of a repost Pin
Richard MacCutchan12-Jan-11 22:15
mveRichard MacCutchan12-Jan-11 22:15 
AnswerRe: how to create dynamically popupmenu? Pin
jk chan12-Jan-11 22:22
jk chan12-Jan-11 22:22 
AnswerRe: how to create dynamically popupmenu? Pin
Hamid_RT12-Jan-11 22:37
Hamid_RT12-Jan-11 22:37 
GeneralRe: how to create dynamically popupmenu? Pin
yogish29313-Jan-11 0:54
yogish29313-Jan-11 0:54 
AnswerRe: how to create dynamically popupmenu? Pin
JohnCz14-Jan-11 12:33
JohnCz14-Jan-11 12:33 
QuestionRe:MessageBox not showing Pin
Debojyoti Majumder12-Jan-11 19:44
Debojyoti Majumder12-Jan-11 19:44 
AnswerRe:MessageBox not showing Pin
Andrew Brock12-Jan-11 20:00
Andrew Brock12-Jan-11 20:00 
QuestionRe:MessageBox not showing Pin
Cool_Dev12-Jan-11 21:15
Cool_Dev12-Jan-11 21:15 
AnswerRe:MessageBox not showing Pin
Hamid_RT12-Jan-11 22:39
Hamid_RT12-Jan-11 22:39 
QuestionGetting logical drives of all Physical drives Pin
learningvisualc12-Jan-11 19:03
learningvisualc12-Jan-11 19:03 
AnswerRe: Getting logical drives of all Physical drives Pin
Andrew Brock12-Jan-11 19:17
Andrew Brock12-Jan-11 19:17 
QuestionHow can Terminate AfxbeginThread ? Pin
Le@rner12-Jan-11 18:39
Le@rner12-Jan-11 18:39 
How do I terminate a thread from outside of that thread.

My thread contains some function iand it takes some time to finish it .

i want when i send signal to stop thread its should stop immedeatily.
//To Run Thread I m using this.

CWinThread *Th;

// CTest_Thread CWinThread  derived class

Th = AfxBeginThread( RUNTIME_CLASS(CTest_Thread),THREAD_PRIORITY_NORMAL,0,CREATE_SUSPENDED,NULL);

if (NULL != Th)
{			
	Th >ResumeThread();
}

//To Stop Thread I m using this.

Th ->PostThreadMessage(WM_QUIT,NULL,NULL);


after using postthreadmessage to exit its not stop the thread immediately and its takes full time to perform thread functioning than stop and exit this.

so please tell me how can i stop the thread imeediately from outside of thread.
AnswerRe: How can Terminate AfxbeginThread ? [modified] Pin
Andrew Brock12-Jan-11 18:58
Andrew Brock12-Jan-11 18:58 
GeneralRe: How can Terminate AfxbeginThread ? [modified] Pin
Le@rner12-Jan-11 19:12
Le@rner12-Jan-11 19:12 
GeneralRe: How can Terminate AfxbeginThread ? Pin
Andrew Brock12-Jan-11 19:24
Andrew Brock12-Jan-11 19:24 
GeneralRe: How can Terminate AfxbeginThread ? [modified] Pin
Le@rner12-Jan-11 19:26
Le@rner12-Jan-11 19:26 
GeneralRe: How can Terminate AfxbeginThread ? Pin
Andrew Brock12-Jan-11 20:35
Andrew Brock12-Jan-11 20:35 
GeneralRe: How can Terminate AfxbeginThread ? Pin
Le@rner12-Jan-11 20:40
Le@rner12-Jan-11 20:40 
AnswerRe: How can Terminate AfxbeginThread ? [modified] Pin
Andrew Brock12-Jan-11 20:58
Andrew Brock12-Jan-11 20:58 
GeneralRe: How can Terminate AfxbeginThread ? Pin
Le@rner12-Jan-11 21:17
Le@rner12-Jan-11 21:17 
AnswerRe: How can Terminate AfxbeginThread ? Pin
Andrew Brock12-Jan-11 21:21
Andrew Brock12-Jan-11 21:21 
GeneralRe: How can Terminate AfxbeginThread ? Pin
Le@rner12-Jan-11 21:30
Le@rner12-Jan-11 21:30 

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.