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