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; WindowInfo: PWin32WindowInfo;
Flags: dword; Flags: dword;
WindowDC: HDC; WindowDC: HDC;
WindowPlacement: TWINDOWPLACEMENT;
LMScroll: TLMScroll; // used by WM_HSCROLL LMScroll: TLMScroll; // used by WM_HSCROLL
LMKey: TLMKey; // used by WM_KEYDOWN WM_KEYUP LMKey: TLMKey; // used by WM_KEYDOWN WM_KEYUP
@ -2514,6 +2515,16 @@ begin
lWinControl := Application.MainForm; lWinControl := Application.MainForm;
Window := Application.MainForm.Handle; Window := Application.MainForm.Handle;
end; end;
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); GetWindowSize(Window, NewWidth, NewHeight);
Width := NewWidth; Width := NewWidth;
Height := NewHeight; Height := NewHeight;