[DllImport("gdi32")] public static extern int GetClipBox(HDC hdc, ref User.Struct.RECT lpRect);
public static void SendInput(User.Struct.INPUT input) { User.Struct.INPUT[] inputs = new User.Struct.INPUT[1]; inputs[0] = input; User.SendInput(1, inputs, Marshal.SizeOf(input)); }
public static void KeyboardEvent(User.VK vk) { KeyboardEvent(vk, 0); }
[DllImport("gdi32")] public static extern int SetBoundsRect(HDC hdc, ref User.Struct.RECT lprcBounds, int flags);
[DllImport("gdi32")] public static extern int SetWindowExtEx(HDC hdc, int nX, int nY, ref User.Struct.SIZE lpSize);
[DllImport("gdi32")] public static extern int RectInRegion(HANDLE hRgn, ref User.Struct.RECT lpRect);
[DllImport("gdi32")] public static extern int ScaleWindowExtEx(HDC hdc, int nXnum, int nXdenom, int nYnum, int nYdenom, ref User.Struct.SIZE lpSize);
[DllImport("gdi32")] public static extern int GetTextExtentPoint32(HDC hdc, string lpsz, int cbString, ref User.Struct.SIZE lpSize);
[DllImport("gdi32")] public static extern int GetViewportExtEx(HDC hdc, ref User.Struct.SIZE lpSize);
[DllImport("gdi32")] public static extern int GetRgnBox(HANDLE hRgn, ref User.Struct.RECT lpRect);
[DllImport("gdi32")] public static extern int GetTextExtentExPoint(HDC hdc, string lpszStr, int cchString, int nMaxExtent, ref int lpnFit, int alpDx, ref User.Struct.SIZE lpSize);
[DllImport("gdi32")] public static extern int GetPath(HDC hdc, ref User.Struct.POINT lpPoint, Byte lpTypes, int nSize);
[DllImport("gdi32")] public static extern int GetDCOrgEx(HDC hdc, ref User.Struct.POINT lpPoint);
[DllImport("gdi32")] public static extern int GetCurrentPositionEx(HDC hdc, ref User.Struct.POINT lpPoint);
[DllImport("gdi32")] public static extern int Polygon(HDC hdc, ref User.Struct.POINT lpPoint, int nCount);
[DllImport("gdi32")] public static extern int MoveToEx(HDC hdc, int x, int y, ref User.Struct.POINT lpPoint);
[DllImport("gdi32")] public static extern int PolylineTo(HDC hdc, ref User.Struct.POINT lppt, int cCount);
[DllImport("gdi32")] public static extern int OffsetViewportOrgEx(HDC hdc, int nX, int nY, ref User.Struct.POINT lpPoint);
[DllImport("gdi32")] public static extern int RectVisible(HDC hdc, ref User.Struct.RECT lpRect);
[DllImport("gdi32")] public static extern int PlayEnhMetaFile(HDC hdc, HANDLE hemf, ref User.Struct.RECT lpRect);
[DllImport("gdi32")] public static extern int SetBitmapDimensionEx(HANDLE hbm, int nX, int nY, ref User.Struct.SIZE lpSize);
[DllImport("gdi32")] public static extern int PlgBlt(HWND hdcDest, ref User.Struct.POINT lpPoint, HWND hdcSrc, int nXSrc, int nYSrc, int nWidth, int nHeight, HANDLE hbmMask, int xMask, int yMask);
[DllImport("gdi32")] public static extern int SetBrushOrgEx(HDC hdc, int nXOrg, int nYOrg, ref User.Struct.POINT lppt);
[DllImport("gdi32")] public static extern int PolyBezier(HDC hdc, ref User.Struct.POINT lppt, int cPoints);
[DllImport("gdi32")] public static extern int SetWindowOrgEx(HDC hdc, int nX, int nY, ref User.Struct.POINT lpPoint);
[DllImport("gdi32")] public static extern int PolyDraw(HDC hdc, ref User.Struct.POINT lppt, Byte lpbTypes, int cCount);
public static void SendInput(User.Struct.INPUT[] inputs) { User.SendInput((uint)inputs.Length, inputs, Marshal.SizeOf(inputs[0])); }
[DllImport("gdi32")] public static extern int PolyPolyline(HDC hdc, ref User.Struct.POINT lppt, ref int lpdwPolyPoints, int cCount);
public static void KeyboardEvent(User.VK vk, KB kb) { User.Struct.INPUT input = new User.Struct.INPUT(User.Const.INPUT_KEYBOARD); input.ki.dwExtraInfo = User.GetMessageExtraInfo(); KeyDown(kb); // Key down the actual key-code input.ki.wVk = (ushort)vk; SendInput(input); // Key up the actual key-code input.ki.dwFlags = User.Const.KEYEVENTF_KEYUP; SendInput(input); KeyUp(kb); }
[DllImport("gdi32")] public static extern int GetBrushOrgEx(HWND hdc, ref User.Struct.POINT lpPoint);