Dll MDIChild problem

Hi,

Im writing an aplication witch has just on MDI (Main)form. The clients are
inside of an DLL. On initialize the dll i give the application and screen
references from the main program to the dll so i can set the application and
screen of the dll to those of the main application. On close i set them
back.
Now when i create the mdiclients they appear in the mainform.

For now this al works fine and i can find by MDIChildCount and MDIChildren
my childs, but for windows the clients are stil created for the dll becouse
in the forms unit, when the clients are created with CreateMDIClient delphi
uses the hinstance instead of Application.Handle.
Becouse of this i can't get the activeMDIChild (Windows function) And the
MDI menus won't work.

Does any one know how to work with this stuff?

P.S. It wont work when i change HInstance into application.handle in the
forms unit. This raises a very big exception.

--
Groeten,

Joost van der Waal
EMail : W...@Hotmail.Com