1 interface inheriting from IHandle
System.Private.Windows.GdiPlus (1)
System\Drawing\IIcon.cs (1)
6
internal interface IIcon :
IHandle
<HICON>
22 implementations of IHandle
System.Private.Windows.Core (7)
Windows\Win32\Foundation\HandleRef.cs (1)
22
internal readonly struct HandleRef<THandle> :
IHandle
<THandle>, IEquatable<HandleRef<THandle>>
Windows\Win32\Foundation\HWND.cs (1)
6
internal partial struct HWND :
IHandle
<HWND>
Windows\Win32\Foundation\NullHandle.cs (1)
6
internal class NullHandle<T> :
IHandle
<T> where T : unmanaged
Windows\Win32\Graphics\Gdi\HDC.cs (1)
6
internal readonly partial struct HDC :
IHandle
<HDC>
Windows\Win32\Graphics\Gdi\HdcHandle.cs (1)
10
internal sealed class HdcHandle : IDisposable,
IHandle
<HDC>
Windows\Win32\UI\WindowsAndMessaging\HCURSOR.cs (1)
6
internal unsafe partial struct HCURSOR :
IHandle
<HCURSOR>
Windows\Win32\UI\WindowsAndMessaging\HICON.cs (1)
6
internal unsafe partial struct HICON :
IHandle
<HICON>
System.Windows.Forms (13)
System\Windows\Forms\Application.ThreadContext.cs (1)
19
internal abstract unsafe partial class ThreadContext : MarshalByRefObject,
IHandle
<HANDLE>
System\Windows\Forms\Control.cs (1)
48
IHandle
<HWND>
System\Windows\Forms\Controls\ImageList\ImageList.cs (1)
24
public sealed partial class ImageList : Component,
IHandle
<HIMAGELIST>
System\Windows\Forms\Controls\ImageList\ImageList.NativeImageList.cs (1)
11
internal sealed class NativeImageList : IDisposable,
IHandle
<HIMAGELIST>
System\Windows\Forms\Controls\ToolStrips\CachedItemHdcInfo.cs (1)
8
internal class CachedItemHdcInfo : IDisposable,
IHandle
<HDC>
System\Windows\Forms\ErrorProvider\ErrorProvider.IconRegion.cs (1)
13
internal class IconRegion :
IHandle
<HICON>
System\Windows\Forms\Input\Cursor.cs (3)
20
public sealed class Cursor : IDisposable, ISerializable,
IHandle
<HICON>,
IHandle
<HANDLE>,
IHandle
<HCURSOR>
System\Windows\Forms\NativeWindow.cs (1)
14
public unsafe partial class NativeWindow : MarshalByRefObject, IWin32Window,
IHandle
<HWND>
System\Windows\Forms\ToolTip\ToolTip.cs (1)
17
public partial class ToolTip : Component, IExtenderProvider,
IHandle
<HWND>
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (2)
13
public sealed class VisualStyleRenderer :
IHandle
<HTHEME>
872
private class ThemeHandle : IDisposable,
IHandle
<HTHEME>
System.Windows.Forms.Primitives (1)
System\Windows\Forms\Message.cs (1)
11
public struct Message : IEquatable<Message>,
IHandle
<HWND>
System.Windows.Forms.Primitives.TestUtilities (1)
Win32\Window.cs (1)
8
internal class Window : IDisposable,
IHandle
<HWND>
162 references to IHandle
System.Private.Windows.Core (47)
Windows\Win32\Foundation\HandleRef.cs (2)
10
/// Adapter to use when owning classes cannot directly implement <see cref="
IHandle
{T}"/>.
36
public HandleRef(
IHandle
<THandle>? handle)
Windows\Win32\Foundation\HWND.cs (2)
8
HWND
IHandle
<HWND>.Handle => this;
9
object?
IHandle
<HWND>.Wrapper => null;
Windows\Win32\Foundation\IHandle.cs (3)
24
/// <see cref="
IHandle
{THandle}"/>, but should take a generic "T" that is constrained to IHandle{T}. Doing
39
/// <see cref="
IHandle
{THandle}"/> implementer.
44
/// <see cref="
IHandle
{THandle}"/> is on a struct. See <see cref="HandleRef{THandle}"/> for a concrete usage.
Windows\Win32\Graphics\Gdi\HDC.cs (2)
8
HDC
IHandle
<HDC>.Handle => this;
9
object?
IHandle
<HDC>.Wrapper => null;
Windows\Win32\PInvokeCore.BitBlt.cs (2)
18
ROP_CODE rop) where T :
IHandle
<HDC>
44
ROP_CODE rop) where T :
IHandle
<HDC>
Windows\Win32\PInvokeCore.CallWindowProc.cs (1)
9
where T :
IHandle
<HWND>
Windows\Win32\PInvokeCore.CopyImage.cs (2)
10
where T :
IHandle
<HICON>
19
where T :
IHandle
<HCURSOR>
Windows\Win32\PInvokeCore.DragAcceptFiles.cs (1)
9
public static void DragAcceptFiles<T>(T hWnd, BOOL fAccept) where T :
IHandle
<HWND>
Windows\Win32\PInvokeCore.DrawIcon.cs (1)
9
where T :
IHandle
<HICON>
Windows\Win32\PInvokeCore.DrawIconEx.cs (1)
17
where T :
IHandle
<HICON>
Windows\Win32\PInvokeCore.EnumChildWindows.cs (1)
14
where T :
IHandle
<HWND>
Windows\Win32\PInvokeCore.GetClientRect.cs (1)
10
where T :
IHandle
<HWND>
Windows\Win32\PInvokeCore.GetIconInfo.cs (1)
10
where T :
IHandle
<HICON>
Windows\Win32\PInvokeCore.GetWindowLong.cs (1)
28
where T :
IHandle
<HWND>
Windows\Win32\PInvokeCore.GetWindowRect.cs (1)
9
public static BOOL GetWindowRect<T>(T hWnd, out RECT lpRect) where T :
IHandle
<HWND>
Windows\Win32\PInvokeCore.GetWindowText.cs (1)
15
public static unsafe string GetWindowText<T>(T hWnd) where T :
IHandle
<HWND>
Windows\Win32\PInvokeCore.GetWindowTextLength.cs (1)
9
public static int GetWindowTextLength<T>(T hWnd) where T :
IHandle
<HWND>
Windows\Win32\PInvokeCore.GetWindowThreadProcessId.cs (1)
10
where T :
IHandle
<HWND>
Windows\Win32\PInvokeCore.MapWindowPoints.cs (4)
12
where TFrom :
IHandle
<HWND>
13
where TTo :
IHandle
<HWND>
26
where TFrom :
IHandle
<HWND>
27
where TTo :
IHandle
<HWND>
Windows\Win32\PInvokeCore.PeekMessage.cs (1)
15
where T :
IHandle
<HWND>
Windows\Win32\PInvokeCore.PostMessage.cs (1)
14
where T :
IHandle
<HWND>
Windows\Win32\PInvokeCore.RegisterDragDrop.cs (1)
12
where T :
IHandle
<HWND>
Windows\Win32\PInvokeCore.RevokeDragDrop.cs (1)
9
public static HRESULT RevokeDragDrop<T>(T hwnd) where T :
IHandle
<HWND>
Windows\Win32\PInvokeCore.SendMessage.cs (6)
13
LPARAM lParam = default) where T :
IHandle
<HWND>
25
LPARAM lParam = default) where THwnd :
IHandle
<HWND> where TWParam :
IHandle
<HWND>
37
string? lParam) where T :
IHandle
<HWND>
51
where THwnd :
IHandle
<HWND>
66
where THwnd :
IHandle
<HWND>
Windows\Win32\PInvokeCore.SetWindowLong.cs (4)
17
where T :
IHandle
<HWND>
27
where THwnd :
IHandle
<HWND>
28
where TNewValue :
IHandle
<HWND>
36
where T :
IHandle
<HWND>
Windows\Win32\UI\WindowsAndMessaging\HCURSOR.cs (2)
8
HCURSOR
IHandle
<HCURSOR>.Handle => this;
9
object?
IHandle
<HCURSOR>.Wrapper => null;
Windows\Win32\UI\WindowsAndMessaging\HICON.cs (2)
8
HICON
IHandle
<HICON>.Handle => this;
9
object?
IHandle
<HICON>.Wrapper => null;
System.Private.Windows.GdiPlus (1)
Windows\Win32\Graphics\Gdi\HdcExtensions.cs (1)
20
where T :
IHandle
<HDC>
System.Windows.Forms (25)
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (1)
25
private readonly
IHandle
<HWND> _owningChildEdit;
System\Windows\Forms\Application.cs (2)
1131
internal static unsafe ThreadContext GetContextForHandle<T>(T handle) where T :
IHandle
<HWND>
1236
internal static void UnparkHandle(
IHandle
<HWND> handle, DPI_AWARENESS_CONTEXT context)
System\Windows\Forms\Application.ParkingWindow.cs (3)
107
internal void ParkHandle<T>(T handle) where T :
IHandle
<HWND>
114
PInvoke.SetParent(handle, (
IHandle
<HWND>)this);
120
internal void UnparkHandle<T>(T handle) where T :
IHandle
<HWND>
System\Windows\Forms\Application.ThreadContext.cs (1)
521
HANDLE
IHandle
<HANDLE>.Handle => Handle;
System\Windows\Forms\Control.cs (1)
12935
HWND
IHandle
<HWND>.Handle => HWND;
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (1)
28
private readonly
IHandle
<HWND> _owningChildEdit;
System\Windows\Forms\Controls\ImageList\ImageList.cs (1)
759
HIMAGELIST
IHandle
<HIMAGELIST>.Handle => HIMAGELIST;
System\Windows\Forms\Controls\ImageList\ImageList.NativeImageList.cs (1)
62
HIMAGELIST
IHandle
<HIMAGELIST>.Handle => HIMAGELIST;
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (4)
496
private static bool IsChildOrSameWindow<T>(in T hwndParent, in T hwndChild) where T :
IHandle
<HWND>
580
if (!IsChildOrSameWindow<
IHandle
<HWND>>(activeToolStripHandle, m))
585
if (toplevelToolStrip is not null && IsChildOrSameWindow<
IHandle
<HWND>>(toplevelToolStrip, m))
594
else if (!IsChildOrSameWindow<
IHandle
<HWND>>(ActiveHwnd, m))
System\Windows\Forms\Form.cs (2)
2004
private
IHandle
<HWND> TaskbarOwner
6107
IHandle
<HWND> ownerHwnd = NullHandle<HWND>.Instance;
System\Windows\Forms\Input\Cursor.cs (3)
214
HICON
IHandle
<HICON>.Handle => (HICON)Handle;
216
HANDLE
IHandle
<HANDLE>.Handle => (HANDLE)Handle;
217
HCURSOR
IHandle
<HCURSOR>.Handle => _handle;
System\Windows\Forms\NativeWindow.cs (2)
155
HWND
IHandle
<HWND>.Handle => HWND;
278
internal static short CreateWindowId(
IHandle
<HWND> handle)
System\Windows\Forms\StringSource.cs (1)
40
public bool Bind(
IHandle
<HWND> edit, AUTOCOMPLETEOPTIONS options)
System\Windows\Forms\ToolTip\ToolTip.cs (1)
257
HWND
IHandle
<HWND>.Handle => HWND;
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (1)
179
HTHEME
IHandle
<HTHEME>.Handle => (HTHEME)Handle;
System.Windows.Forms.Primitives (85)
System\Windows\Forms\Automation\UiaTextProvider.cs (2)
75
public static WINDOW_EX_STYLE GetWindowExStyle(
IHandle
<HWND> hWnd) =>
78
public static WINDOW_STYLE GetWindowStyle(
IHandle
<HWND> hWnd) =>
System\Windows\Forms\Message.cs (1)
82
readonly HWND
IHandle
<HWND>.Handle => HWND;
Windows\Win32\PInvoke.ChildWindowFromPointEx.cs (1)
12
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.ClientToScreen.cs (1)
12
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.CloseHandle.cs (1)
9
public static BOOL CloseHandle<T>(T handle) where T :
IHandle
<HANDLE>
Windows\Win32\PInvoke.DestroyAcceleratorTable.cs (1)
10
where T :
IHandle
<HACCEL>
Windows\Win32\PInvoke.DrawMenuBar.cs (1)
10
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.EnableMenuItem.cs (1)
10
where T :
IHandle
<HMENU>
Windows\Win32\PInvoke.EnableScrollBar.cs (1)
10
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.EnableWindow.cs (1)
10
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.EndDialog.cs (1)
10
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.FillRect.cs (1)
10
where T :
IHandle
<HDC>
Windows\Win32\PInvoke.GetAncestor.cs (1)
9
public static HWND GetAncestor<T>(T hwnd, GET_ANCESTOR_FLAGS flags) where T :
IHandle
<HWND>
Windows\Win32\PInvoke.GetDlgItem.cs (1)
10
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.GetDpiForWindow.cs (1)
9
public static uint GetDpiForWindow<T>(T hwnd) where T :
IHandle
<HWND>
Windows\Win32\PInvoke.GetMenu.cs (1)
10
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.GetMenuItemCount.cs (1)
10
where T :
IHandle
<HMENU>
Windows\Win32\PInvoke.GetParent.cs (1)
9
public static HWND GetParent<T>(T hwnd) where T :
IHandle
<HWND>
Windows\Win32\PInvoke.GetScrollInfo.cs (1)
10
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.GetSystemMenu.cs (1)
9
public static HMENU GetSystemMenu<T>(T hwnd, BOOL bRevert) where T :
IHandle
<HWND>
Windows\Win32\PInvoke.GetTextExtentPoint32.cs (1)
11
public static unsafe BOOL GetTextExtentPoint32W<T>(T hdc, string lpString, int c, Size size) where T :
IHandle
<HDC>
Windows\Win32\PInvoke.GetThemeFont.cs (1)
12
where T :
IHandle
<HTHEME>
Windows\Win32\PInvoke.GetWindow.cs (1)
9
public static HWND GetWindow<T>(T hWnd, GET_WINDOW_CMD uCmd) where T :
IHandle
<HWND>
Windows\Win32\PInvoke.HtmlHelp.cs (3)
12
where T :
IHandle
<HWND>
21
where T :
IHandle
<HWND>
37
where TCaller :
IHandle
<HWND>
Windows\Win32\PInvoke.ImageList.cs (15)
13
public static int Add<T>(T himl, HBITMAP hbmImage, HBITMAP hbmMask) where T :
IHandle
<HIMAGELIST>
21
public static bool Destroy<T>(T himl) where T :
IHandle
<HIMAGELIST>
30
where T :
IHandle
<HIMAGELIST>
48
IMAGE_LIST_DRAW_STYLE fStyle) where THIML :
IHandle
<HIMAGELIST> where THDC :
IHandle
<HDC>
57
public static bool GetIconSize<T>(T himl, out int x, out int y) where T :
IHandle
<HIMAGELIST>
69
public static int GetImageCount<T>(T himl) where T :
IHandle
<HIMAGELIST>
77
public static bool GetImageInfo<T>(T himl, int i, out IMAGEINFO pImageInfo) where T :
IHandle
<HIMAGELIST>
85
public static bool Remove<T>(T himl, int i) where T :
IHandle
<HIMAGELIST>
93
public static bool Replace<T>(T himl, int i, HBITMAP hbmImage, HBITMAP hbmMask) where T :
IHandle
<HIMAGELIST>
104
THICON hicon) where THIML :
IHandle
<HIMAGELIST> where THICON :
IHandle
<HICON>
113
public static COLORREF SetBkColor<T>(T himl, COLORREF clrBk) where T :
IHandle
<HIMAGELIST>
121
public static BOOL Write<T>(T himl, Stream pstm) where T :
IHandle
<HIMAGELIST>
133
Stream pstm) where T :
IHandle
<HIMAGELIST>
Windows\Win32\PInvoke.ImmGetContext.cs (1)
11
public static HIMC ImmGetContext<T>(T hWnd) where T :
IHandle
<HWND>
Windows\Win32\PInvoke.ImmReleaseContext.cs (1)
11
public static BOOL ImmReleaseContext<T>(T hWnd, HIMC hIMC) where T :
IHandle
<HWND>
Windows\Win32\PInvoke.IntersectClipRect.cs (1)
9
public static GDI_REGION_TYPE IntersectClipRect<T>(T hdc, int left, int top, int right, int bottom) where T :
IHandle
<HDC>
Windows\Win32\PInvoke.InvalidateRect.cs (1)
10
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.InvalidateRgn.cs (1)
10
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.IsAccelerator.cs (1)
10
where T :
IHandle
<HACCEL>
Windows\Win32\PInvoke.IsChild.cs (2)
10
where TParent :
IHandle
<HWND>
11
where TChild :
IHandle
<HWND>
Windows\Win32\PInvoke.IsWindow.cs (1)
9
public static BOOL IsWindow<T>(T hWnd) where T :
IHandle
<HWND>
Windows\Win32\PInvoke.IsWindowEnabled.cs (1)
9
public static BOOL IsWindowEnabled<T>(T hWnd) where T :
IHandle
<HWND>
Windows\Win32\PInvoke.IsWindowVisible.cs (1)
9
public static BOOL IsWindowVisible<T>(T hWnd) where T :
IHandle
<HWND>
Windows\Win32\PInvoke.KillTimer.cs (1)
10
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.NotifyWinEvent.cs (1)
10
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.RedrawWindow.cs (1)
10
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.ScreenToClient.cs (1)
12
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.ScrollWindow.cs (1)
10
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.ScrollWindowEx.cs (1)
17
SCROLL_WINDOW_FLAGS flags) where T :
IHandle
<HWND>
Windows\Win32\PInvoke.SendMessageCallback.cs (1)
17
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.SetActiveWindow.cs (1)
9
public static HWND SetActiveWindow<T>(T hWnd) where T :
IHandle
<HWND>
Windows\Win32\PInvoke.SetCapture.cs (1)
9
public static IntPtr SetCapture<T>(T hWnd) where T :
IHandle
<HWND>
Windows\Win32\PInvoke.SetFocus.cs (1)
9
public static HWND SetFocus<T>(T hWnd) where T :
IHandle
<HWND>
Windows\Win32\PInvoke.SetForegroundWindow.cs (1)
9
public static BOOL SetForegroundWindow<T>(T hWnd) where T :
IHandle
<HWND>
Windows\Win32\PInvoke.SetLayeredWindowAttributes.cs (1)
10
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.SetMenu.cs (3)
10
where T :
IHandle
<HWND>
19
where T1 :
IHandle
<HWND>
20
where T2 :
IHandle
<HMENU>
Windows\Win32\PInvoke.SetParent.cs (2)
10
where TChild :
IHandle
<HWND>
11
where TParent :
IHandle
<HWND>
Windows\Win32\PInvoke.SetScrollInfo.cs (1)
10
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.SetScrollPos.cs (1)
10
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.SetTimer.cs (1)
9
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.SetWindowPos.cs (2)
10
where T1 :
IHandle
<HWND>
11
where T2 :
IHandle
<HWND>
Windows\Win32\PInvoke.SetWindowRgn.cs (1)
10
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.SetWindowText.cs (1)
9
public static BOOL SetWindowText<T>(T hWnd, string text) where T :
IHandle
<HWND>
Windows\Win32\PInvoke.SHAutoComplete.cs (1)
9
public static HRESULT SHAutoComplete<T>(T hwndEdit, SHELL_AUTOCOMPLETE_FLAGS flags) where T :
IHandle
<HWND>
Windows\Win32\PInvoke.ShowWindow.cs (1)
9
public static BOOL ShowWindow<T>(T hWnd, SHOW_WINDOW_CMD nCmdShow) where T :
IHandle
<HWND>
Windows\Win32\PInvoke.UiaHostProviderFromHwnd.cs (1)
11
public static unsafe HRESULT UiaHostProviderFromHwnd<T>(T hwnd, out IRawElementProviderSimple* ppProvider) where T :
IHandle
<HWND>
Windows\Win32\PInvoke.UiaReturnRawElementProvider.cs (1)
16
where T :
IHandle
<HWND>
Windows\Win32\PInvoke.UpdateWindow.cs (1)
9
public static BOOL UpdateWindow<T>(T hWnd) where T :
IHandle
<HWND>
Windows\Win32\PInvoke.ValidateRect.cs (1)
10
where T :
IHandle
<HWND>
Windows\Win32\UI\Controls\ToolInfoWrapper.cs (2)
7
where T :
IHandle
<HWND>
36
public LRESULT SendMessage(
IHandle
<HWND> sender, MessageId message, bool state = false)
System.Windows.Forms.Tests (4)
System\Windows\Forms\ComboBox.ComboBoxUiaTextProviderTests.cs (4)
1117
int actualValue = (int)PInvokeCore.SendMessage((
IHandle
<HWND>)comboBox.TestAccessor().Dynamic._childEdit, PInvokeCore.EM_GETFIRSTVISIBLELINE);
1131
int actualValue = (int)PInvokeCore.SendMessage((
IHandle
<HWND>)comboBox.TestAccessor().Dynamic._childEdit, PInvokeCore.EM_GETLINECOUNT);
1157
int expectedLine = (int)PInvokeCore.SendMessage((
IHandle
<HWND>)comboBox.TestAccessor().Dynamic._childEdit, PInvokeCore.EM_LINEFROMCHAR, (WPARAM)charIndex);
1178
bool expectedValue = PInvokeCore.SendMessage((
IHandle
<HWND>)comboBox.TestAccessor().Dynamic._childEdit, PInvokeCore.EM_LINESCROLL, 0, newLine) != 0;