Keith: Implemented GetWindowSize

git-svn-id: trunk@1679 -
This commit is contained in:
lazarus 2002-05-13 22:00:25 +00:00
parent b8972ebce8
commit 6db36227f3
2 changed files with 24 additions and 0 deletions

View File

@ -1053,6 +1053,20 @@ Begin
Result := Integer(Windows.GetWindowRect(Handle, @Rect));
End;
{$IFDEF ClientRectBugFix}
Function TWin32Object.GetWindowSize(Handle : hwnd; var Width, Height: integer): boolean;
var
R: TRect;
begin
Result := GetClientRect(Handle, R);
with R Do
begin
Width := right - left;
Height := bottom - top;
end;
end;
{$ENDIF}
{------------------------------------------------------------------------------
Method: HideCaret
Params: HWnd - handle to the window with the caret
@ -1837,6 +1851,9 @@ End;
{ =============================================================================
$Log$
Revision 1.10 2002/05/13 22:00:24 lazarus
Keith: Implemented GetWindowSize
Revision 1.9 2002/05/10 07:43:49 lazarus
MG: updated licenses

View File

@ -88,6 +88,10 @@ Function GetWindowLong(Handle: HWND; Int: Integer): LongInt; Override;
Function GetWindowOrgEx(DC: HDC; Var P: TPoint): Integer; Override;
Function GetWindowRect(Handle: HWND; Var Rect: TRect): Integer; Override;
{$IFDEF ClientRectBugFix}
Function GetWindowSize(Handle : hwnd; var Width, Height: integer): boolean;
{$ENDIF}
Function HideCaret(HWnd: HWND): Boolean; Override;
Function InvalidateRect(AHandle: HWND; Rect: PRect; BErase: Boolean): Boolean; Override;
@ -147,6 +151,9 @@ Function WindowFromPoint(Point: TPoint): HWND; Override;
{ =============================================================================
$Log$
Revision 1.7 2002/05/13 22:00:25 lazarus
Keith: Implemented GetWindowSize
Revision 1.6 2002/05/10 07:43:49 lazarus
MG: updated licenses