示例#1
0
        IntPtr hookHandle = IntPtr.Zero;                // Pointer to hookProc

        public FlatMenuForm()
        {
            hookProc   = new Win32.HookProc(Hooked);
            subWndProc = new Win32.MyWndProc(SubclassWndProc);
            hookHandle = Win32.SetWindowsHookEx(4, hookProc, IntPtr.Zero,
                                                Win32.GetWindowThreadProcessId(Handle, 0));
        }
示例#2
0
        Win32.MyWndProc subWndProc; // Delegate of type MyWndProc - needed to subclass the window

        #endregion Fields

        #region Constructors

        public FlatMenuForm()
        {
            hookProc = new Win32.HookProc(Hooked);
            subWndProc = new Win32.MyWndProc(SubclassWndProc);
            hookHandle = Win32.SetWindowsHookEx(4, hookProc, IntPtr.Zero,
                Win32.GetWindowThreadProcessId(Handle,0));
        }