From d0551f076047875bf9c303aff723f5ac83618f3e Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Thu, 2 Jun 2005 22:09:06 +0000 Subject: [PATCH] convert info strings to UTF-16 svn path=/trunk/; revision=15740 --- reactos/subsys/system/winefile/winefile.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/reactos/subsys/system/winefile/winefile.c b/reactos/subsys/system/winefile/winefile.c index 9c2ad9758f9..a698bc2579e 100644 --- a/reactos/subsys/system/winefile/winefile.c +++ b/reactos/subsys/system/winefile/winefile.c @@ -1847,15 +1847,23 @@ static void CheckForFileInfo(struct PropertiesDialog* dlg, HWND hwnd, LPCTSTR st for(p=InfoStrings; *p; ++p) { TCHAR subblock[200]; +#ifdef UNICODE + TCHAR infoStr[100]; +#endif LPCTSTR pTxt; UINT nValLen; LPCSTR pInfoString = *p; - wsprintf(subblock, sStringFileInfo, pTranslate->wLanguage, pTranslate->wCodePage, pInfoString); +#ifdef UNICODE + MultiByteToWideChar(CP_ACP, 0, pInfoString, -1, infoStr, 100); +#else +#define infoStr pInfoString +#endif + wsprintf(subblock, sStringFileInfo, pTranslate->wLanguage, pTranslate->wCodePage, infoStr); /* Retrieve file description for language and code page */ if (VerQueryValue(dlg->pVersionData, subblock, (PVOID)&pTxt, &nValLen)) { - int idx = ListBox_AddString(hlbox, pInfoString); + int idx = ListBox_AddString(hlbox, infoStr); ListBox_SetItemData(hlbox, idx, pTxt); } }