using System.Runtime.InteropServices;
namespace Ramitta.Utils
{
public class Win32
{
[StructLayout(LayoutKind.Sequential)]
public struct POINT
{
public int X;
public int Y;
public POINT(int x, int y)
{
X = x;
Y = y;
}
}
///
/// 带有外边框和标题的windows的样式
///
public const long WS_CAPTION = 0X00C0000L;
///
/// window的基本样式
///
public static int GWL_STYLE = -16;
///
/// window的扩展样式
///
public static int GWL_EXSTYLE = -20;
public static int WS_EX_LAYERED = 0x00080000;
public static int WS_EX_TRANSPARENT = 0x00000020;
[DllImport("user32.dll", CharSet = CharSet.Auto)]
public static extern bool GetCursorPos(out POINT pt);
[DllImport("user32.dll", CharSet = CharSet.Auto)]
public static extern int GetWindowLong(nint hWnd, int nIndex);
[DllImport("user32.dll", CharSet = CharSet.Auto)]
public static extern int SetWindowLong(nint hWnd, int nIndex, int newVal);
[DllImport("gdi32")]
public static extern int DeleteObject(nint obj);
}
}