Board index » delphi » MDI Child Form Close Button in Delphi 1.0?????

MDI Child Form Close Button in Delphi 1.0?????

Anybody have any ideas on why the X close button on MDI child windows would
be grayed out and disable at times?  Any fixes to this?
 

Re:MDI Child Form Close Button in Delphi 1.0?????


Quote
> Anybody have any ideas on why the X close button on MDI child windows would
> be grayed out and disable at times?  Any fixes to this?

I think it is due to a bug in the Windows MDI implementation. However, it
only seems to surface if the program plays around with the WindowState in
code instead of leaving all minimizing and maximizing to the user.

If you maximize child forms in code now by setting the WindowState property,
try to switch to sending a WM_MDIMAXIMIZE message to the MDi client window
instead.

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitely requested!

Re:MDI Child Form Close Button in Delphi 1.0?????


I tried that but it still does it.  If it is one MDI Child form it doesn't
do it until I create a second one.

I am using Application.CreateForm to create the MDI Child.

Any other suggestions?

Quote
Peter Below <100113.1...@compuserve.com> wrote in message ...
>> Anybody have any ideas on why the X close button on MDI child windows
would
>> be grayed out and disable at times?  Any fixes to this?

>I think it is due to a bug in the Windows MDI implementation. However, it
>only seems to surface if the program plays around with the WindowState in
>code instead of leaving all minimizing and maximizing to the user.

>If you maximize child forms in code now by setting the WindowState
property,
>try to switch to sending a WM_MDIMAXIMIZE message to the MDi client window
>instead.

>Peter Below (TeamB)  100113.1...@compuserve.com)
>No e-mail responses, please, unless explicitely requested!

Re:MDI Child Form Close Button in Delphi 1.0?????


Quote
In article <729o2n$4...@forums.borland.com>, Kenneth R. Lewis wrote:
> I tried that but it still does it.  If it is one MDI Child form it doesn't
> do it until I create a second one.

> I am using Application.CreateForm to create the MDI Child.

> Any other suggestions?

No, sorry. I never used MDI for anything more serious than the text editor
example program. MDi is one big hack, and MS has abandoned it long ago for
its own apps, they use a custom windowing library instead.

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitely requested!

Other Threads