unit DllForm;

interface

uses
	Windows, Controls, Classes, Forms;

type
	TDllForm = class(TForm)
	protected
		procedure CreateParams(var Params: TCreateParams); override;
	end;

	procedure InitDllForms(aMainWnd: HWnd);


implementation

var
	gMainWnd: HWnd = 0;


procedure InitDllForms(aMainWnd: HWnd);
begin
	gMainWnd := aMainWnd;
end;

{ TDllForm }

procedure TDllForm.CreateParams(var Params: TCreateParams);
begin
	inherited CreateParams(Params);
	if gMainWnd <> 0 then
		Params.WndParent:= gMainWnd;
end;

end.

