mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 17:39:40 +02:00
win32 interface: menu drawing, only convert from UTF-8 once
git-svn-id: trunk@13297 -
This commit is contained in:
parent
596a4ef548
commit
9d4fd2cb03
@ -472,15 +472,9 @@ begin
|
|||||||
|
|
||||||
{$ifdef WindowsUnicodeSupport}
|
{$ifdef WindowsUnicodeSupport}
|
||||||
if UnicodeEnabledOS then
|
if UnicodeEnabledOS then
|
||||||
begin
|
DrawTextW(aHDC, PWideChar(WideBuffer), length(WideBuffer), @aRect, dtFlags)
|
||||||
WideBuffer := Utf8Decode(aMenuItem.Caption);
|
|
||||||
DrawTextW(aHDC, PWideChar(WideBuffer), length(WideBuffer), @aRect, dtFlags);
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
begin
|
|
||||||
AnsiBuffer := Utf8ToAnsi(aMenuItem.Caption);
|
|
||||||
DrawText(aHDC, pChar(AnsiBuffer), length(AnsiBuffer), @aRect, dtFlags);
|
DrawText(aHDC, pChar(AnsiBuffer), length(AnsiBuffer), @aRect, dtFlags);
|
||||||
end;
|
|
||||||
{$else}
|
{$else}
|
||||||
DrawText(aHDC, pChar(aMenuItem.Caption), length(aMenuItem.Caption), @aRect, dtFlags);
|
DrawText(aHDC, pChar(aMenuItem.Caption), length(aMenuItem.Caption), @aRect, dtFlags);
|
||||||
{$endif}
|
{$endif}
|
||||||
|
Loading…
Reference in New Issue
Block a user