imm32: Update CopyCompOffsetIMEtoClient to handle A->W and W->A conversions.

This commit is contained in:
Aric Stewart 2008-09-15 08:50:14 -05:00 committed by Alexandre Julliard
parent d8c91f58e2
commit b17aa7813f
1 changed files with 14 additions and 1 deletions

View File

@ -1132,7 +1132,20 @@ static INT CopyCompClauseIMEtoClient(InputContextData *data, LPBYTE source, INT
static INT CopyCompOffsetIMEtoClient(InputContextData *data, DWORD offset, LPBYTE ssource, BOOL unicode)
{
return offset;
int rc;
if (is_himc_ime_unicode(data) && !unicode)
{
rc = WideCharToMultiByte(CP_ACP, 0, (LPWSTR)ssource, offset, NULL, 0, NULL, NULL);
}
else if (!is_himc_ime_unicode(data) && unicode)
{
rc = MultiByteToWideChar(CP_ACP, 0, (LPSTR)ssource, offset, NULL, 0);
}
else
rc = offset;
return rc;
}
static LONG ImmGetCompositionStringT( HIMC hIMC, DWORD dwIndex, LPVOID lpBuf,