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