148 references to HWND
System.Private.Windows.Core (78)
Windows\Win32\Foundation\HWND.cs (4)
6internal partial struct HWND : IHandle<HWND> 8HWND IHandle<HWND>.Handle => this; 9object? IHandle<HWND>.Wrapper => null;
Windows\Win32\Foundation\LPARAM.cs (3)
22public static explicit operator HWND(LPARAM value) => (HWND)value.Value; 24public static explicit operator LPARAM(HWND value) => (LPARAM)value.Value;
Windows\Win32\Foundation\LRESULT.cs (2)
12public static explicit operator HWND(LRESULT value) => (HWND)value.Value;
Windows\Win32\Foundation\WPARAM.cs (3)
13public static explicit operator HWND(WPARAM value) => (HWND)(nint)value.Value; 14public 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)"/> 26public HWND HWND { get; } 29public 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) 20public HWND HWND { get; } 22public GetDcScope(HWND hwnd) 29/// Creates a <see cref="Gdi.HDC"/> using <see cref="PInvokeCore.GetDCEx(HWND, HRGN, GET_DCX_FLAGS)"/>. 40public GetDcScope(HWND hwnd, HRGN hrgnClip, GET_DCX_FLAGS flags)
Windows\Win32\Graphics\Gdi\RegionScope.cs (1)
96public RegionScope(IPointer<GpRegion> region, HWND hwnd)
Windows\Win32\PInvoke.CallWindowProc.cs (2)
9where T : IHandle<HWND> 12(delegate* unmanaged[Stdcall]<HWND, uint, WPARAM, LPARAM, LRESULT>)lpPrevWndFunc,
Windows\Win32\PInvoke.GetWindowRect.cs (2)
8/// <inheritdoc cref="GetWindowRect(HWND, out RECT)"/> 9public static BOOL GetWindowRect<T>(T hWnd, out RECT lpRect) where T : IHandle<HWND>
Windows\Win32\PInvoke.GetWindowText.cs (1)
15public static unsafe string GetWindowText<T>(T hWnd) where T : IHandle<HWND>
Windows\Win32\PInvoke.GetWindowTextLength.cs (2)
8/// <inheritdoc cref="GetWindowTextLength(HWND)"/> 9public static int GetWindowTextLength<T>(T hWnd) where T : IHandle<HWND>
Windows\Win32\PInvoke.MapWindowPoints.cs (8)
10/// <inheritdoc cref="MapWindowPoints(HWND, HWND, Point*, uint)"/> 12where TFrom : IHandle<HWND> 13where TTo : IHandle<HWND> 24/// <inheritdoc cref="MapWindowPoints(HWND, HWND, Point*, uint)"/> 26where TFrom : IHandle<HWND> 27where TTo : IHandle<HWND>
Windows\Win32\PInvokeCore.EnumChildWindows.cs (3)
11public delegate BOOL EnumChildWindowsCallback(HWND hWnd); 14where T : IHandle<HWND> 32private static BOOL EnumChildWindowsNativeCallback(HWND hWnd, LPARAM lParam)
Windows\Win32\PInvokeCore.EnumThreadWindows.cs (2)
11public delegate BOOL EnumThreadWindowsCallback(HWND hWnd); 33private static BOOL HandleEnumThreadWindowsNativeCallback(HWND hWnd, LPARAM lParam)
Windows\Win32\PInvokeCore.EnumWindows.cs (2)
11public delegate BOOL EnumWindowsCallback(HWND hWnd); 30private static BOOL EnumWindowsNativeCallback(HWND hWnd, LPARAM lParam)
Windows\Win32\PInvokeCore.GetClassLong.cs (3)
13private static extern nint GetClassLongW(HWND hWnd, GET_CLASS_LONG_INDEX nIndex); 17private static extern nint GetClassLongPtrW(HWND hWnd, GET_CLASS_LONG_INDEX nIndex); 19public static IntPtr GetClassLong(HWND hWnd, GET_CLASS_LONG_INDEX nIndex)
Windows\Win32\PInvokeCore.GetClientRect.cs (2)
8/// <inheritdoc cref="GetClientRect(HWND, out RECT)"/> 10where T : IHandle<HWND>
Windows\Win32\PInvokeCore.GetWindowLong.cs (3)
11private static extern nint GetWindowLongW(HWND hWnd, WINDOW_LONG_PTR_INDEX nIndex); 14private static extern nint GetWindowLongPtrW(HWND hWnd, WINDOW_LONG_PTR_INDEX nIndex); 28where T : IHandle<HWND>
Windows\Win32\PInvokeCore.PeekMessage.cs (2)
8/// <inheritdoc cref="PeekMessage(MSG*, HWND, uint, uint, PEEK_MESSAGE_REMOVE_TYPE)"/> 15where T : IHandle<HWND>
Windows\Win32\PInvokeCore.PostMessage.cs (2)
8/// <inheritdoc cref="PostMessage(HWND, uint, WPARAM, LPARAM)"/> 14where T : IHandle<HWND>
Windows\Win32\PInvokeCore.SendMessage.cs (11)
8/// <inheritdoc cref="SendMessage(HWND, uint, WPARAM, LPARAM)"/> 13LPARAM lParam = default) where T : IHandle<HWND> 20/// <inheritdoc cref="SendMessage(HWND, uint, WPARAM, LPARAM)"/> 25LPARAM lParam = default) where THwnd : IHandle<HWND> where TWParam : IHandle<HWND> 32/// <inheritdoc cref="SendMessage(HWND, uint, WPARAM, LPARAM)"/> 37string? lParam) where T : IHandle<HWND> 45/// <inheritdoc cref="SendMessage(HWND, uint, WPARAM, LPARAM)"/> 51where THwnd : IHandle<HWND> 60/// <inheritdoc cref="SendMessage(HWND, uint, WPARAM, LPARAM)"/> 66where THwnd : IHandle<HWND>
Windows\Win32\PInvokeCore.SetClassLong.cs (3)
12private static extern nint SetClassLongW(HWND hwnd, GET_CLASS_LONG_INDEX nIndex, nint dwNewLong); 15private static extern nint SetClassLongPtrW(HWND hwnd, GET_CLASS_LONG_INDEX nIndex, nint dwNewLong); 17public static nint SetClassLong(HWND hWnd, GET_CLASS_LONG_INDEX nIndex, nint dwNewLong)
Windows\Win32\PInvokeCore.SetWindowLong.cs (6)
11private static extern nint SetWindowLongW(HWND hWnd, WINDOW_LONG_PTR_INDEX nIndex, nint dwNewLong); 14private static extern nint SetWindowLongPtrW(HWND hWnd, WINDOW_LONG_PTR_INDEX nIndex, nint dwNewLong); 17where T : IHandle<HWND> 27where THwnd : IHandle<HWND> 28where TNewValue : IHandle<HWND> 36where T : IHandle<HWND>
Windows\Win32\UI\Controls\Dialogs\PRINTDLGEXW.cs (1)
52public HWND hwndOwner;
Windows\Win32\UI\WindowsAndMessaging\WNDPROC.cs (1)
6internal delegate LRESULT WNDPROC(HWND hWnd, uint msg, WPARAM wParam, LPARAM lParam);
System.Windows.Forms (8)
System\Windows\Forms\Accessibility\AccessibleObject.cs (1)
2513/// <inheritdoc cref="IOleWindow.GetWindow(HWND*)"/>
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (2)
331/// <inheritdoc cref="IOleObject.DoVerb(int, MSG*, IOleClientSite*, int, HWND, RECT*)"/> 754/// <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)
436HWND mainWindowHandle = (HWND)process.MainWindowHandle; 443HWND foregroundWindow = PInvokeCore.GetForegroundWindow();
System.Windows.Forms.Primitives (59)
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.DragAcceptFiles.cs (1)
8/// <inheritdoc cref="DragAcceptFiles(HWND, BOOL)"/>
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.GetWindowThreadProcessId.cs (1)
8/// <inheritdoc cref="GetWindowThreadProcessId(HWND, uint*)"/>
Windows\Win32\PInvoke.HtmlHelp.cs (2)
25/// <inheritdoc cref="HtmlHelp(HWND, string, HTML_HELP_COMMAND, nuint)" /> 37/// <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.RegisterDragDrop.cs (1)
10/// <inheritdoc cref="RegisterDragDrop(HWND, IDropTarget*)"/>
Windows\Win32\PInvoke.RevokeDragDrop.cs (1)
8/// <inheritdoc cref="RevokeDragDrop(HWND)"/>
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*)"/>