mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-26 21:00:34 +02:00
win32: fix focus rect drawing on TBitBtn on Vista/w7
git-svn-id: trunk@20668 -
This commit is contained in:
parent
08d373cf9c
commit
57446cdb93
@ -1055,14 +1055,14 @@ var
|
||||
ShowFocus: Boolean;
|
||||
begin
|
||||
case DrawInfo^.dwDrawStage of
|
||||
CDDS_PREPAINT:
|
||||
CDDS_PREPAINT, CDDS_POSTPAINT:
|
||||
begin
|
||||
lmNotify.Result := CDRF_DODEFAULT;
|
||||
lmNotify.Result := CDRF_DODEFAULT or CDRF_NOTIFYPOSTPAINT;
|
||||
WinProcess := False;
|
||||
if ABitBtn.Focused then
|
||||
begin
|
||||
if WindowsVersion >= wv2000 then
|
||||
ShowFocus := (SendMessage(ABitBtn.Handle, WM_QUERYUISTATE, 0, 0) and UISF_HIDEFOCUS) = 0
|
||||
ShowFocus := (Windows.SendMessage(ABitBtn.Handle, WM_QUERYUISTATE, 0, 0) and UISF_HIDEFOCUS) = 0
|
||||
else
|
||||
ShowFocus := True;
|
||||
if ShowFocus then
|
||||
@ -1070,7 +1070,7 @@ var
|
||||
ARect := DrawInfo^.rc;
|
||||
InflateRect(ARect, -3, -3);
|
||||
if not IsRectEmpty(ARect) then
|
||||
DrawFocusRect(DrawInfo^.hdc, ARect);
|
||||
Windows.DrawFocusRect(DrawInfo^.hdc, ARect);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user