Example #1
0
 public static extern IntPtr BeginPaint(IntPtr hWnd, ref PAINTSTRUCT ps);
Example #2
0
 public static extern bool EndPaint(IntPtr hWnd, ref PAINTSTRUCT ps);
Example #3
0
 protected override void WndProc(ref Message m)
 {
     if (m.Msg == 15)
     {
         if (!this._bPainting)
         {
             PAINTSTRUCT ps = new PAINTSTRUCT();
             this._bPainting = true;
             NativeMethods.BeginPaint(m.HWnd, ref ps);
             this.DrawUpDownButton();
             NativeMethods.EndPaint(m.HWnd, ref ps);
             this._bPainting = false;
             m.Result = Result.TRUE;
         }
         else
             base.WndProc(ref m);
     }
     else
         base.WndProc(ref m);
 }