win32: repair focus rectangle for themed windows (bug #0012885)

git-svn-id: trunk@18004 -
This commit is contained in:
paul 2008-12-31 09:06:18 +00:00
parent e600258955
commit c0bf8bbc48

View File

@ -39,7 +39,7 @@ uses
WSControls, WSLCLClasses, SysUtils, Win32Proc, Win32Extra, WSProc,
{ TODO: needs to move }
Forms, ComCtrls, Buttons, StdCtrls, ExtCtrls, GraphMath, GraphType,
InterfaceBase, LCLIntf, LCLType, LCLProc;
InterfaceBase, LCLIntf, LCLType, LCLProc, Themes;
type
{ TWin32WSDragImageList }
@ -247,7 +247,12 @@ begin
lhFont := GetStockObject(DEFAULT_GUI_FONT)
else
lhFont := AWinControl.Font.Reference.Handle;
Windows.SendMessage(Window, WM_SETFONT, WPARAM(lhFont), 0)
Windows.SendMessage(Window, WM_SETFONT, WPARAM(lhFont), 0);
// on themed applications windows for some reason hides focus rectangle if
// hide underlined letters for keyboard navigation setting is on
// read for example here: http://www.icetips.com/showarticle.php?articleid=450
if ThemeServices.ThemesEnabled then
Windows.SendMessage(Window, WM_CHANGEUISTATE, MakeWParam(UIS_CLEAR, UISF_HIDEFOCUS), 0)
end;
end;
end;