![]() |
Sylloge
A C# helper library
|
00001 using System; 00002 using System.Collections.Generic; 00003 using System.Linq; 00004 using System.Runtime.InteropServices; 00005 using System.Text; 00006 00007 namespace Sylloge 00008 { 00009 public static partial class WinAPI 00010 { 00011 public static class GDI 00012 { 00013 #region GDI+ 00014 00015 [DllImport("gdi32.dll")] 00016 public static extern IntPtr AddFontMemResourceEx(IntPtr pbFont, 00017 uint cbFont, 00018 IntPtr pdv, 00019 [In] ref uint pcFonts); 00020 00021 [DllImport("gdi32.dll")] 00022 public static extern bool RemoveFontMemResourceEx(IntPtr handler); 00023 00024 [DllImport("gdi32.dll", ExactSpelling = true)] 00025 public static extern IntPtr SelectObject(IntPtr hDC, IntPtr hObj); 00026 00027 [DllImport("gdi32.dll", ExactSpelling = true, SetLastError = true)] 00028 public static extern int DeleteDC(IntPtr hDC); 00029 00030 [DllImport("gdi32.dll", ExactSpelling = true, SetLastError = true)] 00031 public static extern int DeleteObject(IntPtr hObj); 00032 00033 [DllImport("gdi32.dll", ExactSpelling = true, SetLastError = true)] 00034 public static extern IntPtr ExtCreateRegion(IntPtr lpXform, uint nCount, IntPtr rgnData); 00035 00036 [DllImport("gdi32.dll", ExactSpelling = true, SetLastError = true)] 00037 public static extern IntPtr CreateCompatibleDC(IntPtr hDC); 00038 00039 [DllImport("Gdi32.dll")] 00040 public static extern bool BitBlt(IntPtr hObject, 00041 int nXDest, 00042 int nYDest, 00043 int nWidth, 00044 int nHeight, 00045 IntPtr hObjectSource, 00046 int nXSrc, 00047 int nYSrc, 00048 int dwRop); 00049 [DllImport("Gdi32.dll")] 00050 public static extern IntPtr CreateCompatibleBitmap(IntPtr hDC, int nWidth, int nHeight); 00051 00052 [DllImport("gdi32.dll")] 00053 public static extern int GetDeviceCaps(IntPtr hdc, int nIndex); 00054 00055 #endregion 00056 } 00057 } 00058 }
1.7.4