Click here to Skip to main content
15,921,840 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: handwolf@126.com Pin
handwolf824-Sep-05 23:30
handwolf824-Sep-05 23:30 
QuestionRe: handwolf@126.com Pin
toxcct4-Sep-05 23:33
toxcct4-Sep-05 23:33 
AnswerRe: handwolf@126.com Pin
superhandwolf5-Sep-05 1:11
superhandwolf5-Sep-05 1:11 
GeneralRe: handwolf@126.com Pin
superhandwolf5-Sep-05 3:19
superhandwolf5-Sep-05 3:19 
AnswerRe: handwolf@126.com Pin
Gary R. Wheeler5-Sep-05 4:24
Gary R. Wheeler5-Sep-05 4:24 
QuestionHow to properly stop STA thread Pin
ComplexLifeForm4-Sep-05 23:03
ComplexLifeForm4-Sep-05 23:03 
AnswerRe: How to properly stop STA thread Pin
MailtoGops5-Sep-05 4:08
MailtoGops5-Sep-05 4:08 
GeneralRe: How to properly stop STA thread Pin
ComplexLifeForm5-Sep-05 7:06
ComplexLifeForm5-Sep-05 7:06 
Hi,

Thanks for the reply. Now for your queries,

The applications mainframe window creates a modal dialog in response to the menu action. The modal dialog is itself a thread. In the execute method of the thread it creates a connection to the remote server. Now if the connection is SSH I create another thread, this time a STA thread because I wanted to create the component on the thread itself,once the component is created successfully I proceed normally to actually open a connection.
Till the time the connection is created the user is displayed a modal dialog created earlier with a cancel button. If the user clicks on Cancel button I first issues a DisConnect call then use PostThreadMessage to send a WM_QUIT message to the thread that created a component and then wait for the thread to quit using MsgWaitForMultipleObjects API with an INFINITE time out specified, I am also pumping windows messages while waiting.

Hope this helps you to analyze the problem further.

Also please Note that it is difficult to change the current design as it is a legacy application

Thanks Again.
Questionproblem at run time window Pin
a_david1234-Sep-05 22:57
a_david1234-Sep-05 22:57 
AnswerRe: problem at run time window Pin
MailtoGops5-Sep-05 4:15
MailtoGops5-Sep-05 4:15 
QuestionCheck file status Pin
Member 11412684-Sep-05 22:53
Member 11412684-Sep-05 22:53 
AnswerRe: Check file status Pin
ThatsAlok4-Sep-05 23:24
ThatsAlok4-Sep-05 23:24 
QuestionSharing data between two DLLs Pin
lata07mahi4-Sep-05 22:14
lata07mahi4-Sep-05 22:14 
AnswerRe: Sharing data between two DLLs Pin
Neagoe Gabriel4-Sep-05 22:27
Neagoe Gabriel4-Sep-05 22:27 
AnswerRe: Sharing data between two DLLs Pin
ThatsAlok4-Sep-05 22:43
ThatsAlok4-Sep-05 22:43 
AnswerRe: Sharing data between two DLLs Pin
MailtoGops5-Sep-05 4:10
MailtoGops5-Sep-05 4:10 
QuestionCalling .exe application using C/C++ Pin
bryan5234-Sep-05 21:51
bryan5234-Sep-05 21:51 
AnswerRe: Calling .exe application using C/C++ Pin
Neagoe Gabriel4-Sep-05 22:13
Neagoe Gabriel4-Sep-05 22:13 
GeneralRe: Calling .exe application using C/C++ Pin
toxcct4-Sep-05 22:37
toxcct4-Sep-05 22:37 
GeneralRe: Calling .exe application using C/C++ Pin
Neagoe Gabriel4-Sep-05 22:44
Neagoe Gabriel4-Sep-05 22:44 
General[Message Deleted] Pin
toxcct4-Sep-05 22:48
toxcct4-Sep-05 22:48 
AnswerRe: Calling .exe application using C/C++ Pin
toxcct4-Sep-05 22:40
toxcct4-Sep-05 22:40 
AnswerRe: Calling .exe application using C/C++ Pin
ThatsAlok4-Sep-05 22:48
ThatsAlok4-Sep-05 22:48 
QuestionRe: Calling .exe application using C/C++ Pin
bryan5234-Sep-05 23:28
bryan5234-Sep-05 23:28 
AnswerRe: Calling .exe application using C/C++ Pin
toxcct4-Sep-05 23:32
toxcct4-Sep-05 23:32 

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.