示例#1
0
        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 int GetDeviceCapability(this DeviceContext deviceContext, DeviceCapability capability)
 => GdiMethods.GetDeviceCapability(deviceContext, capability);