fix WM_PRINTCLIENT handling

git-svn-id: trunk@13273 -
This commit is contained in:
paul 2007-12-11 07:10:12 +00:00
parent df4fd226c4
commit 59c9873708

View File

@ -322,6 +322,12 @@ var
else Result := nil;
end;
function GetIsNativeControl(AWindow: HWND): Boolean;
begin
GetClassName(AWindow, winClassName, 20);
Result := not CompareMem(@winClassName, @ClsName, High(ClsName) + 1);
end;
procedure SendPaintMessage(ControlDC: HDC);
var
DC: HDC;
@ -356,7 +362,7 @@ var
GetClassName(Window, winClassName, 20);
isNotebook := ThemeServices.ThemesEnabled and
CompareMem(@winClassName, @TabControlClsName, High(TabControlClsName)+1);
isNativeControl := not CompareMem(@winClassName, @ClsName, High(ClsName)+1);
isNativeControl := GetIsNativeControl(Window);
ParentPaintWindow := 0;
needParentPaint := GetNeedParentPaint(WindowInfo, lWinControl);
// if needParentPaint and not isTabPage then background will be drawn in
@ -1868,11 +1874,16 @@ begin
end;
end;
end;
WM_PAINT, WM_PRINTCLIENT:
WM_PAINT:
begin
SendPaintMessage(HDC(WParam));
// SendPaintMessage sets winprocess to false
end;
WM_PRINTCLIENT:
begin
if ((LParam and PRF_CLIENT) = PRF_CLIENT) and (lWinControl <> nil) then
SendPaintMessage(HDC(WParam));
end;
WM_PASTE:
begin
LMessage.Msg := LM_PASTEFROMCLIP;