mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-10 22:19:19 +02:00
Implements WinCE runtime scrollbar showing/hiding. Fixes bug #14548
git-svn-id: trunk@25726 -
This commit is contained in:
parent
8c5e3652bc
commit
e9b50741dd
@ -3144,6 +3144,7 @@ function TWinCEWidgetSet.ShowCaret(hWnd: HWND): Boolean;
|
||||
begin
|
||||
Result := Boolean(Windows.ShowCaret(HWnd));
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: ShowScrollBar
|
||||
Params: Handle - handle of window with scroll bar
|
||||
@ -3153,11 +3154,33 @@ end;
|
||||
|
||||
Shows or hides the specified scroll bar.
|
||||
------------------------------------------------------------------------------}
|
||||
{function TWinCEWidgetSet.ShowScrollBar(Handle: HWND; wBar: Integer;
|
||||
function TWinCEWidgetSet.ShowScrollBar(Handle: HWND; wBar: Integer;
|
||||
bShow: Boolean): Boolean;
|
||||
var
|
||||
dwStyle: DWORD;
|
||||
begin
|
||||
Result:=inherited ShowScrollBar(Handle, wBar, bShow);
|
||||
end;}
|
||||
Result := True;
|
||||
dwStyle := GetWindowLong(Handle, GWL_STYLE);
|
||||
case wBar of
|
||||
SB_BOTH:
|
||||
if bShow then
|
||||
SetWindowLong(Handle, GWL_STYLE, dwStyle or WS_VSCROLL or WS_HSCROLL)
|
||||
else
|
||||
SetWindowLong(Handle, GWL_STYLE, (dwStyle and not WS_VSCROLL) and not WS_HSCROLL);
|
||||
SB_VERT:
|
||||
if bShow then
|
||||
SetWindowLong(Handle, GWL_STYLE, dwStyle or WS_VSCROLL)
|
||||
else
|
||||
SetWindowLong(Handle, GWL_STYLE, dwStyle and not WS_VSCROLL);
|
||||
SB_HORZ:
|
||||
if bShow then
|
||||
SetWindowLong(Handle, GWL_STYLE, dwStyle or WS_HSCROLL)
|
||||
else
|
||||
SetWindowLong(Handle, GWL_STYLE, dwStyle and not WS_HSCROLL);
|
||||
else
|
||||
Result := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: ShowWindow
|
||||
|
@ -221,7 +221,7 @@ function SetWindowOrgEx(dc : hdc; NewX, NewY : Integer; OldPoint: PPoint) : Bool
|
||||
function SetWindowPos(hWnd: HWND; hWndInsertAfter: HWND;
|
||||
X, Y, cx, cy: Integer; uFlags: UINT): Boolean; override;
|
||||
function ShowCaret(hWnd: HWND): Boolean; override;
|
||||
{function ShowScrollBar(Handle: HWND; wBar: Integer; bShow: Boolean): Boolean; override;}
|
||||
function ShowScrollBar(Handle: HWND; wBar: Integer; bShow: Boolean): Boolean; override;
|
||||
function ShowWindow(hWnd: HWND; nCmdShow: Integer): Boolean; override;
|
||||
function StretchBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc, SrcWidth, SrcHeight: Integer; ROp: Cardinal): Boolean; override;
|
||||
function StretchMaskBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc, SrcWidth, SrcHeight: Integer; Mask: HBITMAP; XMask, YMask: Integer; Rop: DWORD): Boolean; override;
|
||||
|
Loading…
Reference in New Issue
Block a user