mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 08:39:48 +02:00
Components, ActiveX: fixed container resizing, patch by ocean, bug #23566
git-svn-id: trunk@40330 -
This commit is contained in:
parent
c5115fb647
commit
6f199fa45b
@ -35,7 +35,7 @@ unit activexcontainer;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils,Controls,windows, ActiveX, ComObj,forms,graphics;
|
Classes, SysUtils, Controls, Windows, ActiveX, ComObj, Forms, Graphics;
|
||||||
|
|
||||||
type
|
type
|
||||||
//from OCIDL.h
|
//from OCIDL.h
|
||||||
@ -248,13 +248,13 @@ begin
|
|||||||
AXC.Width:=LOWORD(lparam);
|
AXC.Width:=LOWORD(lparam);
|
||||||
AXC.Height:=LOWORD(lparam);
|
AXC.Height:=LOWORD(lparam);
|
||||||
olecheck((AXC.ComServer as IOleObject).SetExtent(DVASPECT_CONTENT,size));
|
olecheck((AXC.ComServer as IOleObject).SetExtent(DVASPECT_CONTENT,size));
|
||||||
bounds:=AXC.BoundsRect;
|
bounds:=AXC.ClientRect;
|
||||||
olecheck((AXC.ComServer as IOleInPlaceObject).SetObjectRects(@bounds,@bounds));
|
olecheck((AXC.ComServer as IOleInPlaceObject).SetObjectRects(@bounds,@bounds));
|
||||||
end;
|
end;
|
||||||
WM_PAINT:
|
WM_PAINT:
|
||||||
begin
|
begin
|
||||||
DC:=GetDC(AXC.handle);
|
DC:=GetDC(AXC.handle);
|
||||||
bounds:=AXC.BoundsRect;
|
bounds:=AXC.ClientRect;
|
||||||
olecheck((AXC.ComServer as IViewObject).Draw(DVASPECT_CONTENT,0,nil,nil,0,DC,@bounds,@bounds,nil,0));
|
olecheck((AXC.ComServer as IViewObject).Draw(DVASPECT_CONTENT,0,nil,nil,0,DC,@bounds,@bounds,nil,0));
|
||||||
ReleaseDC(AXC.handle,DC);
|
ReleaseDC(AXC.handle,DC);
|
||||||
end;
|
end;
|
||||||
@ -611,7 +611,7 @@ begin
|
|||||||
size.x:=(Width*2540) div Screen.PixelsPerInch;
|
size.x:=(Width*2540) div Screen.PixelsPerInch;
|
||||||
size.y:=(Height*2540) div Screen.PixelsPerInch;
|
size.y:=(Height*2540) div Screen.PixelsPerInch;
|
||||||
olecheck((FOleObject as IOleObject).SetExtent(DVASPECT_CONTENT,size));
|
olecheck((FOleObject as IOleObject).SetExtent(DVASPECT_CONTENT,size));
|
||||||
olecheck((FOleObject as IOleObject).DoVerb(OLEIVERB_INPLACEACTIVATE,nil,Self as IOleClientSite,0,Handle,BoundsRect));
|
olecheck((FOleObject as IOleObject).DoVerb(OLEIVERB_INPLACEACTIVATE,nil,Self as IOleClientSite,0,Handle,ClientRect));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TActiveXContainer.Detach;
|
procedure TActiveXContainer.Detach;
|
||||||
|
Loading…
Reference in New Issue
Block a user