Ejemplo n.º 1
0
 /// <inheritdoc/>
 BOOL IMsoComponentManager.FContinueIdle()
 {
     // If we have a message on queue, then don't continue idle processing.
     NativeMethods.MSG msg = new NativeMethods.MSG();
     return(!UnsafeNativeMethods.PeekMessage(ref msg, NativeMethods.NullHandleRef, 0, 0, NativeMethods.PM_NOREMOVE)
         ? BOOL.TRUE : BOOL.FALSE);
 }
Ejemplo n.º 2
0
        bool UnsafeNativeMethods.IMsoComponent.FPreTranslateMessage(ref NativeMethods.MSG msg)
        {
            UnsafeNativeMethods.IMsoComponent c = Component;

            if (c != null)
            {
                return(c.FPreTranslateMessage(ref msg));
            }

            return(false);
        }
Ejemplo n.º 3
0
        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));
        }
Ejemplo n.º 4
0
        void Dispose(bool disposing)
        {
            if (picture != null)
            {
                picture = null;

                // If we have no message loop, OLE may block on this call.
                // Let pent up SendMessage calls go through here.
                //
                NativeMethods.MSG msg = new NativeMethods.MSG();
                UnsafeNativeMethods.PeekMessage(ref msg, NativeMethods.NullHandleRef, 0, 0, NativeMethods.PM_NOREMOVE | NativeMethods.PM_NOYIELD);
            }

            if (handle != IntPtr.Zero)
            {
                DestroyHandle();
                handle = IntPtr.Zero;
            }
        }
Ejemplo n.º 5
0
        /// <include file='doc\WebBrowserSiteBase.uex' path='docs/doc[@for="WebBrowserSiteBase.UnsafeNativeMethods.IOleControlSite.TranslateAccelerator"]/*' />
        /// <internalonly/>
        int UnsafeNativeMethods.IOleControlSite.TranslateAccelerator(ref NativeMethods.MSG pMsg, int grfModifiers)
        {
            Debug.Assert(!this.Host.GetAXHostState(WebBrowserHelper.siteProcessedInputKey), "Re-entering UnsafeNativeMethods.IOleControlSite.TranslateAccelerator!!!");
            this.Host.SetAXHostState(WebBrowserHelper.siteProcessedInputKey, true);

            Message msg = new Message();

            msg.Msg    = pMsg.message;
            msg.WParam = pMsg.wParam;
            msg.LParam = pMsg.lParam;
            msg.HWnd   = pMsg.hwnd;

            try {
                bool f = ((Control)this.Host).PreProcessControlMessage(ref msg) == PreProcessControlState.MessageProcessed;
                return(f ? NativeMethods.S_OK : NativeMethods.S_FALSE);
            }
            finally {
                this.Host.SetAXHostState(WebBrowserHelper.siteProcessedInputKey, false);
            }
        }
Ejemplo n.º 6
0
 int UnsafeNativeMethods.IOleInPlaceFrame.TranslateAccelerator(ref NativeMethods.MSG lpmsg, short wID)
 {
     return(NativeMethods.S_FALSE);
 }
Ejemplo n.º 7
0
 public static extern bool IsAccelerator(HandleRef hAccel, int cAccelEntries, [In] ref NativeMethods.MSG lpMsg, short[] lpwCmd);