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