Reusing forms as DLLs in non-Delphi applications
Posted on 1997-07-03
am trying to write a Delph-1-DLL with forms which should be opend by a
non-Delphi application as child windows of its client area.
So, I suppose, the
constructor create(AOwner: TComponent) and the
procedure CreateParams(var Params: TCreateParams)
of the derived class "TMyForm", have to perform the assignment of the non-Delphi
window to MyForm.Parent and MyForm.Owner. If "Hwnd" is the handle of the non-Delphi
window, the exported DLL procedure has the following form:
Procedure OpenMyForm (Hwnd: handle);
AOwner := MakeOwnver (Hwnd);
MyForm := TMyForm.Create (AOwner);
But how can I create a variable of type TComponent, if I only know the handle of this non-Delphi window, that means, how works "MakeOwnver".
If this concept isn't right, please, explain the correct method.