Board index » Visual Studio » how to close the chld frm wnd?

how to close the chld frm wnd?

Visual Studio281
hi,

i'm working with a MDI application, client/server application. my application goes like this, when i clicked a 'Connect' menu a connection with remote machine is establised and a new child frame window created. after some process, when i click 'Disconnect' menu the prevailing connection should be closed as well as its appropriate child frame window.

i've coded only for disconnecting the socket connection but not for destroying chld frame wnd. how to do that?



thx in advance,


-
 

Re:how to close the chld frm wnd?

Well, you could send the message WM_CLOSE to your child frame. In MDI you

can save the window pointer in a app variable or find the window with

GetActiveView().

Guido





-

Re:how to close the chld frm wnd?

I'd suggest implementing your disconnvect handler in the view or document and have that

handler shut the view down. PostMessage a WM_CLOSE to the child frame.

joe



On Fri, 23 Apr 2004 04:16:03 -0700, "Adraj" <anonymous@discussions.microsoft.com>wrote:



Quote
hi,

i'm working with a MDI application, client/server application. my application goes like this, when i clicked a 'Connect' menu a connection with remote machine is establised and a new child frame window created. after some process, when i click 'Disconnect' menu the prevailing connection should be closed as well as its appropriate child frame window.

i've coded only for disconnecting the socket connection but not for destroying chld frame wnd. how to do that?



thx in advance,



Joseph M. Newcomer [MVP]

email: newcomer@flounder.com

Web: www.flounder.com">www.flounder.com

MVP Tips: www.flounder.com/mvp_tips.htm">www.flounder.com/mvp_tips.htm

-