37 references to new
System.Private.Windows.Core (1)
Windows\Win32\Foundation\HandleRef.cs (1)
71
return
new
(handle.Wrapper, Unsafe.As<nint, THandle>(ref local));
System.Windows.Forms (31)
System\Windows\Forms\Accessibility\Control.ControlAccessibleObject.cs (2)
472
new
HandleRef
<HWND>(Owner, HandleInternal),
544
PInvoke.UiaHostProviderFromHwnd(new
HandleRef
<HWND>(this, HandleInternal), out IRawElementProviderSimple* provider);
System\Windows\Forms\ActiveX\AxHost.cs (2)
1771
if (PInvoke.IsAccelerator(new
HandleRef
<HACCEL>(this, ctlInfo.hAccel), ctlInfo.cAccel, &msg, lpwCmd: null))
3142
Application.ParkHandle(new
HandleRef
<HWND>(this, hwnd), DpiAwarenessContext);
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (2)
675
PInvoke.DestroyAcceleratorTable(new
HandleRef
<HACCEL>(_control, _accelTable));
1666
PInvoke.DestroyAcceleratorTable(new
HandleRef
<HACCEL>(_control, _accelTable));
System\Windows\Forms\Control.cs (4)
5225
internal static HandleRef<HWND> GetHandleRef(HWND hwnd) =>
new
(FromChildHandle(hwnd), hwnd);
5450
hWndChild = PInvoke.GetWindow(new
HandleRef
<HWND>(this, hWndChild), GET_WINDOW_CMD.GW_HWNDNEXT))
5777
?
new
(window, hwnd)
7968
PInvokeCore.GetClientRect(new
HandleRef
<HWND>(_window, InternalHandle), out RECT rect);
System\Windows\Forms\Controls\ComboBox\ComboBox.ACNativeWindow.cs (1)
23
PInvokeCore.EnumChildWindows(new
HandleRef
<HWND>(this, acHandle), RegisterACWindowRecursive);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildEditUiaProvider.cs (1)
88
PInvoke.UiaHostProviderFromHwnd(new
HandleRef
<HWND>(this, _handle), out IRawElementProviderSimple* provider);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildListUiaProvider.cs (1)
183
PInvoke.UiaHostProviderFromHwnd(new
HandleRef
<HWND>(this, _childListControlhandle), out IRawElementProviderSimple* provider);
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (2)
1976
return DropDownStyle == ComboBoxStyle.Simple ? new(_childListBox) :
new
(this, _dropDownHandle);
2295
hwnd = PInvoke.GetWindow(new
HandleRef
<HWND>(this, hwnd), GET_WINDOW_CMD.GW_HWNDNEXT);
System\Windows\Forms\Controls\ImageList\ImageList.cs (5)
215
if (PInvoke.ImageList.GetIconSize(new
HandleRef
<HIMAGELIST>(this, _nativeImageList.HIMAGELIST), out int x, out int y))
221
if (PInvoke.ImageList.GetImageInfo(new
HandleRef
<HIMAGELIST>(this, _nativeImageList.HIMAGELIST), 0, out IMAGEINFO imageInfo))
353
int index = PInvoke.ImageList.ReplaceIcon(this, -1, new
HandleRef
<HICON>(icon, (HICON)icon.Handle));
534
new
HandleRef
<HDC>(g, dc),
670
new
HandleRef
<HDC>(graphics, dc),
System\Windows\Forms\Controls\ImageList\ImageListStreamer.cs (2)
116
handle =
new
(_imageList, (HIMAGELIST)_imageList.Handle);
120
handle =
new
(_nativeImageList, _nativeImageList.HIMAGELIST);
System\Windows\Forms\Controls\ListView\ListView.cs (1)
3802
PInvoke.InvalidateRect(new
HandleRef
<HWND>(this, header), lpRect: null, bErase: true);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (2)
141
ActiveHwndInternal =
new
(Control.FromHandle(hwndActive), hwndActive);
414
ActiveHwndInternal =
new
(Control.FromHandle(hwndActive), hwndActive);
System\Windows\Forms\Controls\TreeView\TreeView.cs (2)
2005
PInvoke.ImageList.Destroy(new
HandleRef
<HIMAGELIST>(this, (HIMAGELIST)handleOld));
2016
PInvoke.ImageList.Destroy(new
HandleRef
<HIMAGELIST>(this, (HIMAGELIST)handle));
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (2)
342
if (!PInvoke.IsAccelerator(new
HandleRef
<HACCEL>(this, controlInfo.hAccel), controlInfo.cAccel, &msg, lpwCmd: null))
428
Application.ParkHandle(new
HandleRef
<HWND>(AXInPlaceObject, hwndInPlaceObject), DpiAwarenessContext);
System\Windows\Forms\Dialogs\CommonDialogs\CommonDialog.cs (1)
212
ownerHwnd =
new
(nativeWindow, nativeWindow.HWND);
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.ErrorWindowAccessibleObject.cs (1)
83
PInvoke.UiaHostProviderFromHwnd(new
HandleRef
<HWND>(this, _owner.HWND), out IRawElementProviderSimple* provider);
System.Windows.Forms.Design (3)
System\ComponentModel\Design\DesignerActionUI.cs (1)
723
new
HandleRef
<HWND>(_mainParentWindow, (HWND)_mainParentWindow.Handle));
System\ComponentModel\Design\DesignerActionUI.DesignerActionToolStripDropDown.cs (1)
117
new
HandleRef
<HWND>(this, hwndActivating),
System\Windows\Forms\Design\Behavior\BehaviorService.cs (1)
458
PInvoke.SetActiveWindow(new
HandleRef
<HWND>(hWnd, (HWND)hWnd.Handle));
System.Windows.Forms.Tests (2)
SerializableTypesTests.cs (2)
96
Assert.True(PInvoke.ImageList.GetIconSize(new
HandleRef
<HIMAGELIST>(this, nativeImageList.HIMAGELIST), out int x, out int y));
99
Assert.True(PInvoke.ImageList.GetImageInfo(new
HandleRef
<HIMAGELIST>(this, nativeImageList.HIMAGELIST), 0, out IMAGEINFO imageInfo));