145 references to HWND
System.Windows.Forms (145)
System\Windows\Forms\Accessibility\Control.ControlAccessibleObject.cs (2)
207/// Second item can be anything unique, Win32 uses <see cref="HWND"/>, we copied that. 243_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)
1053get => IsHandleCreated && PInvoke.GetCapture() == HWND; 1494if ((r.left <= p.X && p.X < r.right && r.top <= p.Y && p.Y < r.bottom) || PInvoke.GetCapture() == HWND) 1496PInvokeCore.SendMessage(this, PInvokeCore.WM_SETCURSOR, (WPARAM)HWND, (LPARAM)(int)PInvoke.HTCLIENT); 2245HWND start = parent is not null ? parent.HWND : HWND; 2744using RegionScope regionHandle = (regionCopy ?? region).GetRegionScope(HWND); 4314HWND.HWND_TOP, 4588control.SetParentHandle(HWND); 5749hwndTrack = HWND, 7093Message m = Message.Create(HWND, PInvokeCore.WM_PRINTCLIENT, (WPARAM)hdc, (LPARAM)flags); 7304hwnd: HWND, 9287PInvokeCore.MapWindowPoints(HWND.Null, this, ref rect); 9297PInvokeCore.MapWindowPoints(this, HWND.Null, ref rect); 9949HWND.HWND_BOTTOM, 10090PInvoke.SetWindowPos(this, HWND.Null, x, y, width, height, flags); 10218if (PInvoke.SetParent(this, HWND.Null).IsNull) 10311PrepareDarkMode(HWND, Application.IsDarkModeEnabled); 10314PInvoke.ShowWindow(HWND, value ? ShowParams : SHOW_WINDOW_CMD.SW_HIDE); 10335HWND.Null, 10396HWND.HWND_TOP, 10747PInvokeCore.MapWindowPoints(HWND.Null, PInvoke.GetParent(this), ref rect); 10907HWND previous = HWND.HWND_TOP; 10913previous = child.HWND; 10987HWND.HWND_TOP, 11020HWND parentHandle = HWND; 11559PInvokeCore.SendMessage(this, PInvokeCore.WM_CONTEXTMENU, (WPARAM)HWND, (LPARAM)screenLocation); 11566&& PInvoke.WindowFromPoint(screenLocation) == HWND; 11720using var paintScope = usingBeginPaint ? new BeginPaintScope(HWND) : default; 11841using GetDcScope dc = new(HWND); 11909HWND hWnd = HWND.Null; 12829HWND 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)
5706using GetDcScope dc = new(HWND, HRGN.Null, GET_DCX_FLAGS.DCX_CACHE | GET_DCX_FLAGS.DCX_LOCKWINDOWUPDATE); 5725using GetDcScope dc = new(HWND, HRGN.Null, GET_DCX_FLAGS.DCX_CACHE | GET_DCX_FLAGS.DCX_LOCKWINDOWUPDATE); 25624_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); 4755_scrollBar?.ReleaseUiaProvider(HWND.Null); 4756_listBox?.ReleaseUiaProvider(HWND.Null); 4757_dropDownHolder?.ReleaseUiaProvider(HWND.Null); 4758_editTextBox?.ReleaseUiaProvider(HWND.Null); 4759_dropDownButton?.ReleaseUiaProvider(HWND.Null); 4760_dialogButton?.ReleaseUiaProvider(HWND.Null); 4900HWND.Null, 4973HWND.Null,
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (1)
274if (hWnd == HWND)
System\Windows\Forms\Controls\RichTextBox\RichTextBox.OleCallback.cs (1)
165DragDropHelper.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)
4598if (hwndClicked == HWND)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (3)
893topMost ? HWND.HWND_TOPMOST : HWND.HWND_NOTOPMOST, 1624HWND.HWND_TOP,
System\Windows\Forms\Controls\ToolStrips\ToolStripDropTargetManager.cs (1)
227DragDropHelper.DragEnter(toolStrip.HWND, dragEnterArgs);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (1)
337&& 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); 3428_ctlClient.HWND, 4277PInvoke.SetWindowTheme(HWND, $"{DarkModeIdentifier}_{ExplorerThemeIdentifier}", null); 4669PInvoke.TranslateMDISysAccel(_ctlClient.HWND, win32Message)) 4862bool result = PInvoke.GetWindowPlacement(HWND, &wp); 4879callback = new EnumThreadWindowsCallback(HWND); 4906bool result = PInvoke.SetWindowPlacement(HWND, &wp); 5057PInvokeCore.SendMessage(MdiParentInternal.MdiClient, PInvokeCore.WM_MDIACTIVATE, (WPARAM)HWND); 5409if (!ownerHwnd.IsNull && ownerHwnd.Handle != HWND) 5412if (PInvokeCore.GetWindowLong(ownerHwnd, WINDOW_LONG_PTR_INDEX.GWL_HWNDPARENT) == HWND) 5636if (!ownerHwnd.IsNull && ownerHwnd.Handle != HWND) 6401PInvoke.GetWindowPlacement(HWND, &wp); 6834if (HWND == (HWND)m.WParamInternal) 6838else if (HWND == m.LParamInternal)
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
1411HWND.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)
27_hwndTarget = control.HWND; 33_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);