Flip A<->W conversion in dispinfo_notifyT.
This commit is contained in:
parent
5a64f285f2
commit
83ff80b295
|
@ -365,8 +365,8 @@ static BOOL dispinfo_notifyT(HWND self, INT notificationCode, LPNMLVDISPINFOW pd
|
||||||
if (notificationCode != LVN_GETDISPINFOW)
|
if (notificationCode != LVN_GETDISPINFOW)
|
||||||
{ /* length of existing text */
|
{ /* length of existing text */
|
||||||
cchTempBufMax = convertToUnicode ?
|
cchTempBufMax = convertToUnicode ?
|
||||||
WideCharToMultiByte(CP_ACP, 0, pdi->item.pszText, -1, NULL, 0, NULL, NULL) :
|
MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pdi->item.pszText, -1, NULL, 0):
|
||||||
MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pdi->item.pszText, -1, NULL, 0);
|
WideCharToMultiByte(CP_ACP, 0, pdi->item.pszText, -1, NULL, 0, NULL, NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
cchTempBufMax = pdi->item.cchTextMax;
|
cchTempBufMax = pdi->item.cchTextMax;
|
||||||
|
@ -375,11 +375,11 @@ static BOOL dispinfo_notifyT(HWND self, INT notificationCode, LPNMLVDISPINFOW pd
|
||||||
(convertToUnicode ? sizeof(WCHAR) : sizeof(CHAR)) * cchTempBufMax);
|
(convertToUnicode ? sizeof(WCHAR) : sizeof(CHAR)) * cchTempBufMax);
|
||||||
if (!pszTempBuf) return FALSE;
|
if (!pszTempBuf) return FALSE;
|
||||||
if (convertToUnicode)
|
if (convertToUnicode)
|
||||||
WideCharToMultiByte(CP_ACP, 0, pdi->item.pszText, -1, (LPSTR) pszTempBuf,
|
|
||||||
cchTempBufMax, NULL, NULL);
|
|
||||||
else
|
|
||||||
MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pdi->item.pszText, -1,
|
MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pdi->item.pszText, -1,
|
||||||
pszTempBuf, cchTempBufMax);
|
pszTempBuf, cchTempBufMax);
|
||||||
|
else
|
||||||
|
WideCharToMultiByte(CP_ACP, 0, pdi->item.pszText, -1, (LPSTR) pszTempBuf,
|
||||||
|
cchTempBufMax, NULL, NULL);
|
||||||
TRACE(" text=%s\n", debugstr_t(pszTempBuf, convertToUnicode));
|
TRACE(" text=%s\n", debugstr_t(pszTempBuf, convertToUnicode));
|
||||||
savCchTextMax = pdi->item.cchTextMax;
|
savCchTextMax = pdi->item.cchTextMax;
|
||||||
savPszText = pdi->item.pszText;
|
savPszText = pdi->item.pszText;
|
||||||
|
|
Loading…
Reference in New Issue