<PackageReference Include="System.Drawing.Common" Version="10.0.0-preview.3.25173.2" />

PInvokeCore

static class PInvokeCore

public sealed delegate EnumWindowsCallback : MulticastDelegate

public const int MaxClassName = 256

The maximum length for lpszClassName is 256. If lpszClassName is greater than the maximum length, the RegisterClassEx function will fail.

Read more on https://learn.microsoft.com.

public static BOOL BitBlt<T>(T hdc, int x, int y, int cx, int cy, HDC hdcSrc, int x1, int y1, ROP_CODE rop) where T : IHandle<HDC>

public static BOOL BitBlt<T>(HDC hdc, int x, int y, int cx, int cy, T hdcSrc, int x1, int y1, ROP_CODE rop) where T : IHandle<HDC>

public static HCURSOR CopyCursor<T>(T hImage, int cx, int cy, IMAGE_FLAGS flags = 0) where T : IHandle<HCURSOR>

public static HICON CopyIcon<T>(T hImage, int cx, int cy, IMAGE_FLAGS flags = 0) where T : IHandle<HICON>

public static void DragAcceptFiles<T>(T hWnd, BOOL fAccept) where T : IHandle<HWND>

public static BOOL DrawIcon<T>(HDC hDC, int x, int y, T hIcon) where T : IHandle<HICON>

public static BOOL DrawIconEx<T>(HDC hDC, int xLeft, int yTop, T hIcon, int cxWidth, int cyWidth, DI_FLAGS diFlags = 3) where T : IHandle<HICON>

public static BOOL EnumChildWindows<T>(T hwndParent, EnumChildWindowsCallback callback) where T : IHandle<HWND>

Enumerates all nonchild windows in the current thread.

public static BOOL EnumWindows(EnumWindowsCallback callback)

public static IntPtr GetClassLong(HWND hWnd, GET_CLASS_LONG_INDEX nIndex)

public static BOOL GetClientRect<T>(T hWnd, out RECT lpRect) where T : IHandle<HWND>

public static ICONINFO GetIconInfo<T>(T icon) where T : IHandle<HICON>

public static bool GetObject<T>(HGDIOBJ h, out T object) where T : ValueType modreq(System.Runtime.InteropServices.UnmanagedType)

public static uint GetPaletteEntries(HPALETTE hpal, Span<PALETTEENTRY> entries)

public static HBRUSH GetSysColorBrush(Color systemColor)

public static IntPtr GetWindowLong<T>(T hWnd, WINDOW_LONG_PTR_INDEX nIndex) where T : IHandle<HWND>

Dynamic wrapper for GetWindowLong that works on both 32 and 64 bit.

public static BOOL GetWindowRect<T>(T hWnd, out RECT lpRect) where T : IHandle<HWND>

public static string GetWindowText<T>(T hWnd) where T : IHandle<HWND>

public static int GetWindowTextLength<T>(T hWnd) where T : IHandle<HWND>

public static uint GetWindowThreadProcessId<T>(T hWnd, out uint lpdwProcessId) where T : IHandle<HWND>

public static int MapWindowPoints<TFrom, TTo>(TFrom hWndFrom, TTo hWndTo, ref RECT lpRect) where TFrom : IHandle<HWND> where TTo : IHandle<HWND>

public static int MapWindowPoints<TFrom, TTo>(TFrom hWndFrom, TTo hWndTo, ref Point lpPoint) where TFrom : IHandle<HWND> where TTo : IHandle<HWND>

public static BOOL PeekMessage<T>(MSG* lpMsg, T hWnd, uint wMsgFilterMin, uint wMsgFilterMax, PEEK_MESSAGE_REMOVE_TYPE wRemoveMsg) where T : IHandle<HWND>

public static BOOL PostMessage<T>(T hWnd, MessageId Msg, WPARAM wParam = default, LPARAM lParam = default) where T : IHandle<HWND>

public static HRESULT RegisterDragDrop<T>(T hwnd, Interface pDropTarget) where T : IHandle<HWND>

public static HRESULT RevokeDragDrop<T>(T hwnd) where T : IHandle<HWND>

public static LRESULT SendMessage<T>(T hWnd, MessageId Msg, WPARAM wParam = default, LPARAM lParam = default) where T : IHandle<HWND>

public static LRESULT SendMessage<THwnd, TWParam>(THwnd hWnd, MessageId Msg, TWParam wParam, LPARAM lParam = default) where THwnd : IHandle<HWND> where TWParam : IHandle<HWND>

public static LRESULT SendMessage<T>(T hWnd, MessageId Msg, WPARAM wParam, string lParam) where T : IHandle<HWND>

public static IntPtr SendMessage<THwnd, TLParam>(THwnd hWnd, MessageId Msg, WPARAM wParam, ref TLParam lParam) where THwnd : IHandle<HWND> where TLParam : ValueType modreq(System.Runtime.InteropServices.UnmanagedType)

public static IntPtr SendMessage<THwnd, TWParam, TLParam>(THwnd hWnd, MessageId Msg, ref TWParam wParam, ref TLParam lParam) where THwnd : IHandle<HWND> where TWParam : ValueType modreq(System.Runtime.InteropServices.UnmanagedType) where TLParam : ValueType modreq(System.Runtime.InteropServices.UnmanagedType)

public static IntPtr SetClassLong(HWND hWnd, GET_CLASS_LONG_INDEX nIndex, IntPtr dwNewLong)

public static IntPtr SetWindowLong<T>(T hWnd, WINDOW_LONG_PTR_INDEX nIndex, IntPtr newValue) where T : IHandle<HWND>

public static IntPtr SetWindowLong<THwnd, TNewValue>(THwnd hWnd, WINDOW_LONG_PTR_INDEX nIndex, TNewValue newValue) where THwnd : IHandle<HWND> where TNewValue : IHandle<HWND>

public static IntPtr SetWindowLong<T>(T hWnd, WINDOW_LONG_PTR_INDEX nIndex, WNDPROC dwNewLong) where T : IHandle<HWND>

public static bool SystemParametersInfo(SYSTEM_PARAMETERS_INFO_ACTION uiAction, ref bool value, uint fWinIni = 0)

public static bool SystemParametersInfo(ref HIGHCONTRASTW highContrast)

public static bool SystemParametersInfo(ref NONCLIENTMETRICSW metrics)

public static bool TrySystemParametersInfoForDpi(ref NONCLIENTMETRICSW metrics, uint dpi)

Tries to get system parameter info for the dpi. dpi is ignored if "SystemParametersInfoForDpi()" API is not available on the OS that this application is running.