155 references to HWND
System.Private.Windows.Core (87)
System\Private\Windows\Ole\DragDropHelper.cs (2)
44
public static void DragEnter(
HWND
targetWindowHandle, IDragEvent e)
59
public static void DragEnter(
HWND
targetWindowHandle, IComVisibleDataObject dataObject, ref Point point, DROPEFFECT effect)
Windows\Win32\Foundation\HWND.cs (4)
6
internal partial struct HWND : IHandle<
HWND
>
8
HWND
IHandle<
HWND
>.Handle => this;
9
object? IHandle<
HWND
>.Wrapper => null;
Windows\Win32\Foundation\LPARAM.cs (3)
22
public static explicit operator
HWND
(LPARAM value) => (
HWND
)value.Value;
24
public static unsafe explicit operator LPARAM(
HWND
value) => (LPARAM)value.Value;
Windows\Win32\Foundation\LRESULT.cs (2)
12
public static explicit operator
HWND
(LRESULT value) => (
HWND
)value.Value;
Windows\Win32\Foundation\WPARAM.cs (3)
13
public static explicit operator
HWND
(WPARAM value) => (
HWND
)(nint)value.Value;
14
public static explicit operator WPARAM(
HWND
value) => new((nuint)value.Value);
Windows\Win32\Graphics\Gdi\BeginPaintScope.cs (3)
9
/// Helper to scope lifetime of an HDC retrieved via <see cref="PInvokeCore.BeginPaint(
HWND
, out PAINTSTRUCT)"/>
26
public
HWND
HWND { get; }
29
public BeginPaintScope(
HWND
hwnd)
Windows\Win32\Graphics\Gdi\GetDcScope.cs (6)
7
/// Helper to scope lifetime of an <see cref="Gdi.HDC"/> retrieved via <see cref="PInvokeCore.GetDC(
HWND
)"/> and
8
/// <see cref="PInvokeCore.GetDCEx(
HWND
, HRGN, GET_DCX_FLAGS)"/>. Releases the <see cref="Gdi.HDC"/> (if any)
20
public
HWND
HWND { get; }
22
public GetDcScope(
HWND
hwnd)
29
/// Creates a <see cref="Gdi.HDC"/> using <see cref="PInvokeCore.GetDCEx(
HWND
, HRGN, GET_DCX_FLAGS)"/>.
40
public GetDcScope(
HWND
hwnd, HRGN hrgnClip, GET_DCX_FLAGS flags)
Windows\Win32\PInvokeCore.CallWindowProc.cs (2)
9
where T : IHandle<
HWND
>
12
(delegate* unmanaged[Stdcall]<
HWND
, uint, WPARAM, LPARAM, LRESULT>)lpPrevWndFunc,
Windows\Win32\PInvokeCore.DragAcceptFiles.cs (2)
8
/// <inheritdoc cref="DragAcceptFiles(
HWND
, BOOL)"/>
9
public static void DragAcceptFiles<T>(T hWnd, BOOL fAccept) where T : IHandle<
HWND
>
Windows\Win32\PInvokeCore.EnumChildWindows.cs (3)
11
public delegate BOOL EnumChildWindowsCallback(
HWND
hWnd);
14
where T : IHandle<
HWND
>
32
private static BOOL EnumChildWindowsNativeCallback(
HWND
hWnd, LPARAM lParam)
Windows\Win32\PInvokeCore.EnumThreadWindows.cs (2)
11
public delegate BOOL EnumThreadWindowsCallback(
HWND
hWnd);
33
private static BOOL HandleEnumThreadWindowsNativeCallback(
HWND
hWnd, LPARAM lParam)
Windows\Win32\PInvokeCore.EnumWindows.cs (2)
11
public delegate BOOL EnumWindowsCallback(
HWND
hWnd);
30
private static BOOL EnumWindowsNativeCallback(
HWND
hWnd, LPARAM lParam)
Windows\Win32\PInvokeCore.GetClassLong.cs (3)
13
private static extern nint GetClassLongW(
HWND
hWnd, GET_CLASS_LONG_INDEX nIndex);
17
private static extern nint GetClassLongPtrW(
HWND
hWnd, GET_CLASS_LONG_INDEX nIndex);
19
public static IntPtr GetClassLong(
HWND
hWnd, GET_CLASS_LONG_INDEX nIndex)
Windows\Win32\PInvokeCore.GetClientRect.cs (2)
8
/// <inheritdoc cref="GetClientRect(
HWND
, out RECT)"/>
10
where T : IHandle<
HWND
>
Windows\Win32\PInvokeCore.GetWindowLong.cs (3)
11
private static extern nint GetWindowLongW(
HWND
hWnd, WINDOW_LONG_PTR_INDEX nIndex);
14
private static extern nint GetWindowLongPtrW(
HWND
hWnd, WINDOW_LONG_PTR_INDEX nIndex);
28
where T : IHandle<
HWND
>
Windows\Win32\PInvokeCore.GetWindowRect.cs (2)
8
/// <inheritdoc cref="GetWindowRect(
HWND
, out RECT)"/>
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 (2)
8
/// <inheritdoc cref="GetWindowTextLength(
HWND
)"/>
9
public static int GetWindowTextLength<T>(T hWnd) where T : IHandle<
HWND
>
Windows\Win32\PInvokeCore.GetWindowThreadProcessId.cs (2)
8
/// <inheritdoc cref="GetWindowThreadProcessId(
HWND
, uint*)"/>
10
where T : IHandle<
HWND
>
Windows\Win32\PInvokeCore.MapWindowPoints.cs (8)
10
/// <inheritdoc cref="MapWindowPoints(
HWND
,
HWND
, Point*, uint)"/>
12
where TFrom : IHandle<
HWND
>
13
where TTo : IHandle<
HWND
>
24
/// <inheritdoc cref="MapWindowPoints(
HWND
,
HWND
, Point*, uint)"/>
26
where TFrom : IHandle<
HWND
>
27
where TTo : IHandle<
HWND
>
Windows\Win32\PInvokeCore.PeekMessage.cs (2)
8
/// <inheritdoc cref="PeekMessage(MSG*,
HWND
, uint, uint, PEEK_MESSAGE_REMOVE_TYPE)"/>
15
where T : IHandle<
HWND
>
Windows\Win32\PInvokeCore.PostMessage.cs (2)
8
/// <inheritdoc cref="PostMessage(
HWND
, uint, WPARAM, LPARAM)"/>
14
where T : IHandle<
HWND
>
Windows\Win32\PInvokeCore.RegisterDragDrop.cs (2)
10
/// <inheritdoc cref="RegisterDragDrop(
HWND
, IDropTarget*)"/>
12
where T : IHandle<
HWND
>
Windows\Win32\PInvokeCore.RevokeDragDrop.cs (2)
8
/// <inheritdoc cref="RevokeDragDrop(
HWND
)"/>
9
public static HRESULT RevokeDragDrop<T>(T hwnd) where T : IHandle<
HWND
>
Windows\Win32\PInvokeCore.SendMessage.cs (11)
8
/// <inheritdoc cref="SendMessage(
HWND
, uint, WPARAM, LPARAM)"/>
13
LPARAM lParam = default) where T : IHandle<
HWND
>
20
/// <inheritdoc cref="SendMessage(
HWND
, uint, WPARAM, LPARAM)"/>
25
LPARAM lParam = default) where THwnd : IHandle<
HWND
> where TWParam : IHandle<
HWND
>
32
/// <inheritdoc cref="SendMessage(
HWND
, uint, WPARAM, LPARAM)"/>
37
string? lParam) where T : IHandle<
HWND
>
45
/// <inheritdoc cref="SendMessage(
HWND
, uint, WPARAM, LPARAM)"/>
51
where THwnd : IHandle<
HWND
>
60
/// <inheritdoc cref="SendMessage(
HWND
, uint, WPARAM, LPARAM)"/>
66
where THwnd : IHandle<
HWND
>
Windows\Win32\PInvokeCore.SetClassLong.cs (3)
12
private static extern nint SetClassLongW(
HWND
hwnd, GET_CLASS_LONG_INDEX nIndex, nint dwNewLong);
15
private static extern nint SetClassLongPtrW(
HWND
hwnd, GET_CLASS_LONG_INDEX nIndex, nint dwNewLong);
17
public static nint SetClassLong(
HWND
hWnd, GET_CLASS_LONG_INDEX nIndex, nint dwNewLong)
Windows\Win32\PInvokeCore.SetWindowLong.cs (6)
11
private static extern nint SetWindowLongW(
HWND
hWnd, WINDOW_LONG_PTR_INDEX nIndex, nint dwNewLong);
14
private static extern nint SetWindowLongPtrW(
HWND
hWnd, WINDOW_LONG_PTR_INDEX nIndex, nint dwNewLong);
17
where T : IHandle<
HWND
>
27
where THwnd : IHandle<
HWND
>
28
where TNewValue : IHandle<
HWND
>
36
where T : IHandle<
HWND
>
Windows\Win32\UI\Controls\Dialogs\PRINTDLGEXW.cs (1)
52
public
HWND
hwndOwner;
Windows\Win32\UI\WindowsAndMessaging\WNDPROC.cs (1)
6
internal delegate LRESULT WNDPROC(
HWND
hWnd, uint msg, WPARAM wParam, LPARAM lParam);
System.Private.Windows.GdiPlus (1)
Windows\Win32\Graphics\GdiPlus\GpRegionExtensions.cs (1)
20
/// Creates a native region from a GDI+ <see cref="GpRegion"/> and <see cref="
HWND
"/>.
System.Windows.Forms (8)
System\Windows\Forms\Accessibility\AccessibleObject.cs (1)
2512
/// <inheritdoc cref="IOleWindow.GetWindow(
HWND
*)"/>
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (2)
332
/// <inheritdoc cref="IOleObject.DoVerb(int, MSG*, IOleClientSite*, int,
HWND
, RECT*)"/>
747
/// <inheritdoc cref="IOleWindow.GetWindow(
HWND
*)"/>
System\Windows\Forms\ActiveX\Control_ActiveXControlInterfaces.cs (4)
83
/// <inheritdoc cref="IOleWindow.GetWindow(
HWND
*)"/>
116
/// <inheritdoc cref="IOleWindow.GetWindow(
HWND
*)"/>
205
/// <inheritdoc cref="IOleObject.DoVerb(int, MSG*, IOleClientSite*, int,
HWND
, RECT*)"/>
347
/// <inheritdoc cref="IOleWindow.GetWindow(
HWND
*)"/>
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.GridEntryAccessibleObject.cs (1)
201
/// they don't have windows - we use <see cref="
HWND
" /> of <see cref="PropertyGridView" />.
System.Windows.Forms.IntegrationTests.Common (3)
TestHelpers.cs (3)
436
HWND
mainWindowHandle = (
HWND
)process.MainWindowHandle;
443
HWND
foregroundWindow = PInvokeCore.GetForegroundWindow();
System.Windows.Forms.Primitives (56)
Microsoft\VisualStudio\Shell\IProvidePropertyBuilder.cs (1)
92
/// browser and are invoked through <see cref="ExecuteBuilder(int, BSTR*, IDispatch*,
HWND
, VARIANT*, VARIANT_BOOL*)"/>
Windows\Win32\PInvoke.ChildWindowFromPointEx.cs (1)
10
/// <inheritdoc cref="ChildWindowFromPointEx(
HWND
, Point, CWP_FLAGS)"/>
Windows\Win32\PInvoke.ClientToScreen.cs (1)
10
/// <inheritdoc cref="ClientToScreen(
HWND
, ref Point)"/>
Windows\Win32\PInvoke.CreateWindowEx.cs (1)
11
/// <inheritdoc cref="CreateWindowEx(WINDOW_EX_STYLE, string, string, WINDOW_STYLE, int, int, int, int,
HWND
, HMENU, HINSTANCE, void*)"/>
Windows\Win32\PInvoke.DrawMenuBar.cs (1)
8
/// <inheritdoc cref="DrawMenuBar(
HWND
)"/>
Windows\Win32\PInvoke.EnableScrollBar.cs (1)
8
/// <inheritdoc cref="EnableScrollBar(
HWND
, uint, ENABLE_SCROLL_BAR_ARROWS)"/>
Windows\Win32\PInvoke.EnableWindow.cs (1)
8
/// <inheritdoc cref="EnableWindow(
HWND
, BOOL)"/>
Windows\Win32\PInvoke.EndDialog.cs (1)
8
/// <inheritdoc cref="EndDialog(
HWND
, nint)"/>
Windows\Win32\PInvoke.GetAncestor.cs (1)
8
/// <inheritdoc cref="GetAncestor(
HWND
, GET_ANCESTOR_FLAGS)"/>
Windows\Win32\PInvoke.GetDlgItem.cs (1)
8
/// <inheritdoc cref="GetDlgItem(
HWND
, int)"/>
Windows\Win32\PInvoke.GetDpiForWindow.cs (1)
8
/// <inheritdoc cref="GetDpiForWindow(
HWND
)"/>
Windows\Win32\PInvoke.GetMenu.cs (1)
8
/// <inheritdoc cref="GetMenu(
HWND
)"/>
Windows\Win32\PInvoke.GetParent.cs (1)
8
/// <inheritdoc cref="GetParent(
HWND
)"/>
Windows\Win32\PInvoke.GetScrollInfo.cs (1)
8
/// <inheritdoc cref="GetScrollInfo(
HWND
, SCROLLBAR_CONSTANTS, ref SCROLLINFO)"/>
Windows\Win32\PInvoke.GetSystemMenu.cs (1)
8
/// <inheritdoc cref="GetSystemMenu(
HWND
, BOOL)"/>
Windows\Win32\PInvoke.GetWindow.cs (1)
8
/// <inheritdoc cref="GetWindow(
HWND
, GET_WINDOW_CMD)"/>
Windows\Win32\PInvoke.HtmlHelp.cs (3)
10
/// <inheritdoc cref="HtmlHelp(
HWND
, string, HTML_HELP_COMMAND, nuint)" />
19
/// <inheritdoc cref="HtmlHelp(
HWND
, string, HTML_HELP_COMMAND, nuint)" />
31
/// <inheritdoc cref="HtmlHelp(
HWND
, string, HTML_HELP_COMMAND, nuint)" />
Windows\Win32\PInvoke.ImmGetContext.cs (1)
10
/// <inheritdoc cref="ImmGetContext(
HWND
)"/>
Windows\Win32\PInvoke.ImmReleaseContext.cs (1)
10
/// <inheritdoc cref="ImmReleaseContext(
HWND
, HIMC)"/>
Windows\Win32\PInvoke.InvalidateRect.cs (1)
8
/// <inheritdoc cref="InvalidateRect(
HWND
, RECT*, BOOL)"/>
Windows\Win32\PInvoke.InvalidateRgn.cs (1)
8
/// <inheritdoc cref="InvalidateRgn(
HWND
, HRGN, BOOL)"/>
Windows\Win32\PInvoke.IsChild.cs (2)
8
/// <inheritdoc cref="IsChild(
HWND
,
HWND
)"/>
Windows\Win32\PInvoke.IsWindow.cs (1)
8
/// <inheritdoc cref="IsWindow(
HWND
)"/>
Windows\Win32\PInvoke.IsWindowEnabled.cs (1)
8
/// <inheritdoc cref="IsWindowEnabled(
HWND
)"/>
Windows\Win32\PInvoke.IsWindowVisible.cs (1)
8
/// <inheritdoc cref="IsWindowVisible(
HWND
)"/>
Windows\Win32\PInvoke.KillTimer.cs (1)
8
/// <inheritdoc cref="KillTimer(
HWND
, nuint)"/>
Windows\Win32\PInvoke.NotifyWinEvent.cs (1)
8
/// <inheritdoc cref="NotifyWinEvent(uint,
HWND
, int, int)"/>
Windows\Win32\PInvoke.OpenThemeDataScope.cs (1)
26
/// Opens the requested theme data using <see cref="OpenThemeData(
HWND
, string)"/>.
Windows\Win32\PInvoke.RedrawWindow.cs (1)
8
/// <inheritdoc cref="RedrawWindow(
HWND
, RECT*, HRGN, REDRAW_WINDOW_FLAGS)"/>
Windows\Win32\PInvoke.ScreenToClient.cs (1)
10
/// <inheritdoc cref="ScreenToClient(
HWND
, ref Point)"/>
Windows\Win32\PInvoke.ScrollWindow.cs (1)
8
/// <inheritdoc cref="ScrollWindow(
HWND
, int, int, RECT*, RECT*)"/>
Windows\Win32\PInvoke.ScrollWindowEx.cs (1)
8
/// <inheritdoc cref="ScrollWindowEx(
HWND
, int, int, RECT*, RECT*, HRGN, RECT*, SCROLL_WINDOW_FLAGS)"/>
Windows\Win32\PInvoke.SetActiveWindow.cs (1)
8
/// <inheritdoc cref="SetActiveWindow(
HWND
)"/>
Windows\Win32\PInvoke.SetCapture.cs (1)
8
/// <inheritdoc cref="SetCapture(
HWND
)"/>
Windows\Win32\PInvoke.SetFocus.cs (1)
8
/// <inheritdoc cref="SetFocus(
HWND
)"/>
Windows\Win32\PInvoke.SetForegroundWindow.cs (1)
8
/// <inheritdoc cref="SetForegroundWindow(
HWND
)"/>
Windows\Win32\PInvoke.SetLayeredWindowAttributes.cs (1)
8
/// <inheritdoc cref="SetLayeredWindowAttributes(
HWND
, COLORREF, byte, LAYERED_WINDOW_ATTRIBUTES_FLAGS)"/>
Windows\Win32\PInvoke.SetMenu.cs (2)
8
/// <inheritdoc cref="SetMenu(
HWND
, HMENU)"/>
17
/// <inheritdoc cref="SetMenu(
HWND
, HMENU)"/>
Windows\Win32\PInvoke.SetParent.cs (2)
8
/// <inheritdoc cref="SetParent(
HWND
,
HWND
)"/>
Windows\Win32\PInvoke.SetScrollInfo.cs (1)
8
/// <inheritdoc cref="SetScrollInfo(
HWND
, SCROLLBAR_CONSTANTS, in SCROLLINFO, BOOL)"/>
Windows\Win32\PInvoke.SetScrollPos.cs (1)
8
/// <inheritdoc cref="SetScrollPos(
HWND
, SCROLLBAR_CONSTANTS, int, BOOL)"/>
Windows\Win32\PInvoke.SetWindowPos.cs (2)
8
/// <inheritdoc cref="SetWindowPos(
HWND
,
HWND
, int, int, int, int, SET_WINDOW_POS_FLAGS)"/>
Windows\Win32\PInvoke.SetWindowRgn.cs (1)
8
/// <inheritdoc cref="SetWindowRgn(
HWND
, HRGN, BOOL)"/>
Windows\Win32\PInvoke.SetWindowText.cs (1)
8
/// <inheritdoc cref="SetWindowText(
HWND
, string)"/>
Windows\Win32\PInvoke.SHAutoComplete.cs (1)
8
/// <inheritdoc cref="SHAutoComplete(
HWND
, SHELL_AUTOCOMPLETE_FLAGS)"/>
Windows\Win32\PInvoke.ShowWindow.cs (1)
8
/// <inheritdoc cref="ShowWindow(
HWND
, SHOW_WINDOW_CMD)"/>
Windows\Win32\PInvoke.UiaHostProviderFromHwnd.cs (1)
10
/// <inheritdoc cref="UiaHostProviderFromHwnd(
HWND
, IRawElementProviderSimple**)"/>
Windows\Win32\PInvoke.UiaReturnRawElementProvider.cs (1)
10
/// <inheritdoc cref="UiaReturnRawElementProvider(
HWND
, WPARAM, LPARAM, IRawElementProviderSimple*)"/>
Windows\Win32\PInvoke.UpdateWindow.cs (1)
8
/// <inheritdoc cref="UpdateWindow(
HWND
)"/>
Windows\Win32\PInvoke.ValidateRect.cs (1)
8
/// <inheritdoc cref="ValidateRect(
HWND
, RECT*)"/>