Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Delphi 3 DLL MDI Child forms in Delphi 3 MDI parent EXE

172 views
Skip to first unread message

Rob Hunter

unread,
Jun 12, 1998, 3:00:00 AM6/12/98
to

I have passed the application handle to the dll.
On attempting to create the childforms in the DLL I get the error "Cannot
create form. No MDI forms are currently active."

If I pass the entire TApplication object everything works fine but since the
exe will be C++ in the end, this doesn't look to be the long term answer.

I'm guessing that the dll application object needs to have a main form that
is MDIParent and has the handle of the exe main form,but this is read only
and so cannot be assigned in the dll.

Any ideas, however lateral, will be accepted with thanks.

Rob Hunter

Steve Pietrek

unread,
Jun 12, 1998, 3:00:00 AM6/12/98
to

I was getting the same error. What I forgot to do was set the Main Form to
be a MDIForm. After I did this everything worked.

By the way, from the Main Form, are you able to access the DLL MDI Child
Form. We would love to have MDI Children Forms in DLLs but I cannot access
anything on the MDI Child Form from the Main Form.

--
Steve Pietrek, Software Engineer
stevep...@nospam.vanguardsolutions.com
(remove "nospam." to email me)
Rob Hunter wrote in message <6lr2l8$f1...@forums.borland.com>...

Peter Below

unread,
Jun 12, 1998, 3:00:00 AM6/12/98
to

Rob,

try to create the MDI children in the DLL not with the Create constructor,
but with CreateParented, passing the window handle of the MDI frame window.

Peter Below (TeamB) 10011...@compuserve.com)


Kevin Baskerville

unread,
Jul 10, 1998, 3:00:00 AM7/10/98
to
Createdparented? Is this only a D3 option? I would like to know how this
works in D2.

Kevin Baskerville

Peter Below <10011...@compuserve.com> wrote in message ...

Peter Below

unread,
Jul 11, 1998, 3:00:00 AM7/11/98
to
In article <6o4dbe$n6...@forums.borland.com>, Kevin Baskerville wrote:
> Createdparented? Is this only a D3 option? I would like to know how this
> works in D2.
>
Yes, it is a D3 extension. I never tried the equivalent in D2 but you can
try to create the child window with an owner of Nil and, in an overriden
CreateParams set the params.hwndParent to the window handle of the
external MDI frame window.


Peter Below (TeamB) 10011...@compuserve.com)


0 new messages