richedit: Avoid calling ITextHost_TxNotify with EN_MSGFILTER.

The documentation for TxNotify says that it is not called with the
EN_MSGFILTER notification, so I made sure ME_FilterEvent didn't call
this method.
This commit is contained in:
Dylan Smith 2009-03-05 17:06:47 -05:00 committed by Alexandre Julliard
parent 956c296a32
commit bcd8dc93a2
2 changed files with 7 additions and 3 deletions

View File

@ -2018,11 +2018,14 @@ ME_FilterEvent(ME_TextEditor *editor, UINT msg, WPARAM* wParam, LPARAM* lParam)
{
MSGFILTER msgf;
if (!editor->hWnd) return FALSE;
msgf.nmhdr.hwndFrom = editor->hWnd;
msgf.nmhdr.idFrom = GetWindowLongW(editor->hWnd, GWLP_ID);
msgf.nmhdr.code = EN_MSGFILTER;
msgf.msg = msg;
msgf.wParam = *wParam;
msgf.lParam = *lParam;
if (ITextHost_TxNotify(editor->texthost, msgf.nmhdr.code, &msgf) == S_OK)
if (SendMessageW(GetParent(editor->hWnd), WM_NOTIFY, msgf.nmhdr.idFrom, (LPARAM)&msgf))
return FALSE;
*wParam = msgf.wParam;
*lParam = msgf.lParam;

View File

@ -452,8 +452,6 @@ HRESULT WINAPI ITextHostImpl_TxNotify(ITextHost *iface,
HWND parent = GetParent(hwnd);
UINT id = GetWindowLongW(hwnd, GWLP_ID);
/* Note: EN_MSGFILTER is documented as not being sent to TxNotify */
switch (iNotify)
{
case EN_DROPFILES:
@ -492,6 +490,9 @@ HRESULT WINAPI ITextHostImpl_TxNotify(ITextHost *iface,
SendMessageW(parent, WM_COMMAND, MAKEWPARAM(id, iNotify), (LPARAM)hwnd);
break;
case EN_MSGFILTER:
FIXME("EN_MSGFILTER is documented as not being sent to TxNotify\n");
/* fall through */
default:
return E_FAIL;
}