ComponentFactory.Krypton.Toolkit.KryptonTreeView.InternalTreeView.WndProc C# (CSharp) Method

WndProc() protected method

Process Windows-based messages.
protected WndProc ( Message &m ) : void
m System.Windows.Forms.Message A Windows-based message.
return void
            protected override void WndProc(ref Message m)
            {
                switch (m.Msg)
                {
                    case PI.WM_ERASEBKGND:
                        // Do not draw the background here, always do it in the paint
                        // instead to prevent flicker because of a two stage drawing process
                        break;
                    case PI.WM_PRINTCLIENT:
                    case PI.WM_PAINT:
                        WmPaint(ref m);
                        break;
                    case PI.WM_VSCROLL:
                    case PI.WM_HSCROLL:
                    case PI.WM_MOUSEWHEEL:
                        Invalidate();
                        base.WndProc(ref m);
                        break;
                    case PI.WM_MOUSELEAVE:
                        if (MouseOver)
                        {
                            MouseOver = false;
                            _kryptonTreeView.PerformNeedPaint(true);
                            Invalidate();
                        }
                        base.WndProc(ref m);
                        break;
                    case PI.WM_MOUSEMOVE:
                        if (!MouseOver)
                        {
                            MouseOver = true;
                            _kryptonTreeView.PerformNeedPaint(true);
                            Invalidate();
                        }
                        base.WndProc(ref m);
                        break;
                    default:
                        base.WndProc(ref m);
                        break;
                }
            }