145 references to HWND
System.Windows.Forms (145)
System\Windows\Forms\Accessibility\Control.ControlAccessibleObject.cs (2)
208/// Second item can be anything unique, Win32 uses <see cref="HWND"/>, we copied that. 244_handle = Owner?.HWND ?? default;
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (1)
615*phwnd = _parent.HWND;
System\Windows\Forms\ActiveX\AxHost.AxContainer.ExtenderProxy.cs (1)
263public HWND Hwnd => GetControl()?.HWND ?? HWND.Null;
System\Windows\Forms\ActiveX\AxHost.cs (10)
1249HWND handle = HWND; 1760hwnd = (ContainingControl is null) ? HWND.Null : ContainingControl.HWND, 2159parent is null ? HWND.Null : parent.HWND, 2971hWndOwner = (ContainingControl is null) ? HWND.Null : ContainingControl.HWND, 3026HWND handle = ContainingControl is null ? HWND.Null : ContainingControl.HWND; 3139HWND hwnd = HWND.Null;
System\Windows\Forms\ActiveX\AxHost.OleInterfaces.cs (2)
342*phwnd = _host.ParentInternal?.HWND ?? HWND.Null; 399lpFrameInfo->hwndFrame = _host.ParentInternal?.HWND ?? HWND.Null;
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
357if (hwnd != _control.HWND && lpmsg->IsMouseMessage())
System\Windows\Forms\Application.MarshallingControl.cs (1)
32cp.Parent = HWND.HWND_MESSAGE;
System\Windows\Forms\Application.ParkingWindow.cs (2)
38cp.Parent = HWND.HWND_MESSAGE; 128PInvoke.GetParent(handle) != HWND,
System\Windows\Forms\Application.ThreadWindows.cs (1)
63_focusedHwnd = activatingControl is not null ? activatingControl.HWND : PInvoke.GetFocus();
System\Windows\Forms\Control.cs (31)
1055get => IsHandleCreated && PInvoke.GetCapture() == HWND; 1496if ((r.left <= p.X && p.X < r.right && r.top <= p.Y && p.Y < r.bottom) || PInvoke.GetCapture() == HWND) 1498PInvokeCore.SendMessage(this, PInvokeCore.WM_SETCURSOR, (WPARAM)HWND, (LPARAM)(int)PInvoke.HTCLIENT); 2247HWND start = parent is not null ? parent.HWND : HWND; 2746using RegionScope regionHandle = (regionCopy ?? region).GetRegionScope(HWND); 4316HWND.HWND_TOP, 4590control.SetParentHandle(HWND); 5751hwndTrack = HWND, 7098Message m = Message.Create(HWND, PInvokeCore.WM_PRINTCLIENT, (WPARAM)hdc, (LPARAM)flags); 7309hwnd: HWND, 9295PInvokeCore.MapWindowPoints(HWND.Null, this, ref rect); 9305PInvokeCore.MapWindowPoints(this, HWND.Null, ref rect); 9960HWND.HWND_BOTTOM, 10101PInvoke.SetWindowPos(this, HWND.Null, x, y, width, height, flags); 10229if (PInvoke.SetParent(this, HWND.Null).IsNull) 10322PrepareDarkMode(HWND, Application.IsDarkModeEnabled); 10325PInvoke.ShowWindow(HWND, value ? ShowParams : SHOW_WINDOW_CMD.SW_HIDE); 10346HWND.Null, 10407HWND.HWND_TOP, 10758PInvokeCore.MapWindowPoints(HWND.Null, PInvoke.GetParent(this), ref rect); 10918HWND previous = HWND.HWND_TOP; 10924previous = child.HWND; 10998HWND.HWND_TOP, 11031HWND parentHandle = HWND; 11573PInvokeCore.SendMessage(this, PInvokeCore.WM_CONTEXTMENU, (WPARAM)HWND, (LPARAM)screenLocation); 11580&& PInvoke.WindowFromPoint(screenLocation) == HWND; 11734using var paintScope = usingBeginPaint ? new BeginPaintScope(HWND) : default; 11855using GetDcScope dc = new(HWND); 11923HWND hWnd = HWND.Null; 12843HWND IHandle<HWND>.Handle => HWND;
System\Windows\Forms\Controls\Buttons\Button.cs (1)
232if (PInvoke.WindowFromPoint(PointToScreen(mevent.Location)) == HWND && !ValidationCancelled)
System\Windows\Forms\Controls\Buttons\CheckBox.cs (1)
491&& PInvoke.WindowFromPoint(PointToScreen(mevent.Location)) == HWND)
System\Windows\Forms\Controls\Buttons\RadioButton.cs (1)
472&& PInvoke.WindowFromPoint(PointToScreen(mevent.Location)) == HWND)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (6)
2341PInvoke.SetWindowTheme(HWND, $"{DarkModeIdentifier}_{ComboBoxButtonThemeIdentifier}", null); 2346_ = PInvoke.GetComboBoxInfo(HWND, ref cInfo); 2376_dropDownHandle = HWND.Null; 3364HWND.HWND_TOP, 3740bool getRegionSucceeded = PInvoke.GetUpdateRgn(HWND, windowRegion, bErase: true) != GDI_REGION_TYPE.RGN_ERROR; 3748using var paintScope = useBeginPaint ? new BeginPaintScope(HWND) : default;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (3)
5709using GetDcScope dc = new(HWND, HRGN.Null, GET_DCX_FLAGS.DCX_CACHE | GET_DCX_FLAGS.DCX_LOCKWINDOWUPDATE); 5728using GetDcScope dc = new(HWND, HRGN.Null, GET_DCX_FLAGS.DCX_CACHE | GET_DCX_FLAGS.DCX_LOCKWINDOWUPDATE); 25633_editingPanel?.ReleaseUiaProvider(HWND.Null);
System\Windows\Forms\Controls\Labels\LinkLabel.cs (2)
302if ((r.left <= p.X && p.X < r.right && r.top <= p.Y && p.Y < r.bottom) || PInvoke.GetCapture() == HWND) 304PInvokeCore.SendMessage(this, PInvokeCore.WM_SETCURSOR, (WPARAM)HWND, (LPARAM)(int)PInvoke.HTCLIENT);
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (2)
2422if (captured && PInvoke.WindowFromPoint(PointToScreen(point)) == HWND) 2462if (Capture && PInvoke.WindowFromPoint(PointToScreen((Point)m.LParamInternal)) == HWND)
System\Windows\Forms\Controls\ListView\ListView.cs (1)
4535_ = PInvoke.SetWindowTheme(HWND, $"{DarkModeIdentifier}_{ExplorerThemeIdentifier}", null);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
1826PInvokeCore.SendMessage(HWND, PInvoke.MCM_SETDAYSTATE, (WPARAM)monthsCount, (LPARAM)arr);
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (1)
87PInvoke.SetWindowTheme(HWND, " ", " ");
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.cs (1)
96ScaleHelper.IsScalingRequirementMet ? HWNDInternal : HWND.Null);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridToolTip.cs (1)
127HWND.HWND_TOPMOST,
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (10)
2370using GetDcScope hdc = new(HWND); 3688using GetDcScope hdc = new(DropDownListBox.HWND); 4761_scrollBar?.ReleaseUiaProvider(HWND.Null); 4762_listBox?.ReleaseUiaProvider(HWND.Null); 4763_dropDownHolder?.ReleaseUiaProvider(HWND.Null); 4764_editTextBox?.ReleaseUiaProvider(HWND.Null); 4765_dropDownButton?.ReleaseUiaProvider(HWND.Null); 4766_dialogButton?.ReleaseUiaProvider(HWND.Null); 4906HWND.Null, 4979HWND.Null,
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (1)
274if (hWnd == HWND)
System\Windows\Forms\Controls\RichTextBox\RichTextBox.OleCallback.cs (1)
166DragDropHelper.DragEnter(_owner.HWND, e);
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
698using GetDcScope dc = new(ParentInternal.HWND, HRGN.Null, GET_DCX_FLAGS.DCX_CACHE | GET_DCX_FLAGS.DCX_LOCKWINDOWUPDATE);
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
1259HWND.HWND_TOPMOST,
System\Windows\Forms\Controls\TextBox\TextBox.cs (1)
958using BeginPaintScope paintScope = new(HWND);
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (1)
1466if (!ValidationCancelled && PInvoke.WindowFromPoint(PointToScreen(mevent.Location)) == HWND)
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (1)
457using GetDcScope hdc = new(Owner.HWND);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
4596if (hwndClicked == HWND)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (3)
893topMost ? HWND.HWND_TOPMOST : HWND.HWND_NOTOPMOST, 1627HWND.HWND_TOP,
System\Windows\Forms\Controls\ToolStrips\ToolStripDropTargetManager.cs (1)
226DragDropHelper.DragEnter(toolStrip.HWND, dragEnterArgs);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (1)
340&& activeToolStripDropDown.OwnerToolStrip.HWND == hwndMouseMessageIsFrom
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.FeedbackRectangle.FeedbackDropDown.cs (1)
54HWND.Null,
System\Windows\Forms\Controls\TreeView\TreeView.cs (4)
1939HWND.HWND_TOP, 1952HWND.HWND_TOP, 2935HWND.HWND_TOPMOST, 3064PInvokeCore.SendMessage(this, PInvokeCore.WM_CONTEXTMENU, (WPARAM)HWND, (LPARAM)PInvoke.GetMessagePos());
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
696if (PInvoke.WindowFromPoint(PointToScreen(mevent.Location)) == HWND && !ValidationCancelled)
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (1)
226if (!_parent.ValidationCancelled && PInvoke.WindowFromPoint(PointToScreen(e.Location)) == HWND)
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownEdit.cs (1)
66if (!_parent.ValidationCancelled && PInvoke.WindowFromPoint(PointToScreen(e.Location)) == HWND)
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (3)
333hwnd = HWND.Null, 425HWND hwndInPlaceObject = HWND.Null; 673HRESULT hr = _axOleObject!.DoVerb((int)verb, null, clientSite, 0, HWND, &posRect);
System\Windows\Forms\Controls\WebBrowser\WebBrowserContainer.cs (1)
76*phwnd = _parent.HWND;
System\Windows\Forms\Controls\WebBrowser\WebBrowserSiteBase.cs (1)
271lpFrameInfo->hwndFrame = Host.ParentInternal is { } parent ? parent.HWND : HWND.Null;
System\Windows\Forms\Form.cs (20)
1369HWND.HWND_TOP, 1990value ? HWND.HWND_TOPMOST : HWND.HWND_NOTOPMOST, 2247HWND, 2446HWND, 2459HWND, 2765PInvokeCore.SendMessage(MdiParentInternal.MdiClient, PInvokeCore.WM_MDIACTIVATE, (WPARAM)HWND); 3431_ctlClient.HWND, 4280PInvoke.SetWindowTheme(HWND, $"{DarkModeIdentifier}_{ExplorerThemeIdentifier}", null); 4672PInvoke.TranslateMDISysAccel(_ctlClient.HWND, win32Message)) 4865bool result = PInvoke.GetWindowPlacement(HWND, &wp); 4882callback = new EnumThreadWindowsCallback(HWND); 4909bool result = PInvoke.SetWindowPlacement(HWND, &wp); 5060PInvokeCore.SendMessage(MdiParentInternal.MdiClient, PInvokeCore.WM_MDIACTIVATE, (WPARAM)HWND); 5415if (!ownerHwnd.IsNull && ownerHwnd.Handle != HWND) 5418if (PInvokeCore.GetWindowLong(ownerHwnd, WINDOW_LONG_PTR_INDEX.GWL_HWNDPARENT) == HWND) 5642if (!ownerHwnd.IsNull && ownerHwnd.Handle != HWND) 6407PInvoke.GetWindowPlacement(HWND, &wp); 6840if (HWND == (HWND)m.WParamInternal) 6844else if (HWND == m.LParamInternal)
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
1418HWND.HWND_TOP,
System\Windows\Forms\Layout\Containers\SplitContainer.cs (3)
453if ((r.left <= p.X && p.X < r.right && r.top <= p.Y && p.Y < r.bottom) || PInvoke.GetCapture() == HWND) 455PInvokeCore.SendMessage(this, PInvokeCore.WM_SETCURSOR, (WPARAM)HWND, (LPARAM)(int)PInvoke.HTCLIENT); 1474using GetDcScope dc = new(HWND, HRGN.Null, GET_DCX_FLAGS.DCX_CACHE | GET_DCX_FLAGS.DCX_LOCKWINDOWUPDATE);
System\Windows\Forms\MDI\MDIClient.cs (2)
254bool result = PInvoke.GetWindowPlacement(child.HWND, &wp); 270PInvoke.SetWindowPlacement(child.HWND, &wp);
System\Windows\Forms\OLE\DropTarget.cs (2)
26_hwndTarget = control.HWND; 32_hwndTarget = toolStrip.HWND;
System\Windows\Forms\Printing\PrintPreviewControl.cs (1)
476using GetDcScope hdc = new(HWND);
System\Windows\Forms\Scrolling\ScrollBar.cs (1)
739if (PInvoke.GetFocus() == HWND)
System\Windows\Forms\ToolTip\ToolTip.cs (4)
1050HWND baseHwnd = current?.HWND ?? HWND.Null; 1079hwnd = current.HWND; 1086baseHwnd = current.HWND; 1845_owners[windowAsControl.HWND] = windowAsControl;
System\Windows\Forms\UserControl.cs (1)
254return HWND == hwndFocus || PInvoke.IsChild(this, hwndFocus);
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (1)
348_lastHResult = PInvoke.DrawThemeParentBackground(childControl.HWND, hdc, bounds);