示例#1
0
        public static int GetDeviceCaps(DeviceCap cap)
        {
            using (var g = Graphics.FromHwnd(IntPtr.Zero))
            {
                //Console.WriteLine("Graphics.DpiX: " + g.DpiX);
                //Console.WriteLine("Graphics.DpiY: " + g.DpiY);
                //Console.WriteLine();

                //var hdc = new HandleRef(g, g.GetHdc());
                IntPtr hdc    = g.GetHdc();
                int    result = GetDeviceCaps(hdc, (int)cap);
                g.ReleaseHdc();
                return(result);
            }
        }
示例#2
0
 internal static extern int GetDeviceCaps(IntPtr hdc, DeviceCap capindex);
示例#3
0
 private static extern int GetDeviceCaps(IntPtr hdc, DeviceCap nIndex);
示例#4
0
 public static extern int GetDeviceCaps(HandleRef hdc, DeviceCap capability);
示例#5
0
文件: Gdi32.cs 项目: AArnott/pinvoke
 public static extern int GetDeviceCaps(
     User32.SafeDCHandle hdc,
     DeviceCap nIndex);
示例#6
0
 public static extern int GetDeviceCaps(IntPtr hdc, DeviceCap deviceCap);
示例#7
0
 public static extern Int32 GetDeviceCaps(IntPtr hDC, DeviceCap cap);
 public static extern int GetDeviceCaps(SafeDC hdc, DeviceCap nIndex);
示例#9
0
 public static extern int GetDeviceCaps(IntPtr hdc, DeviceCap nIndex);
 private static extern int GetDeviceCaps(IntPtr hdc, DeviceCap nIndex);
 internal static extern int GetDeviceCaps(IntPtr hDc, DeviceCap nIndex);
示例#12
0
 public static extern Int32 GetDeviceCaps(IntPtr hdc, DeviceCap capindex);
 internal static extern int GetDeviceCaps(IntPtr hdc, DeviceCap capindex);
示例#14
0
 public static extern int GetDeviceCaps(
     HandleRef hdc,
     [MarshalAs(UnmanagedType.I4)] DeviceCap nIndex
     );
示例#15
0
 public static extern int GetDeviceCaps(IntPtr hdc, DeviceCap nIndex);
示例#16
0
 public static extern int GetDeviceCaps(HDC hdc, DeviceCap index);
示例#17
0
 public static extern int GetDeviceCaps(SafeDC hdc, DeviceCap nIndex);
示例#18
0
 public static extern int GetDeviceCaps(
     User32.SafeDCHandle hdc,
     DeviceCap nIndex);
示例#19
0
 internal static extern int GetDeviceCaps(IntPtr hDC, DeviceCap cap);