It is possible to create more than one MDI form in a delphi application?
Asked Answered
C

2

6

I developed a mdi application that has in its main form several child windows that are created at runtime. The child windows are custom forms. I want to display those custom forms in another form from the same application. Is this possible?

Calcariferous answered 21/3, 2011 at 7:28 Comment(0)
U
8

No, that is not possible using standard VCL. Only the application's MainForm can be the MDI Form. But it should be possible by using win32 directly as shown here.

Unmeant answered 21/3, 2011 at 8:0 Comment(2)
Also refer to my QC report on the same topic (though it is closed as "Won't Do"): qc.embarcadero.com/wc/qcmain.aspx?d=12006Topper
Sorry for the late replay (as i have been involved in another projects). It didn't work. Sorry. When I create the second mdi form its child windows are painted in the main form.Calcariferous
P
0

I don't believe this is possible in the VCL. As I understand it the MDI form is assumed to be the main form (Application.MainForm). I imagine the underlying Windows routines will not have any such assumption, but I think the VCL will not let you do this without some serious hacking.

At various points in the VCL framework, the important MDI messages are sent to Application.MainForm.ClientHandle. Now, ClientHandle is the MDI container, but for some reason the container for the main form has been singled out.

Pandit answered 21/3, 2011 at 8:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.