Multiple MDI Parent Forms in a Single Application [closed]

对着背影说爱祢 提交于 2019-12-23 06:58:39

问题


The VCL does not natively allow forms other than the MainForm to host MDI child forms. This is a hard-coded limitation on Borland's part, not a limitation in Microsoft's MDI architecture. Microsoft allows multiple windows in an application to host MDI children. There is no concept of MainForms in the Win32 API.

I have tried converting the below embarcadro c++ example to embarcadro delphi without success. I keep encountering the error "no mdi forms are currently active" when creating the mdi child forms.

This c++ sample demonstrates how to allow a non-MDI project to host multiple MDI parent forms, none of which are the VCL's MainForm.

Download with Information (Account required to download) http://cc.embarcadero.com/item/23574

Direct Download (No account required to download) http://www.delphibasics.info/MultipleMDIParentFormsInASingleApplication.zip

I would be grateful if someone would convert this sample from embarcadro c++ language to embarcadro delphi language. Thank you.


回答1:


Quality Central #12006 Hosting MDI child forms in non-MainForm forms has detailed steps in its workaround description for how to add support for that. It does involve patching the VCL sources though, and was posted against Delphi 2005, so some of the steps may have changed. It's also been closed as Won't Do, so if you pursue that approach you'll have to maintain it yourself long-term.



来源:https://stackoverflow.com/questions/10129890/multiple-mdi-parent-forms-in-a-single-application

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!