重构Win32Natives
This commit is contained in:
29
Win32Natives/Gdi32.cs
Normal file
29
Win32Natives/Gdi32.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace Win32Natives
|
||||
{
|
||||
/// <summary>
|
||||
/// gdi32.dll 包装类
|
||||
/// </summary>
|
||||
public static class Gdi32
|
||||
{
|
||||
[DllImport("gdi32.dll", SetLastError = true)]
|
||||
public static extern IntPtr CreateCompatibleDC(IntPtr hdc);
|
||||
|
||||
[DllImport("gdi32.dll", SetLastError = true)]
|
||||
public static extern bool DeleteDC(IntPtr hdc);
|
||||
|
||||
[DllImport("gdi32.dll", SetLastError = true)]
|
||||
public static extern IntPtr SelectObject(IntPtr hdc, IntPtr hgdiobj);
|
||||
|
||||
[DllImport("gdi32.dll", SetLastError = true)]
|
||||
public static extern bool DeleteObject(IntPtr hObject);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user