public void GetSystemColorBrush() { // System color brushes are special- they'll always give the same value BrushHandle brush = GdiMethods.GetSystemColorBrush(SystemColor.MenuBar); long handle = (long)brush.DangerousGetHandle(); handle = handle & 0xFFFF00; // This changed in RS4 from C5 to BF for the last byte. Checking the first // bytes to make sure we're in the right ballpark. handle.Should().Be(0x100000); }
public static BrushHandle GetSystemColorBrush(SystemColor systemColor) => GdiMethods.GetSystemColorBrush(systemColor);