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?
Asked
Active
Viewed 823 times
2 Answers
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.

Lars Truijens
- 42,837
- 6
- 126
- 143
-
Also refer to my QC report on the same topic (though it is closed as "Won't Do"): http://qc.embarcadero.com/wc/qcmain.aspx?d=12006 – Remy Lebeau Mar 22 '11 at 22:44
-
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. – zoomz Apr 05 '11 at 05:50
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.

David Heffernan
- 601,492
- 42
- 1,072
- 1,490