/// <devdoc> /// Forces a repaint of the updown control if it is displayed. /// </devdoc> /// <internalonly/> private void UpdateUpDown() { // The upDown control doesn't repaint correctly. // if (ShowUpDown) { EnumChildren c = new EnumChildren(); NativeMethods.EnumChildrenCallback cb = new NativeMethods.EnumChildrenCallback(c.enumChildren); UnsafeNativeMethods.EnumChildWindows(new HandleRef(this, Handle), cb, NativeMethods.NullHandleRef); if (c.hwndFound != IntPtr.Zero) { SafeNativeMethods.InvalidateRect(new HandleRef(c, c.hwndFound), null, true); SafeNativeMethods.UpdateWindow(new HandleRef(c, c.hwndFound)); } } }
public static extern bool EnumChildWindows(HandleRef hwndParent, NativeMethods.EnumChildrenCallback lpEnumFunc, HandleRef lParam);