146 references to HWND
System.Windows.Forms (146)
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 (11)
1248HWND handle = HWND; 1759hwnd = (ContainingControl is null) ? HWND.Null : ContainingControl.HWND, 2158parent is null ? HWND.Null : parent.HWND, 2970hWndOwner = (ContainingControl is null) ? HWND.Null : ContainingControl.HWND, 3025HWND handle = ContainingControl is null ? HWND.Null : ContainingControl.HWND; 3138HWND hwnd = HWND.Null; 3212HWND,
System\Windows\Forms\ActiveX\AxHost.OleInterfaces.cs (2)
343*phwnd = _host.ParentInternal?.HWND ?? HWND.Null; 400lpFrameInfo->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)
1054get => IsHandleCreated && PInvoke.GetCapture() == HWND; 1495if ((r.left <= p.X && p.X < r.right && r.top <= p.Y && p.Y < r.bottom) || PInvoke.GetCapture() == HWND) 1497PInvokeCore.SendMessage(this, PInvokeCore.WM_SETCURSOR, (WPARAM)HWND, (LPARAM)(int)PInvoke.HTCLIENT); 2246HWND start = parent is not null ? parent.HWND : HWND; 2745using RegionScope regionHandle = new(regionCopy ?? region, HWND); 4315HWND.HWND_TOP, 4589control.SetParentHandle(HWND); 5710hwndTrack = HWND, 7057Message m = Message.Create(HWND, PInvokeCore.WM_PRINTCLIENT, (WPARAM)hdc, (LPARAM)flags); 7268hwnd: HWND, 9254PInvokeCore.MapWindowPoints(HWND.Null, this, ref rect); 9264PInvokeCore.MapWindowPoints(this, HWND.Null, ref rect); 9927HWND.HWND_BOTTOM, 10068PInvoke.SetWindowPos(this, HWND.Null, x, y, width, height, flags); 10196if (PInvoke.SetParent(this, HWND.Null).IsNull) 10289PrepareDarkMode(HWND, Application.IsDarkModeEnabled); 10292PInvoke.ShowWindow(HWND, value ? ShowParams : SHOW_WINDOW_CMD.SW_HIDE); 10313HWND.Null, 10374HWND.HWND_TOP, 10725PInvokeCore.MapWindowPoints(HWND.Null, PInvoke.GetParent(this), ref rect); 10885HWND previous = HWND.HWND_TOP; 10891previous = child.HWND; 10965HWND.HWND_TOP, 10998HWND parentHandle = HWND; 11540PInvokeCore.SendMessage(this, PInvokeCore.WM_CONTEXTMENU, (WPARAM)HWND, (LPARAM)screenLocation); 11547&& PInvoke.WindowFromPoint(screenLocation) == HWND; 11701using var paintScope = usingBeginPaint ? new BeginPaintScope(HWND) : default; 11822using GetDcScope dc = new(HWND); 11891HWND hWnd = HWND.Null; 12811HWND 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)
2340PInvoke.SetWindowTheme(HWND, $"{DarkModeIdentifier}_{ComboBoxButtonThemeIdentifier}", null); 2345_ = PInvoke.GetComboBoxInfo(HWND, ref cInfo); 2375_dropDownHandle = HWND.Null; 3363HWND.HWND_TOP, 3739bool getRegionSucceeded = PInvoke.GetUpdateRgn(HWND, windowRegion, bErase: true) != GDI_REGION_TYPE.RGN_ERROR; 3747using 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); 25613_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)
4531_ = 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); 4908HWND.Null, 4983HWND.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)
1474if (!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)
4601if (hwndClicked == HWND)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (3)
893topMost ? HWND.HWND_TOPMOST : HWND.HWND_NOTOPMOST, 1630HWND.HWND_TOP,
System\Windows\Forms\Controls\ToolStrips\ToolStripDropTargetManager.cs (1)
227DragDropHelper.DragEnter(toolStrip.HWND, dragEnterArgs);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (1)
342&& 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)
272lpFrameInfo->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);