Ejemplo n.º 1
0
 private void addWindow(ApplicationWindow win)
 {
     if (!Windows.Contains(win))
     {
         Windows.Add(win);
     }
 }
Ejemplo n.º 2
0
 private void addWindow(ApplicationWindow win)
 {
     if (win.ShowInTaskbar && !Windows.Contains(win))
     {
         Windows.Add(win);
     }
 }
Ejemplo n.º 3
0
        private void getInitialWindows()
        {
            EnumWindows((hwnd, lParam) =>
            {
                ApplicationWindow win = new ApplicationWindow(this, hwnd);

                if (win.CanAddToTaskbar && win.ShowInTaskbar && !Windows.Contains(win))
                {
                    Windows.Add(win);

                    sendTaskbarButtonCreatedMessage(win.Handle);
                }

                return(true);
            }, 0);

            IntPtr hWndForeground = GetForegroundWindow();

            if (Windows.Any(i => i.Handle == hWndForeground && i.ShowInTaskbar))
            {
                ApplicationWindow win = Windows.First(wnd => wnd.Handle == hWndForeground);
                win.State = ApplicationWindow.WindowState.Active;
                win.SetShowInTaskbar();
            }
        }
Ejemplo n.º 4
0
        private void initialize()
        {
            IsStarting = true;

            try
            {
                CairoLogger.Instance.Debug("Starting WindowsTasksService");

                // create window to receive task events
                _HookWin = new NativeWindowEx();
                _HookWin.CreateHandle(new CreateParams());

                // prevent other shells from working properly
                SetTaskmanWindow(_HookWin.Handle);

                // register to receive task events
                RegisterShellHookWindow(_HookWin.Handle);
                WM_SHELLHOOKMESSAGE         = RegisterWindowMessage("SHELLHOOK");
                WM_TASKBARCREATEDMESSAGE    = RegisterWindowMessage("TaskbarCreated");
                TASKBARBUTTONCREATEDMESSAGE = RegisterWindowMessage("TaskbarButtonCreated");
                _HookWin.MessageReceived   += ShellWinProc;

                // set window for ITaskbarList
                setTaskbarListHwnd();

                // adjust minimize animation
                SetMinimizedMetrics();

                // prepare collections
                groupedWindows = CollectionViewSource.GetDefaultView(Windows);
                groupedWindows.GroupDescriptions.Add(new PropertyGroupDescription("Category"));
                groupedWindows.CollectionChanged += groupedWindows_Changed;
                groupedWindows.Filter             = groupedWindows_Filter;
                var taskbarItemsView = groupedWindows as ICollectionViewLiveShaping;
                taskbarItemsView.IsLiveFiltering = true;
                taskbarItemsView.LiveFilteringProperties.Add("ShowInTaskbar");
                taskbarItemsView.IsLiveGrouping = true;
                taskbarItemsView.LiveGroupingProperties.Add("Category");

                // enumerate windows already opened
                EnumWindows(new CallBackPtr((hwnd, lParam) =>
                {
                    ApplicationWindow win = new ApplicationWindow(hwnd, this);
                    if (win.ShowInTaskbar && !Windows.Contains(win))
                    {
                        Windows.Add(win);
                    }
                    return(true);
                }), 0);

                // register for app grabber changes so that our app association is accurate
                AppGrabber.AppGrabber.Instance.CategoryList.CategoryChanged += CategoryList_CategoryChanged;
            }
            catch (Exception ex)
            {
                CairoLogger.Instance.Info("Unable to start WindowsTasksService: " + ex.Message);
            }

            IsStarting = false;
        }
Ejemplo n.º 5
0
        public static void Close(UISystemScreen screen)
        {
            if (screen == null)
            {
                return;
            }
            if (screen.CurrentState == UISystemScreen.States.Closed || screen.CurrentState == UISystemScreen.States.Closing)
            {
                return;
            }
            switch (screen.Type)
            {
            case UISystemScreen.Types.Window:
                if (Windows.Contains(screen) && screen.NoFootprint)
                {
                    Windows.Remove(screen);
                }
                break;

            case UISystemScreen.Types.Dialog:
                if (Dialogs.Contains(screen))
                {
                    Dialogs.Remove(screen);
                }
                break;

            default:
                throw new System.NotSupportedException(screen.name + " have not supported type!");
            }
            screen.CurrentState = UISystemScreen.States.Closing;
        }
Ejemplo n.º 6
0
        private void getInitialWindows()
        {
            EnumWindows((hwnd, lParam) =>
            {
                ApplicationWindow win = new ApplicationWindow(hwnd);

                // set window category if provided by shell
                win.Category = TaskCategoryProvider?.GetCategory(win);

                if (win.CanAddToTaskbar && win.ShowInTaskbar && !Windows.Contains(win))
                {
                    Windows.Add(win);
                }

                return(true);
            }, 0);

            IntPtr hWndForeground = GetForegroundWindow();

            if (Windows.Any(i => i.Handle == hWndForeground && i.ShowInTaskbar))
            {
                ApplicationWindow win = Windows.First(wnd => wnd.Handle == hWndForeground);
                win.State = ApplicationWindow.WindowState.Active;
                win.SetShowInTaskbar();
            }
        }
Ejemplo n.º 7
0
 /// <summary>
 /// 指定の Window が追加済みではない場合に例外を発生させます。
 /// </summary>
 /// <param name="window">Window。</param>
 void EnsureWindow(Window window)
 {
     if (Desktop != window && !Windows.Contains(window))
     {
         throw new InvalidOperationException(
                   "The specified window could not be found in this screen.");
     }
 }
Ejemplo n.º 8
0
        SimpleViewModelBase GetViewModel <VMType>() where VMType : SimpleViewModelBase
        {
            var viewModel = _viewModelFactory.GetInstance <VMType>();

            if (!Windows.Contains(viewModel))
            {
                Windows.Add(viewModel);
            }
            return(viewModel);
        }
Ejemplo n.º 9
0
        private void WindowClosed(object sender, DocumentClosedEventArgs e)
        {
            Logging.Logger.Info($"Closed window, '{e.Document.Title}', id: '{e.Document.ContentId}'");

            LayoutDocument document = e.Document?.Content as LayoutDocument;

            if (Windows.Contains(document))
            {
                Windows.Remove(document);
            }
        }
Ejemplo n.º 10
0
        public static void Open(UISystemScreen screen)
        {
            if (screen == null || screen == CurrentScreen)
            {
                return;
            }
            if (screen.CurrentState == UISystemScreen.States.Opened || screen.CurrentState == UISystemScreen.States.Opening)
            {
                return;
            }
            switch (screen.Type)
            {
            case UISystemScreen.Types.Window:
                if (screen == CurrentWindow)
                {
                    return;
                }
                for (int i = 0; i < Dialogs.Count; i++)
                {
                    if (!Dialogs[i].PersistendDialog)
                    {
                        Close(Dialogs[i]);
                        i--;
                    }
                }
                Close(CurrentWindow);
                if (Windows.Contains(screen))
                {
                    int index = Windows.FindIndex(window => window == screen);
                    Windows.RemoveFromIndex(index);
                }
                else
                {
                    Windows.Add(screen);
                }
                break;

            case UISystemScreen.Types.Dialog:
                if (screen == CurrentDialog)
                {
                    return;
                }
                if (!Dialogs.Contains(screen))
                {
                    Dialogs.Add(screen);
                }
                screen.transform.SetAsLastSibling();
                break;

            default:
                throw new System.NotSupportedException(screen.name + " have not supported type!");
            }
            screen.CurrentState = UISystemScreen.States.Opening;
        }
Ejemplo n.º 11
0
 private void AddWindow(ConsoleWindow window)
 {
     if (!Windows.Contains(window))
     {
         window.Closed   += Window_Closed;
         window.Closing  += Window_Closing;
         window.Disposed += Window_Disposed;
         WindowList.Add(window);
         AfterAddWindow(window);
     }
 }
Ejemplo n.º 12
0
        SimpleViewModelBase GetViewModel <VMType, ArgsType>(ArgsType args)
            where VMType : SimpleViewModelBase, IArgumentedViewModel <ArgsType>
            where ArgsType : IViewModelArgs
        {
            var viewModel = _viewModelFactory.GetInstance <VMType, ArgsType>(args) as SimpleViewModelBase;

            if (!Windows.Contains(viewModel))
            {
                Windows.Add(viewModel);
            }
            return(viewModel);
        }
Ejemplo n.º 13
0
        private void initialize()
        {
            IsStarting = true;

            try
            {
                CairoLogger.Instance.Debug("Starting WindowsTasksService");

                // create window to receive task events
                _HookWin = new NativeWindowEx();
                _HookWin.CreateHandle(new CreateParams());

                // prevent other shells from working properly
                SetTaskmanWindow(_HookWin.Handle);

                // register to receive task events
                RegisterShellHookWindow(_HookWin.Handle);
                WM_SHELLHOOKMESSAGE       = RegisterWindowMessage("SHELLHOOK");
                _HookWin.MessageReceived += ShellWinProc;

                // adjust minimize animation
                SetMinimizedMetrics();

                // prepare collections
                groupedWindows = CollectionViewSource.GetDefaultView(Windows);
                groupedWindows.GroupDescriptions.Add(new PropertyGroupDescription("Category"));
                groupedWindows.CollectionChanged += groupedWindows_Changed;
                groupedWindows.Filter             = groupedWindows_Filter;
                var taskbarItemsView = groupedWindows as ICollectionViewLiveShaping;
                taskbarItemsView.IsLiveFiltering = true;
                taskbarItemsView.LiveFilteringProperties.Add("ShowInTaskbar");

                // enumerate windows already opened
                EnumWindows(new CallBackPtr((hwnd, lParam) =>
                {
                    ApplicationWindow win = new ApplicationWindow(hwnd, this);
                    if (win.ShowInTaskbar && !Windows.Contains(win))
                    {
                        this.Windows.Add(win);
                    }
                    return(true);
                }), 0);
            }
            catch (Exception ex)
            {
                Debug.Print(ex.Message);
            }

            IsStarting = false;
        }
Ejemplo n.º 14
0
        internal void OnChildrenChanged()
        {
            // Mark the first available window the selected one if there isn't any already and
            // if there are windows available at all
            if (SelectedWindow == null && Windows.Count != 0)
            {
                SelectedWindow = Windows[0];
            }

            // If there is a selected window, but it isn't registered as a child window of this group,
            // try to find a new selected window (or reset to null).
            if (SelectedWindow != null && !Windows.Contains(SelectedWindow))
            {
                SelectedWindow = Windows.Count != 0 ? Windows[0] : null;
            }

            // Eventually update the tab bar visibility
            HasMultipleWindows = Windows.Count > 1;
        }
Ejemplo n.º 15
0
        private void initialize()
        {
            IsStarting = true;

            try
            {
                Trace.WriteLine("Starting WindowsTasksService");

                // create window to receive task events
                _HookWin = new NativeWindowEx();
                _HookWin.CreateHandle(new CreateParams());

                // prevent other shells from working properly
                SetTaskmanWindow(_HookWin.Handle);

                // register to receive task events
                RegisterShellHookWindow(_HookWin.Handle);
                WM_SHELLHOOKMESSAGE       = RegisterWindowMessage("SHELLHOOK");
                _HookWin.MessageReceived += ShellWinProc;

                // adjust minimize animation
                SetMinimizedMetrics();

                // enumerate windows already opened
                EnumWindows(new CallBackPtr((hwnd, lParam) =>
                {
                    ApplicationWindow win = new ApplicationWindow(hwnd, this);
                    if (win.ShowInTaskbar && !Windows.Contains(win))
                    {
                        this.Windows.Add(win);
                    }
                    return(true);
                }), 0);
            }
            catch (Exception ex)
            {
                Debug.Print(ex.Message);
            }

            IsStarting = false;
        }
Ejemplo n.º 16
0
        /// <summary>
        /// 指定の Window を表示します。
        /// </summary>
        /// <param name="window">表示する Window。</param>
        internal void ShowWindow(Window window)
        {
            if (window == null)
            {
                throw new ArgumentNullException("window");
            }

            // 未登録ならば追加します。
            if (!(window is Desktop) && !Windows.Contains(window))
            {
                Windows.Add(window);
            }

            window.Visible = true;

            // アクティブにします。
            if (window.Activatable)
            {
                ActivateWindow(window);
            }
        }
Ejemplo n.º 17
0
        public void Initialize()
        {
            try
            {
                Trace.WriteLine("Starting WindowsTasksService");
                _HookWin = new NativeWindowEx();
                _HookWin.CreateHandle(new CreateParams());

                NativeMethods.SetTaskmanWindow(_HookWin.Handle);
                //'Register to receive shell-related events
                NativeMethods.RegisterShellHookWindow(_HookWin.Handle);

                //'Assume no error occurred
                WM_SHELLHOOKMESSAGE       = NativeMethods.RegisterWindowMessage("SHELLHOOK");
                _HookWin.MessageReceived += ShellWinProc;

                SetMinimizedMetrics();


                //int msg = NativeMethods.RegisterWindowMessage("TaskbarCreated");
                IntPtr ptr = new IntPtr(0xffff);
                //IntPtr hDeskWnd = NativeMethods.GetDesktopWindow();
                //NativeMethods.SendMessageTimeout(ptr, (uint)msg, IntPtr.Zero, IntPtr.Zero, 2, 200, ref ptr);
                //NativeMethods.SendMessageTimeout(hDeskWnd, 0x0400, IntPtr.Zero, IntPtr.Zero, 2, 200, ref hDeskWnd);

                NativeMethods.EnumWindows(new NativeMethods.CallBackPtr((hwnd, lParam) =>
                {
                    ApplicationWindow win = new ApplicationWindow(hwnd, this);
                    if (win.ShowInTaskbar && !Windows.Contains(win))
                    {
                        this.Windows.Add(win);
                    }
                    return(true);
                }), 0);
            }
            catch (Exception ex)
            {
                Debug.Print(ex.Message);
            }
        }
Ejemplo n.º 18
0
        private void initialize()
        {
            try
            {
                CairoLogger.Instance.Debug("Starting WindowsTasksService");

                // create window to receive task events
                _HookWin = new NativeWindowEx();
                _HookWin.CreateHandle(new CreateParams());

                // prevent other shells from working properly
                SetTaskmanWindow(_HookWin.Handle);

                // register to receive task events
                RegisterShellHookWindow(_HookWin.Handle);
                WM_SHELLHOOKMESSAGE         = RegisterWindowMessage("SHELLHOOK");
                WM_TASKBARCREATEDMESSAGE    = RegisterWindowMessage("TaskbarCreated");
                TASKBARBUTTONCREATEDMESSAGE = RegisterWindowMessage("TaskbarButtonCreated");
                _HookWin.MessageReceived   += ShellWinProc;

                if (Interop.Shell.IsWindows8OrBetter)
                {
                    // set event hook for uncloak events
                    uncloakEventProc = UncloakEventCallback;

                    if (uncloakEventHook == IntPtr.Zero)
                    {
                        uncloakEventHook = SetWinEventHook(
                            EVENT_OBJECT_UNCLOAKED,
                            EVENT_OBJECT_UNCLOAKED,
                            IntPtr.Zero,
                            uncloakEventProc,
                            0,
                            0,
                            WINEVENT_OUTOFCONTEXT | WINEVENT_SKIPOWNPROCESS);
                    }
                }

                // set window for ITaskbarList
                setTaskbarListHwnd();

                // adjust minimize animation
                SetMinimizedMetrics();

                // prepare collections
                groupedWindows = CollectionViewSource.GetDefaultView(Windows);
                groupedWindows.GroupDescriptions.Add(new PropertyGroupDescription("Category"));
                groupedWindows.CollectionChanged += groupedWindows_Changed;
                groupedWindows.Filter             = groupedWindows_Filter;

                if (groupedWindows is ICollectionViewLiveShaping taskbarItemsView)
                {
                    taskbarItemsView.IsLiveFiltering = true;
                    taskbarItemsView.LiveFilteringProperties.Add("ShowInTaskbar");
                    taskbarItemsView.IsLiveGrouping = true;
                    taskbarItemsView.LiveGroupingProperties.Add("Category");
                }

                // enumerate windows already opened
                EnumWindows(new CallBackPtr((hwnd, lParam) =>
                {
                    ApplicationWindow win = new ApplicationWindow(hwnd, this);

                    if (win.CanAddToTaskbar && win.ShowInTaskbar && !Windows.Contains(win))
                    {
                        Windows.Add(win);
                    }

                    return(true);
                }), 0);

                // register for app grabber changes so that our app association is accurate
                AppGrabber.AppGrabber.Instance.CategoryList.CategoryChanged += CategoryList_CategoryChanged;
            }
            catch (Exception ex)
            {
                CairoLogger.Instance.Info("Unable to start WindowsTasksService: " + ex.Message);
            }
        }
Ejemplo n.º 19
0
        private void ShellWinProc(Message msg)
        {
            if (msg.Msg == WM_SHELLHOOKMESSAGE)
            {
                try
                {
                    lock (_windowsLock)
                    {
                        switch ((HSHELL)msg.WParam.ToInt32())
                        {
                        case HSHELL.WINDOWCREATED:
                            CairoLogger.Instance.Debug("Created: " + msg.LParam.ToString());
                            if (!Windows.Any(i => i.Handle == msg.LParam))
                            {
                                addWindow(msg.LParam);
                            }
                            else
                            {
                                ApplicationWindow win = Windows.First(wnd => wnd.Handle == msg.LParam);
                                win.UpdateProperties();
                            }
                            break;

                        case HSHELL.WINDOWDESTROYED:
                            CairoLogger.Instance.Debug("Destroyed: " + msg.LParam.ToString());
                            removeWindow(msg.LParam);
                            break;

                        case HSHELL.WINDOWREPLACING:
                            CairoLogger.Instance.Debug("Replacing: " + msg.LParam.ToString());
                            if (Windows.Any(i => i.Handle == msg.LParam))
                            {
                                ApplicationWindow win = Windows.First(wnd => wnd.Handle == msg.LParam);
                                win.State = ApplicationWindow.WindowState.Inactive;
                                win.SetShowInTaskbar();
                            }
                            else
                            {
                                addWindow(msg.LParam);
                            }
                            break;

                        case HSHELL.WINDOWREPLACED:
                            CairoLogger.Instance.Debug("Replaced: " + msg.LParam.ToString());
                            removeWindow(msg.LParam);
                            break;

                        case HSHELL.WINDOWACTIVATED:
                        case HSHELL.RUDEAPPACTIVATED:
                            CairoLogger.Instance.Debug("Activated: " + msg.LParam.ToString());

                            foreach (var aWin in Windows.Where(w => w.State == ApplicationWindow.WindowState.Active))
                            {
                                aWin.State = ApplicationWindow.WindowState.Inactive;
                            }

                            if (msg.LParam != IntPtr.Zero)
                            {
                                ApplicationWindow win = null;

                                if (Windows.Any(i => i.Handle == msg.LParam))
                                {
                                    win       = Windows.First(wnd => wnd.Handle == msg.LParam);
                                    win.State = ApplicationWindow.WindowState.Active;
                                    win.SetShowInTaskbar();
                                }
                                else
                                {
                                    win = addWindow(msg.LParam, ApplicationWindow.WindowState.Active);
                                }

                                if (win != null)
                                {
                                    foreach (ApplicationWindow wind in Windows)
                                    {
                                        if (wind.WinFileName == win.WinFileName)
                                        {
                                            wind.SetShowInTaskbar();
                                        }
                                    }
                                }
                            }
                            break;

                        case HSHELL.FLASH:
                            CairoLogger.Instance.Debug("Flashing window: " + msg.LParam.ToString());
                            if (Windows.Any(i => i.Handle == msg.LParam))
                            {
                                ApplicationWindow win = Windows.First(wnd => wnd.Handle == msg.LParam);
                                win.State = ApplicationWindow.WindowState.Flashing;
                            }
                            else
                            {
                                addWindow(msg.LParam, ApplicationWindow.WindowState.Flashing, true);
                            }
                            break;

                        case HSHELL.ACTIVATESHELLWINDOW:
                            CairoLogger.Instance.Debug("Activate shell window called.");
                            break;

                        case HSHELL.ENDTASK:
                            CairoLogger.Instance.Debug("EndTask called: " + msg.LParam.ToString());
                            removeWindow(msg.LParam);
                            break;

                        case HSHELL.GETMINRECT:
                            CairoLogger.Instance.Debug("GetMinRect called: " + msg.LParam.ToString());
                            SHELLHOOKINFO winHandle = (SHELLHOOKINFO)Marshal.PtrToStructure(msg.LParam, typeof(SHELLHOOKINFO));
                            winHandle.rc = new Interop.NativeMethods.Rect {
                                Bottom = 100, Left = 0, Right = 100, Top = 0
                            };
                            Marshal.StructureToPtr(winHandle, msg.LParam, true);
                            msg.Result = winHandle.hwnd;
                            return;     // return here so the result isnt reset to DefWindowProc

                        case HSHELL.REDRAW:
                            CairoLogger.Instance.Debug("Redraw called: " + msg.LParam.ToString());
                            if (Windows.Any(i => i.Handle == msg.LParam))
                            {
                                ApplicationWindow win = Windows.First(wnd => wnd.Handle == msg.LParam);
                                win.UpdateProperties();

                                foreach (ApplicationWindow wind in Windows)
                                {
                                    if (wind.WinFileName == win.WinFileName)
                                    {
                                        wind.UpdateProperties();
                                    }
                                }
                            }
                            else
                            {
                                addWindow(msg.LParam, ApplicationWindow.WindowState.Inactive, true);
                            }
                            break;

                        // TaskMan needs to return true if we provide our own task manager to prevent explorers.
                        // case HSHELL.TASKMAN:
                        //     SingletonLogger.Instance.Info("TaskMan Message received.");
                        //     break;

                        default:
                            break;
                        }
                    }
                }
                catch (Exception ex)
                {
                    CairoLogger.Instance.Error("Error in ShellWinProc. ", ex);
                    Debugger.Break();
                }
            }
            else if (msg.Msg == WM_TASKBARCREATEDMESSAGE)
            {
                CairoLogger.Instance.Debug("TaskbarCreated received, setting ITaskbarList window");
                setTaskbarListHwnd();
            }
            else
            {
                // Handle ITaskbarList functions, most not implemented yet

                ApplicationWindow win = null;

                switch (msg.Msg)
                {
                case (int)WM.USER + 50:
                    // ActivateTab
                    // Also sends WM_SHELLHOOK message
                    CairoLogger.Instance.Debug("ITaskbarList: ActivateTab HWND:" + msg.LParam);
                    msg.Result = IntPtr.Zero;
                    return;

                case (int)WM.USER + 60:
                    // MarkFullscreenWindow
                    CairoLogger.Instance.Debug("ITaskbarList: MarkFullscreenWindow HWND:" + msg.LParam + " Entering? " + msg.WParam);
                    msg.Result = IntPtr.Zero;
                    return;

                case (int)WM.USER + 64:
                    // SetProgressValue
                    CairoLogger.Instance.Debug("ITaskbarList: SetProgressValue HWND:" + msg.WParam + " Progress: " + msg.LParam);

                    win = new ApplicationWindow(msg.WParam, this);
                    if (Windows.Contains(win))
                    {
                        win = Windows.First(wnd => wnd.Handle == msg.WParam);
                        win.ProgressValue = (int)msg.LParam;
                    }

                    msg.Result = IntPtr.Zero;
                    return;

                case (int)WM.USER + 65:
                    // SetProgressState
                    CairoLogger.Instance.Debug("ITaskbarList: SetProgressState HWND:" + msg.WParam + " Flags: " + msg.LParam);

                    win = new ApplicationWindow(msg.WParam, this);
                    if (Windows.Contains(win))
                    {
                        win = Windows.First(wnd => wnd.Handle == msg.WParam);
                        win.ProgressState = (TBPFLAG)msg.LParam;
                    }

                    msg.Result = IntPtr.Zero;
                    return;

                case (int)WM.USER + 67:
                    // RegisterTab
                    CairoLogger.Instance.Debug("ITaskbarList: RegisterTab MDI HWND:" + msg.LParam + " Tab HWND: " + msg.WParam);
                    msg.Result = IntPtr.Zero;
                    return;

                case (int)WM.USER + 68:
                    // UnregisterTab
                    CairoLogger.Instance.Debug("ITaskbarList: UnregisterTab Tab HWND: " + msg.WParam);
                    msg.Result = IntPtr.Zero;
                    return;

                case (int)WM.USER + 71:
                    // SetTabOrder
                    CairoLogger.Instance.Debug("ITaskbarList: SetTabOrder HWND:" + msg.WParam + " Before HWND: " + msg.LParam);
                    msg.Result = IntPtr.Zero;
                    return;

                case (int)WM.USER + 72:
                    // SetTabActive
                    CairoLogger.Instance.Debug("ITaskbarList: SetTabActive HWND:" + msg.WParam);
                    msg.Result = IntPtr.Zero;
                    return;

                case (int)WM.USER + 75:
                    // Unknown
                    CairoLogger.Instance.Debug("ITaskbarList: Unknown HWND:" + msg.WParam);
                    msg.Result = IntPtr.Zero;
                    return;

                case (int)WM.USER + 76:
                    // ThumbBarAddButtons
                    CairoLogger.Instance.Debug("ITaskbarList: ThumbBarAddButtons HWND:" + msg.WParam);
                    msg.Result = IntPtr.Zero;
                    return;

                case (int)WM.USER + 77:
                    // ThumbBarUpdateButtons
                    CairoLogger.Instance.Debug("ITaskbarList: ThumbBarUpdateButtons HWND:" + msg.WParam);
                    msg.Result = IntPtr.Zero;
                    return;

                case (int)WM.USER + 78:
                    // ThumbBarSetImageList
                    CairoLogger.Instance.Debug("ITaskbarList: ThumbBarSetImageList HWND:" + msg.WParam);
                    msg.Result = IntPtr.Zero;
                    return;

                case (int)WM.USER + 79:
                    // SetOverlayIcon - Icon
                    CairoLogger.Instance.Debug("ITaskbarList: SetOverlayIcon - Icon HWND:" + msg.WParam);
                    msg.Result = IntPtr.Zero;
                    return;

                case (int)WM.USER + 80:
                    // SetThumbnailTooltip
                    CairoLogger.Instance.Debug("ITaskbarList: SetThumbnailTooltip HWND:" + msg.WParam);
                    msg.Result = IntPtr.Zero;
                    return;

                case (int)WM.USER + 81:
                    // SetThumbnailClip
                    CairoLogger.Instance.Debug("ITaskbarList: SetThumbnailClip HWND:" + msg.WParam);
                    msg.Result = IntPtr.Zero;
                    return;

                case (int)WM.USER + 85:
                    // SetOverlayIcon - Description
                    CairoLogger.Instance.Debug("ITaskbarList: SetOverlayIcon - Description HWND:" + msg.WParam);
                    msg.Result = IntPtr.Zero;
                    return;

                case (int)WM.USER + 87:
                    // SetTabProperties
                    CairoLogger.Instance.Debug("ITaskbarList: SetTabProperties HWND:" + msg.WParam);
                    msg.Result = IntPtr.Zero;
                    return;
                }
            }

            msg.Result = DefWindowProc(msg.HWnd, msg.Msg, msg.WParam, msg.LParam);
        }