win32: return normal window size on WM_SIZE message if window is minimized

git-svn-id: trunk@21727 -
This commit is contained in:
paul 2009-09-16 07:02:04 +00:00
parent 680007c6ee
commit 718cf5e973

View File

@ -242,6 +242,7 @@ var
WindowInfo: PWin32WindowInfo;
Flags: dword;
WindowDC: HDC;
WindowPlacement: TWINDOWPLACEMENT;
LMScroll: TLMScroll; // used by WM_HSCROLL
LMKey: TLMKey; // used by WM_KEYDOWN WM_KEYUP
@ -2514,7 +2515,17 @@ begin
lWinControl := Application.MainForm;
Window := Application.MainForm.Handle;
end;
GetWindowSize(Window, NewWidth, NewHeight);
if IsIconic(Window) then
begin
GetWindowPlacement(Window, @WindowPlacement);
with WindowPlacement.rcNormalPosition do
begin
NewWidth := Right - Left;
NewHeight := Bottom - Top;
end;
end
else
GetWindowSize(Window, NewWidth, NewHeight);
Width := NewWidth;
Height := NewHeight;
if lWinControl <> nil then