forms with WS_POPUP style have a parent, GetParent(...)=0 is not reliable, and here redundant

tidy code a bit

git-svn-id: trunk@6244 -
This commit is contained in:
micha 2004-11-15 08:00:05 +00:00
parent cd01392045
commit 1164454eb6

View File

@ -1091,9 +1091,9 @@ Begin
Msg := LM_MOVE; Msg := LM_MOVE;
// MoveType := WParam; WParam is not defined! // MoveType := WParam; WParam is not defined!
MoveType := Move_SourceIsInterface; MoveType := Move_SourceIsInterface;
If (Windows.GetParent(Window) = 0) if (lWinControl is TCustomForm)
and (lWinControl is TCustomForm) and (TCustomForm(lWinControl).Parent=nil) then
and (TCustomForm(lWinControl).Parent=nil) then begin begin
if Windows.GetWindowRect(Window,@R) then if Windows.GetWindowRect(Window,@R) then
begin begin
XPos := R.Left; XPos := R.Left;
@ -1101,8 +1101,7 @@ Begin
end else begin end else begin
Msg := LM_NULL; Msg := LM_NULL;
end; end;
end end else begin
Else begin
if GetWindowRelativePosition(Window,NewLeft,NewTop) then if GetWindowRelativePosition(Window,NewLeft,NewTop) then
begin begin
XPos := NewLeft; XPos := NewLeft;
@ -1454,6 +1453,10 @@ end;
{ {
$Log$ $Log$
Revision 1.161 2004/11/15 08:00:05 micha
forms with WS_POPUP style have a parent, GetParent(...)=0 is not reliable, and here redundant
tidy code a bit
Revision 1.160 2004/11/12 15:33:13 vincents Revision 1.160 2004/11/12 15:33:13 vincents
fix changing key in OnKeyPress event. fix changing key in OnKeyPress event.