Esempio n. 1
0
            protected override void WndProc(ref Message m)
            {
                int msg = m.Msg;

                if (msg == 15)
                {
                    if (!_bPainting)
                    {
                        PAINTSTRUCT ps = default(PAINTSTRUCT);
                        _bPainting = true;
                        Win32.BeginPaint(m.HWnd, ref ps);
                        DrawUpDownButton();
                        Win32.EndPaint(m.HWnd, ref ps);
                        _bPainting = false;
                        m.Result   = Win32.TRUE;
                    }
                    else
                    {
                        base.WndProc(ref m);
                    }
                }
                else
                {
                    base.WndProc(ref m);
                }
            }
Esempio n. 2
0
        protected override void WndProc(ref Message m)
        {
            switch (m.Msg)
            {
            case 522:
                break;

            case 15:
                switch (base.DropDownStyle)
                {
                case ComboBoxStyle.DropDown:
                    if (!_BeginPainting)
                    {
                        PAINTSTRUCT ps = default(PAINTSTRUCT);
                        _BeginPainting = true;
                        Win32.BeginPaint(m.HWnd, ref ps);
                        DrawComboBox(ref m);
                        Win32.EndPaint(m.HWnd, ref ps);
                        _BeginPainting = false;
                        m.Result       = Win32.TRUE;
                    }
                    else
                    {
                        base.WndProc(ref m);
                    }
                    break;

                case ComboBoxStyle.DropDownList:
                    base.WndProc(ref m);
                    DrawComboBox(ref m);
                    break;

                default:
                    base.WndProc(ref m);
                    break;
                }
                break;

            default:
                base.WndProc(ref m);
                break;
            }
        }