public static extern IntPtr BeginPaint(IntPtr hWnd, ref PAINTSTRUCT ps);
public static extern bool EndPaint(IntPtr hWnd, ref PAINTSTRUCT ps);
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); }