Exemplo n.º 1
0
        private void WmPaint(ref Message m)
        {
            if (base.DropDownStyle == ComboBoxStyle.Simple)
            {
                base.WndProc(ref m);
                return;
            }
            else//if (base.DropDownStyle == ComboBoxStyle.DropDown)
            {
                if (!_bPainting)
                {
                    PAINTSTRUCT ps =
                        new PAINTSTRUCT();

                    _bPainting = true;
                    WinMethod.BeginPaint(m.HWnd, ref ps);

                    RenderComboBox(ref m);

                    WinMethod.EndPaint(m.HWnd, ref ps);
                    _bPainting = false;
                    m.Result   = KnownParam.TRUE;
                }
                else
                {
                    base.WndProc(ref m);
                }
            }
            //else
            //{
            //    base.WndProc(ref m);
            //    RenderComboBox(ref m);
            //}
        }
Exemplo n.º 2
0
 protected override void WndProc(ref Message m)
 {
     switch (m.Msg)
     {
         case WinMsgs.WM_PAINT:
             if (!_bPainting)
             {
                 PAINTSTRUCT ps =
                     new PAINTSTRUCT();
                 _bPainting = true;
                 WinMethod.BeginPaint(m.HWnd, ref ps);
                 DrawUpDownButton();
                 WinMethod.EndPaint(m.HWnd, ref ps);
                 _bPainting = false;
                 m.Result = KnownParam.TRUE;
             }
             else
             {
                 base.WndProc(ref m);
             }
             break;
         default:
             base.WndProc(ref m);
             break;
     }
 }
Exemplo n.º 3
0
 public static extern bool EndPaint(IntPtr hWnd, ref PAINTSTRUCT ps);
Exemplo n.º 4
0
 public static extern IntPtr BeginPaint(IntPtr hWnd, ref PAINTSTRUCT ps);
Exemplo n.º 5
0
        private void WmPaint(ref Message m)
        {

            if (base.DropDownStyle == ComboBoxStyle.Simple)
            {
                base.WndProc(ref m);
                return;
            }
            else//if (base.DropDownStyle == ComboBoxStyle.DropDown)
            {
                if (!_bPainting)
                {
                    PAINTSTRUCT ps =
                        new PAINTSTRUCT();

                    _bPainting = true;
                    WinMethod.BeginPaint(m.HWnd, ref ps);

                    RenderComboBox(ref m);

                    WinMethod.EndPaint(m.HWnd, ref ps);
                    _bPainting = false;
                    m.Result = KnownParam.TRUE;
                }
                else
                {
                    base.WndProc(ref m);
                }
            }
            //else
            //{
            //    base.WndProc(ref m);
            //    RenderComboBox(ref m);
            //}
        }
Exemplo n.º 6
0
 public static extern bool EndPaint(IntPtr hWnd, ref PAINTSTRUCT ps);
Exemplo n.º 7
0
 public static extern IntPtr BeginPaint(IntPtr hWnd, ref PAINTSTRUCT ps);