예제 #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);
        }
예제 #2
0
 public static DeviceContext GetWindowDeviceContext(this WindowHandle window) => GdiMethods.GetWindowDeviceContext(window);