在delphi里面用mdi结构怎么判断其中的某个子窗体已经被创建啊?我用FindWindowEx()好像不行请大家指点下
以下是代码,请大家看看那里错了
(MainForm是主窗体,TMDIChild是子窗体)
if FindWindowEx(MainForm.Handle,0,0,'no1')=0 then
begin
Child := TMDIChild.Create(Application);
Child.Caption := 'no1';
end
else
................
以下是代码,请大家看看那里错了
(MainForm是主窗体,TMDIChild是子窗体)
if FindWindowEx(MainForm.Handle,0,0,'no1')=0 then
begin
Child := TMDIChild.Create(Application);
Child.Caption := 'no1';
end
else
................
Application.CreateForm(TMDIChildFrm,MDIChildFrm);
MDIChildFrm.Caption:='nol';
IF not Assigned(TMDIChild) then
TMDIChild:= TTMDIChild.Create(self)
else
TMDIChild.Show ;
end;
if not Assigned(frmStorageMain) then
begin
frmStorageMain:=TfrmStorageMain.Create(Application);
frmStorageMain.Show;
end
else
frmStorageMain.WindowState:=wsMaximized;