Board index » cppbuilder » MDI Child question

MDI Child question


2007-10-22 11:08:29 PM
cppbuilder10
Hello everybody,
I've always used forms when I write applications but get annoyed when they
don't see part of the main form.
I've been looking at using MDI forms instead.
However, I have a very basic question: -
How do you setup a close button on an MDIChild so it can close itself
eg.
FormName = mdiChild
mdiChild->Close(); ???
 
 

Re:MDI Child question

Derrick Hobson schrieb:
Quote
Hello everybody,

I've always used forms when I write applications but get annoyed when
they don't see part of the main form.

I've been looking at using MDI forms instead.

However, I have a very basic question: -

How do you setup a close button on an MDIChild so it can close itself

eg.
FormName = mdiChild

mdiChild->Close(); ???
You need an OnClose Handler for your MDI-Child-window. The default ist
just to iconify the child. If you want another behaviour, you must set
the Action parameter of the OnClose handler.
Here is an example:
void __fastcall ThttpChartForm::FormClose(TObject *, TCloseAction &Action)
{
Action = caFree;
}
hope this helps
Martin
--
Firma/Company: CRESD GmbH
WWW: www.cresd.de
PGP-Key: www.cresd.de/edv/pgpkey.txt
Open BC (Einladung) www.openbc.com/go/invita/4561755