界面库

不销毁根节点
This commit is contained in:
JianjunLiu
2022-09-05 21:40:43 +08:00
parent 11c84635ee
commit 8262c6528f
+12 -2
View File
@@ -527,6 +527,14 @@ type tapplication=class(tcomponent)
CreateHandle(); CreateHandle();
FApplicationWindow.bindmessage(WM_ACTIVATEAPP,thisfunction(WMACTIVATEAPP)); FApplicationWindow.bindmessage(WM_ACTIVATEAPP,thisfunction(WMACTIVATEAPP));
end end
function Notification(a,op);override;
begin
inherited;
if a=Fmainform and op="recycling" then
begin
Fmainform := nil;
end
end
function createform(classname,varable); function createform(classname,varable);
begin begin
{** {**
@@ -537,7 +545,8 @@ type tapplication=class(tcomponent)
if paramcount<2 then exit; //变量不够 if paramcount<2 then exit; //变量不够
if classname is class(tcomponent)then if classname is class(tcomponent)then
begin begin
if not(FApplicationWindow)then initialize(); //if not(FApplicationWindow)then
initialize();
varable := createobject(classname,FApplicationWindow); varable := createobject(classname,FApplicationWindow);
if varable is class(TVCForm)then if varable is class(TVCForm)then
begin begin
@@ -4942,7 +4951,8 @@ type tapplicationwindow=class(TWinControl)
end end
Function DoWMCLOSE(o,e);override; Function DoWMCLOSE(o,e);override;
begin begin
Recycling(); //Recycling();
DestroyComponents();
_wapi.PostQuitMessage(0); _wapi.PostQuitMessage(0);
end end
function DoCnNotify(o,e);override; function DoCnNotify(o,e);override;