在全英文的XP中,在非unicode的程序中输入的中文会转为“??”。
通过截获WM_IME_COMPOSITION消息得到输入的字符串
ImmGetCompositionStringW得到Unicode
WideCharToMultiByte转换为ANSI
BOOL CchartestDlg::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_IME_COMPOSITION)
{
HIMC hIMC;
HWND hWnd=pMsg->hwnd;
DWORD dwSize;
WCHAR l ...







评论排行榜