すみません、Delphi ユーザなもんで

procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG;
  var Handled: Boolean);
begin
  if Msg.hwnd = RichEdit1.Handle then
    case Msg.message of
      WM_KEYFIRST..WM_KEYLAST, WM_MOUSEFIRST..WM_MOUSELAST: Handled := true;
    end;
end;