win32 interface: fixed themed DrawText for UTF8 text (bug #11348)

git-svn-id: trunk@15221 -
This commit is contained in:
vincents 2008-05-23 20:57:11 +00:00
parent 9598e8b7a7
commit 5cc276c316

View File

@ -287,10 +287,21 @@ end;
procedure TWin32ThemeServices.DrawText(DC: HDC; Details: TThemedElementDetails;
const S: String; R: TRect; Flags, Flags2: Cardinal);
{$IFDEF WindowsUnicodeSupport}
var
w: widestring;
{$ENDIF}
begin
if ThemesEnabled then
with Details do
{$IFDEF WindowsUnicodeSupport}
begin
w := UTF8Decode(S);
DrawThemeText(Theme[Element], DC, Part, State, PWideChar(w), Length(w), Flags, Flags2, R);
end
{$ELSE}
DrawThemeText(Theme[Element], DC, Part, State, PWideChar(WideString(S)), Length(S), Flags, Flags2, R)
{$ENDIF}
else
inherited;
end;