win32: move last notebook related message handling to own window proc

git-svn-id: trunk@30196 -
This commit is contained in:
paul 2011-04-05 02:53:07 +00:00
parent 902d2755bb
commit 9fadfea500
2 changed files with 19 additions and 13 deletions

View File

@ -2298,15 +2298,7 @@ begin
if (lWinControl.Width <> Width) or
(lWinControl.Height <> Height) or
lWinControl.ClientRectNeedsInterfaceUpdate then
begin
lWinControl.DoAdjustClientRectChange;
if (lWinControl is TCustomPage) and (lWinControl.Parent is TCustomNotebook) then
begin
// the TCustomPage size is the ClientRect size of the parent
// => invalidate the Parent.ClientRect
lWinControl.Parent.InvalidateClientRectCache(false);
end;
end
lWinControl.DoAdjustClientRectChange
else
// If we get form size message then we probably changed it state
// (minimized/maximized -> normal). Form adjust its clientrect in the

View File

@ -288,11 +288,25 @@ end;
function PageWindowProc(Window: HWnd; Msg: UInt; WParam: Windows.WParam;
LParam: Windows.LParam): LResult; stdcall;
var
Info: PWin32WindowInfo;
begin
if Msg = WM_THEMECHANGED then
begin
ThemeServices.UpdateThemes;
TWin32WSCustomPage.ThemeChange(Window);
case Msg of
WM_THEMECHANGED:
begin
ThemeServices.UpdateThemes;
TWin32WSCustomPage.ThemeChange(Window);
end;
WM_SIZE:
begin
Info := GetWin32WindowInfo(Window);
if (Info^.WinControl.Parent is TCustomNotebook) then
begin
// the TCustomPage size is the ClientRect size of the parent
// => invalidate the Parent.ClientRect
Info^.WinControl.Parent.InvalidateClientRectCache(false);
end;
end;
end;
Result := WindowProc(Window, Msg, WParam, LParam);
end;