这个ie浏览器的问题搞了我很久了,主要是退格键的问题
参照的是codeproject上ie toolband 的代码,它也有中文乱码的问题
将原函数 STDMETHODIMP CEditQuote::TranslateAcceleratorIO(LPMSG lpMsg){ TranslateMessage(lpMsg); DispatchMessage(lpMsg);}
CEditQuote::TranslateAcceleratorIO()函数{ if ( ! TranslateMessage(lpMsg)) return S_FALSE;DispatchMessage(lpMsg); return S_OK;}
原因
The TranslateMessage function does not modify the message pointed to by the lpMsg parameter. WM_KEYDOWN and WM_KEYUP combinations produce a WM_CHAR or WM_DEADCHAR message. WM_SYSKEYDOWN and WM_SYSKEYUP combinations produce a WM_SYSCHAR or WM_SYSDEADCHAR message. TranslateMessage produces WM_CHAR messages only for keys that are mapped to ASCII characters by the keyboard driver. If applications process virtual-key messages for some other purpose, they should not call TranslateMessage. For instance, an application should not call TranslateMessage if the TranslateAccelerator function returns a nonzero value. 中文输入是两个WM_CHAR的,我是觉得这里很可能会有些问题,就改动了这里。