Win32: Implement TWin32WidgetSet.GetScrollbarVisible. Partially resolves Issue #0026083.

git-svn-id: trunk@46788 -
This commit is contained in:
bart 2014-11-08 23:58:28 +00:00
parent 7d8ba3e55e
commit 0eb198cb3a
2 changed files with 26 additions and 0 deletions

View File

@ -2032,6 +2032,30 @@ begin
Result:= Windows.GetRgnBox(Rgn, Windows.LPRECT(lpRect));
end;
{------------------------------------------------------------------------------
Function: GetScrollBarVisible
Params: Handle, SBStyle
Returns: Boolean
Returns wether the ControlScrollBar of a given control is visible
------------------------------------------------------------------------------}
function TWin32WidgetSet.GetScrollBarVisible(Handle: HWND; SBStyle: Integer): boolean;
var
Style: PtrInt;
begin
Result := False;
Style := GetWindowLong(Handle, GWL_STYLE);
case SBStyle of
SB_HORZ: Result := ((Style and WS_HSCROLL) <> 0);
SB_VERT: Result := ((Style and WS_VSCROLL) <> 0);
SB_BOTH: Result := ((Style and (WS_VSCROLL or WS_HSCROLL)) <> 0);
else
Result := False;
end;//case
end;
{------------------------------------------------------------------------------
Method: GetScrollInfo
Params: Handle - handle of window with scroll bar
@ -2472,6 +2496,7 @@ begin
Result := Windows.IsIconic(handle);
end;
{------------------------------------------------------------------------------
Function: IntersectClipRect
Params: dc, Left, Top, Right, Bottom

View File

@ -116,6 +116,7 @@ function GetParent(Handle: HWND): HWND; override;
function GetProp(Handle: HWND; Str: PChar): Pointer; override;
function GetROP2(DC: HDC): Integer; override;
function GetRGNBox(Rgn: HRGN; lpRect : PRect) : Longint; override;
function GetScrollBarVisible(Handle: HWND; SBStyle: Integer): boolean; override;
function GetScrollInfo(Handle: HWND; BarFlag: Integer; Var ScrollInfo: TScrollInfo): Boolean; override;
function GetStockObject(Value: Integer): THandle; override;
function GetSysColor(NIndex: Integer): DWORD; override;