summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/changeinfo/dlgproc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/IcqOscarJ/changeinfo/dlgproc.cpp')
-rw-r--r--protocols/IcqOscarJ/changeinfo/dlgproc.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/protocols/IcqOscarJ/changeinfo/dlgproc.cpp b/protocols/IcqOscarJ/changeinfo/dlgproc.cpp
index 127521eafc..a78fc64016 100644
--- a/protocols/IcqOscarJ/changeinfo/dlgproc.cpp
+++ b/protocols/IcqOscarJ/changeinfo/dlgproc.cpp
@@ -41,19 +41,12 @@ static int DrawTextUtf(HDC hDC, char *text, LPRECT lpRect, UINT uFormat, LPSIZE
{
int res;
- #if defined( _UNICODE )
- WCHAR *tmp = make_unicode_string(text);
- res = DrawTextW(hDC, tmp, -1, lpRect, uFormat);
- if (lpSize)
- GetTextExtentPoint32W(hDC, tmp, strlennull(tmp), lpSize);
- SAFE_FREE((void**)&tmp);
- #else
- // caution, here we change text's contents
- utf8_decode_static(text, (char*)text, strlennull(text) + 1);
- res = DrawTextA(hDC, (char*)text, -1, lpRect, uFormat);
- if (lpSize)
- GetTextExtentPoint32A(hDC, (char*)text, strlennull(text), lpSize);
- #endif
+ WCHAR *tmp = make_unicode_string(text);
+ res = DrawTextW(hDC, tmp, -1, lpRect, uFormat);
+ if (lpSize)
+ GetTextExtentPoint32W(hDC, tmp, strlennull(tmp), lpSize);
+ SAFE_FREE((void**)&tmp);
+
return res;
}