Beispiel #1
0
        private void WmPaint(ref Message m)
        {
            if (base.DropDownStyle == ComboBoxStyle.Simple)
            {
                base.WndProc(ref m);
                return;
            }

            if (base.DropDownStyle == ComboBoxStyle.DropDown)
            {
                if (!_bPainting)
                {
                    Win32.Struct.PAINTSTRUCT ps =
                        new Win32.Struct.PAINTSTRUCT();

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

                    RenderComboBox(ref m);

                    Win32.NativeMethods.EndPaint(m.HWnd, ref ps);
                    _bPainting = false;
                    m.Result   = Win32.Result.TRUE;
                }
                else
                {
                    base.WndProc(ref m);
                }
            }
            else
            {
                base.WndProc(ref m);
                RenderComboBox(ref m);
            }
        }
Beispiel #2
0
 private void WmPaint(ref Message m)
 {
     if (base.DropDownStyle == ComboBoxStyle.Simple)
     {
         base.WndProc(ref m);
     }
     else if (base.DropDownStyle == ComboBoxStyle.DropDown)
     {
         if (!this._bPainting)
         {
             Win32.Struct.PAINTSTRUCT ps = new Win32.Struct.PAINTSTRUCT();
             this._bPainting = true;
             Win32.NativeMethods.BeginPaint(m.HWnd, ref ps);
             this.RenderComboBox(ref m);
             Win32.NativeMethods.EndPaint(m.HWnd, ref ps);
             this._bPainting = false;
             m.Result = Win32.Result.TRUE;
         }
         else
         {
             base.WndProc(ref m);
         }
     }
     else
     {
         base.WndProc(ref m);
         this.RenderComboBox(ref m);
     }
 }
Beispiel #3
0
 public static extern IntPtr BeginPaint(IntPtr hWnd, ref PAINTSTRUCT ps);
Beispiel #4
0
 public static extern bool EndPaint(IntPtr hWnd, ref PAINTSTRUCT ps);