Esempio n. 1
0
        /// <devdoc>
        ///     CreateIC creates a DeviceContext object wrapping an hdc created with the Win32 CreateIC function.
        /// </devdoc>


        public static DeviceContext CreateIC(string driverName, string deviceName, string fileName, HandleRef devMode)
        {
            // Note: All input params can be null but not at the same time.  See MSDN for information.

            IntPtr hdc = IntUnsafeNativeMethods.CreateIC(driverName, deviceName, fileName, devMode);

            return(new DeviceContext(hdc, DeviceContextType.Information));
        }