lcl/win32: Add GetCurrentObject. Implement under win32. Part of 14792

git-svn-id: trunk@26256 -
This commit is contained in:
blikblum 2010-06-22 17:03:04 +00:00
parent 9b6e7948a9
commit 2b652bd86c
5 changed files with 26 additions and 0 deletions

View File

@ -937,6 +937,11 @@ begin
Result := -1;
end;
function TWidgetSet.GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ;
begin
Result := 0;
end;
function TWidgetSet.GetCursorPos(var lpPoint: TPoint): Boolean;
begin
Result := False;

View File

@ -356,6 +356,11 @@ begin
Result := WidgetSet.GetCursorPos(lpPoint);
end;
function GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ;
begin
Result := WidgetSet.GetCurrentObject(DC, uObjectType);
end;
function GetCharABCWidths(DC: HDC; p2, p3: UINT; const ABCStructs): Boolean;
begin
Result := WidgetSet.GetCharABCWidths(DC, p2, p3, ABCStructs);

View File

@ -119,6 +119,7 @@ function GetCaretPos(var lpPoint: TPoint): Boolean; {$IFDEF IF_BASE_MEMBER}virtu
function GetClientRect(handle : HWND; var Rect: TRect) : Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function GetClipBox(DC : hDC; lpRect : PRect) : Longint; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function GetClipRGN(DC : hDC; RGN : hRGN) : Longint; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function GetCursorPos(var lpPoint: TPoint): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function GetCharABCWidths(DC: HDC; p2, p3: UINT; const ABCStructs): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF} //pbd
function GetDC(hWnd: HWND): HDC; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}

View File

@ -1625,6 +1625,20 @@ begin
Result := Windows.GetClipRGN(DC, RGN);
end;
{------------------------------------------------------------------------------
Method: GetCurrentObject
Params:
DC - A handle to the DC
uObjectType - The object type to be queried
Returns: If the function succeeds, the return value is a handle to the specified object.
If the function fails, the return value is NULL.
------------------------------------------------------------------------------}
function TWin32WidgetSet.GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ;
begin
Result := Windows.GetCurrentObject(DC, uObjectType);
end;
{------------------------------------------------------------------------------
Method: GetCursorPos
Params: LPPoint - record to receive coordinates

View File

@ -99,6 +99,7 @@ function GetClientBounds(Handle: HWND; Var Rect: TRect): Boolean; override;
function GetClientRect(Handle: HWND; Var Rect: TRect): Boolean; override;
function GetClipBox(DC : hDC; lpRect : PRect) : Longint; override;
function GetClipRGN(DC : hDC; RGN : hRGN) : Longint; override;
function GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ; override;
function GetCursorPos(var LPPoint: TPoint): Boolean; override;
function GetDC(HWnd: HWND): HDC; override;
function GetDCOriginRelativeToWindow(PaintDC: HDC; WindowHandle: HWND; var OriginDiff: TPoint): boolean; override;