public void GetWindowDeviceContext_NullWindow() { // Null here should be the entire screen DeviceContext context = GdiMethods.GetWindowDeviceContext(WindowHandle.Null); context.IsInvalid.Should().BeFalse(); int pixelWidth = GdiMethods.GetDeviceCapability(context, DeviceCapability.HORZRES); int pixelHeight = GdiMethods.GetDeviceCapability(context, DeviceCapability.VERTRES); }
public static DeviceContext GetWindowDeviceContext(this WindowHandle window) => GdiMethods.GetWindowDeviceContext(window);