单个应用程序中的多个MDI父表单 [英] Multiple MDI Parent Forms in a Single Application

查看:115
本文介绍了单个应用程序中的多个MDI父表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

VCL本身不允许MainForm以外的其他表单托管MDI子表单。这是Borland的硬编码限制,不是Microsoft MDI体系结构的限制。 Microsoft允许应用程序中的多个窗口托管MDI子级。 Win32 API中没有MainForms的概念。

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.

我尝试将下面的embarcadro c ++示例转换为embarcadro delphi,但没有成功。
创建mdi子表单时,我总是遇到错误当前没有任何mdi表单。

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.

此c ++示例演示了如何允许非MDI

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.

带信息下载(需要下载帐户)的项目,以承载多个MDI父窗体,而这些都不是VCL的MainForm。
http://cc.embarcadero.com/item/23574

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

直接下载(无需下载帐户)
http://www.delphibasics.info/MultipleMDIParentFormsInASingleApplication .zip

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

如果有人将这个示例从embarcadro c ++语言转换为embarcadro delphi语言,我将不胜感激。谢谢。

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

推荐答案

Quality Central #12006以非MainForm形式托管MDI子表单在其变通办法说明中详细说明了如何添加对此的支持。它确实涉及修补VCL源,并且是针对Delphi 2005发布的,因此某些步骤可能已更改。 不会也已将其关闭,因此,如果您采用这种方法,则必须长期保持这种状态。

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.

这篇关于单个应用程序中的多个MDI父表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆