mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 21:20:46 +02:00
Components, ActiveX: fixed container height and some cleanup, patch by ocean, bug #24151
git-svn-id: trunk@40653 -
This commit is contained in:
parent
04a1a5d3f9
commit
8628a482d7
@ -205,8 +205,6 @@ type
|
|||||||
property Active:boolean read FActive write SetActive;
|
property Active:boolean read FActive write SetActive;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$ifdef wince}
|
{$ifdef wince}
|
||||||
@ -234,7 +232,6 @@ function WndCallback(Ahwnd: HWND; uMsg: UINT; wParam: WParam;
|
|||||||
var
|
var
|
||||||
bounds:TRect;
|
bounds:TRect;
|
||||||
DC: HDC;
|
DC: HDC;
|
||||||
PS: TPaintStruct;
|
|
||||||
size:TPOINT;
|
size:TPOINT;
|
||||||
AXC:TActiveXContainer;
|
AXC:TActiveXContainer;
|
||||||
begin
|
begin
|
||||||
@ -246,7 +243,7 @@ begin
|
|||||||
size.x:=(LOWORD(lparam)*2540) div Screen.PixelsPerInch;
|
size.x:=(LOWORD(lparam)*2540) div Screen.PixelsPerInch;
|
||||||
size.y:=(HIWORD(lparam)*2540) div Screen.PixelsPerInch;
|
size.y:=(HIWORD(lparam)*2540) div Screen.PixelsPerInch;
|
||||||
AXC.Width:=LOWORD(lparam);
|
AXC.Width:=LOWORD(lparam);
|
||||||
AXC.Height:=LOWORD(lparam);
|
AXC.Height:=HIWORD(lparam);
|
||||||
olecheck((AXC.ComServer as IOleObject).SetExtent(DVASPECT_CONTENT,size));
|
olecheck((AXC.ComServer as IOleObject).SetExtent(DVASPECT_CONTENT,size));
|
||||||
bounds:=AXC.ClientRect;
|
bounds:=AXC.ClientRect;
|
||||||
olecheck((AXC.ComServer as IOleInPlaceObject).SetObjectRects(@bounds,@bounds));
|
olecheck((AXC.ComServer as IOleInPlaceObject).SetObjectRects(@bounds,@bounds));
|
||||||
@ -262,8 +259,6 @@ begin
|
|||||||
result:=CallWindowProc(AXC.FPrevWndProc,Ahwnd, uMsg, WParam, LParam);
|
result:=CallWindowProc(AXC.FPrevWndProc,Ahwnd, uMsg, WParam, LParam);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{ TActiveXContainer }
|
{ TActiveXContainer }
|
||||||
|
|
||||||
function TActiveXContainer.GetvObject: variant;
|
function TActiveXContainer.GetvObject: variant;
|
||||||
@ -546,8 +541,6 @@ end;
|
|||||||
function TActiveXContainer.Invoke(DispID: LongInt; const iid: TGUID;
|
function TActiveXContainer.Invoke(DispID: LongInt; const iid: TGUID;
|
||||||
LocaleID: longint; Flags: Word; var params; VarResult, ExcepInfo,
|
LocaleID: longint; Flags: Word; var params; VarResult, ExcepInfo,
|
||||||
ArgErr: pointer): HResult; stdcall;
|
ArgErr: pointer): HResult; stdcall;
|
||||||
var
|
|
||||||
F: TFont;
|
|
||||||
const
|
const
|
||||||
DISPID_AMBIENT_BACKCOLOR = -701;
|
DISPID_AMBIENT_BACKCOLOR = -701;
|
||||||
DISPID_AMBIENT_DISPLAYNAME = -702;
|
DISPID_AMBIENT_DISPLAYNAME = -702;
|
||||||
@ -561,8 +554,6 @@ const
|
|||||||
DISPID_AMBIENT_SHOWHATCHING = -712;
|
DISPID_AMBIENT_SHOWHATCHING = -712;
|
||||||
DISPID_AMBIENT_SUPPORTSMNEMONICS = -714;
|
DISPID_AMBIENT_SUPPORTSMNEMONICS = -714;
|
||||||
DISPID_AMBIENT_AUTOCLIP = -715;
|
DISPID_AMBIENT_AUTOCLIP = -715;
|
||||||
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if (Flags and DISPATCH_PROPERTYGET <> 0) and (VarResult <> nil) then
|
if (Flags and DISPATCH_PROPERTYGET <> 0) and (VarResult <> nil) then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user