mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-12 09:39:16 +02:00
win32: set WindowPlacement.Length before the call of GetWindowPlacement
git-svn-id: trunk@29754 -
This commit is contained in:
parent
74952c9d65
commit
0f516fc6ef
@ -2266,6 +2266,7 @@ begin
|
||||
MoveType := Move_SourceIsInterface;
|
||||
if (lWinControl is TCustomForm) and (TCustomForm(lWinControl).Parent = nil) then
|
||||
begin
|
||||
WindowPlacement.length := SizeOf(WindowPlacement);
|
||||
if IsIconic(Window) and GetWindowPlacement(Window, @WindowPlacement) then
|
||||
begin
|
||||
with WindowPlacement.rcNormalPosition do
|
||||
@ -2317,6 +2318,7 @@ begin
|
||||
Window := Application.MainFormHandle;
|
||||
end;
|
||||
end;
|
||||
WindowPlacement.length := SizeOf(WindowPlacement);
|
||||
if IsIconic(Window) and GetWindowPlacement(Window, @WindowPlacement) then
|
||||
begin
|
||||
with WindowPlacement.rcNormalPosition do
|
||||
@ -2329,7 +2331,7 @@ begin
|
||||
GetWindowSize(Window, NewWidth, NewHeight);
|
||||
Width := NewWidth;
|
||||
Height := NewHeight;
|
||||
if lWinControl <> nil then
|
||||
if Assigned(lWinControl) then
|
||||
begin
|
||||
{$IFDEF VerboseSizeMsg}
|
||||
GetClientRect(Window,R);
|
||||
|
@ -2191,6 +2191,7 @@ var
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
WindowPlacement.length := SizeOf(WindowPlacement);
|
||||
if IsIconic(Handle) and GetWindowPlacement(Handle, @WindowPlacement) then
|
||||
R := WindowPlacement.rcNormalPosition
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user