parent
37ff1b871a
commit
152470c5db
|
|
@ -132,12 +132,15 @@ type TWinControl = class(tcontrol)
|
||||||
_wapi.BringWindowToTop(hWnd);
|
_wapi.BringWindowToTop(hWnd);
|
||||||
//disable掉父窗口
|
//disable掉父窗口
|
||||||
FModalRootWnd := 0;
|
FModalRootWnd := 0;
|
||||||
|
inabledlist := array();
|
||||||
|
inabledlistidx := 0;
|
||||||
if(modp is class(TWinControl))and modp.HandleAllocated()then
|
if(modp is class(TWinControl))and modp.HandleAllocated()then
|
||||||
begin
|
begin
|
||||||
hParentWnd := modp.Handle;
|
hParentWnd := modp.Handle;
|
||||||
while(hParentWnd) do
|
while(hParentWnd) do
|
||||||
begin
|
begin
|
||||||
_wapi.EnableWindow(hParentWnd,FALSE);
|
_wapi.EnableWindow(hParentWnd,FALSE);
|
||||||
|
inabledlist[inabledlistidx++] := hParentWnd;
|
||||||
wdobj := class(tUIglobalData).uigetdata("TGlobalComponentcache").getwndbyhwnd(hParentWnd);
|
wdobj := class(tUIglobalData).uigetdata("TGlobalComponentcache").getwndbyhwnd(hParentWnd);
|
||||||
if wdobj and wdobj.Modaling then
|
if wdobj and wdobj.Modaling then
|
||||||
begin
|
begin
|
||||||
|
|
@ -174,7 +177,13 @@ type TWinControl = class(tcontrol)
|
||||||
end
|
end
|
||||||
//模态已经退出
|
//模态已经退出
|
||||||
//恢复父窗口的enable状态
|
//恢复父窗口的enable状态
|
||||||
if(modp is class(TWinControl))and modp.HandleAllocated()then
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
for i:= length(inabledlist)-1 downto 0 do
|
||||||
|
begin
|
||||||
|
_wapi.EnableWindow(inabledlist[i],TRUE);
|
||||||
|
end
|
||||||
|
inabledlist := nil;
|
||||||
|
{if(modp is class(TWinControl))and modp.HandleAllocated()then
|
||||||
begin
|
begin
|
||||||
hParentWnd := modp.Handle;
|
hParentWnd := modp.Handle;
|
||||||
while(hParentWnd) do
|
while(hParentWnd) do
|
||||||
|
|
@ -183,7 +192,8 @@ type TWinControl = class(tcontrol)
|
||||||
if FModalRootWnd=hParentWnd then break;
|
if FModalRootWnd=hParentWnd then break;
|
||||||
hParentWnd := _wapi.GetParent(hParentWnd);
|
hParentWnd := _wapi.GetParent(hParentWnd);
|
||||||
end
|
end
|
||||||
end
|
end}
|
||||||
|
///////////////////////////////////////////////////////////////////////
|
||||||
//将自己隐藏
|
//将自己隐藏
|
||||||
_wapi.ShowWindow(hWnd,SW_HIDE);
|
_wapi.ShowWindow(hWnd,SW_HIDE);
|
||||||
return FModalCode;
|
return FModalCode;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue