Inheritance: System.EventArgs
Beispiel #1
0
        // handles the hook event
        private void WndProcRetHookInvoked(object sender, HookEventArgs e)
        {
            WndProcRetEventArgs wpe = new WndProcRetEventArgs(e.wParam, e.lParam);

            if ((hWndHooked == IntPtr.Zero || wpe.cw.hwnd == hWndHooked) && WndProcRet != null)
            {
                WndProcRet(this, wpe);
            }
            return;
        }
Beispiel #2
0
        public void WndProcRet(object sender, WndProcRetEventArgs e)
        {
            if (e.cw.message == WndMessage.WM_INITDIALOG ||
                e.cw.message == WndMessage.WM_UNKNOWINIT)
            {
                USER32.MoveWindow(e.cw.hwnd, rect.Left, rect.Top, rect.Width, rect.Height, 1);

                // uninstall this hook
                WindowsHook wndHook = (WindowsHook)sender;
                Debug.Assert(wndProcRetHook == wndHook);
                wndProcRetHook.Uninstall();
                wndProcRetHook = null;
            }
        }
Beispiel #3
0
 // handles the hook event
 private void WndProcRetHookInvoked(object sender, HookEventArgs e)
 {
     WndProcRetEventArgs wpe = new WndProcRetEventArgs(e.wParam, e.lParam);
     if ((hWndHooked == IntPtr.Zero || wpe.cw.hwnd == hWndHooked) && WndProcRet != null)
         WndProcRet(this, wpe);
     return;
 }