private IntPtr DropDownHook(int code, IntPtr wparam, IntPtr lparam)
{
if (code == NativeMethods.MSGF_MENU)
{
NativeMethods.MSG msg = (NativeMethods.MSG) Marshal.PtrToStructure(lparam, typeof(NativeMethods.MSG));
Message message = Message.Create(msg.hwnd, msg.message, msg.wParam, msg.lParam);
if (this.DropDownFilter(ref message))
{
return (IntPtr)1;
}
}
return NativeMethods.CallNextHookEx(this.hookHandle, code, wparam, lparam);
}