121 references to NullHandleRef
System.Windows.Forms (121)
misc\DpiHelper.cs (2)
108IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 113UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC));
winforms\Managed\System\WinForms\Application.cs (16)
370StringBuilder sb = UnsafeNativeMethods.GetModuleFileNameLongPath(NativeMethods.NullHandleRef); 645StringBuilder sb = UnsafeNativeMethods.GetModuleFileNameLongPath(NativeMethods.NullHandleRef); 800null, NativeMethods.NullHandleRef, 817NativeMethods.NullHandleRef); 2022return !UnsafeNativeMethods.PeekMessage(ref msg, NativeMethods.NullHandleRef, 0, 0, NativeMethods.PM_NOREMOVE); 2098bool peeked = UnsafeNativeMethods.PeekMessage(ref msg, NativeMethods.NullHandleRef, 0, 0, NativeMethods.PM_NOREMOVE); 2112UnsafeNativeMethods.GetMessageW(ref msg, NativeMethods.NullHandleRef, 0, 0); 2116UnsafeNativeMethods.GetMessageA(ref msg, NativeMethods.NullHandleRef, 0, 0); 2197if (!UnsafeNativeMethods.PeekMessage(ref msg, NativeMethods.NullHandleRef, 0, 0, NativeMethods.PM_NOREMOVE)) { 2447if (NativeMethods.Succeeded(UnsafeNativeMethods.CoRegisterMessageFilter(NativeMethods.NullHandleRef, ref msgFilterPtr)) && msgFilterPtr != (IntPtr)0) { 3527bool peeked = UnsafeNativeMethods.PeekMessage(ref msg, NativeMethods.NullHandleRef, 0, 0, NativeMethods.PM_NOREMOVE); 3537if (!UnsafeNativeMethods.GetMessageW(ref msg, NativeMethods.NullHandleRef, 0, 0)) { 3544if (!UnsafeNativeMethods.GetMessageA(ref msg, NativeMethods.NullHandleRef, 0, 0)) { 3566else if (!UnsafeNativeMethods.PeekMessage(ref msg, NativeMethods.NullHandleRef, 0, 0, NativeMethods.PM_NOREMOVE)) { 3990if (!UnsafeNativeMethods.PeekMessage(ref tempMsg, NativeMethods.NullHandleRef, 0, 0, NativeMethods.PM_NOREMOVE)) { 4242NativeMethods.NullHandleRef);
winforms\Managed\System\WinForms\AxHost.cs (2)
1452IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 1458UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC));
winforms\Managed\System\WinForms\ComboBox.cs (3)
2294null, NativeMethods.NullHandleRef, 3376SafeNativeMethods.SetWindowPos(new HandleRef(this, dropDownHandle), NativeMethods.NullHandleRef, 0, 0, DropDownWidth, height, 5769NativeMethods.NullHandleRef);
winforms\Managed\System\WinForms\CommonDialog.cs (1)
182SafeNativeMethods.SetWindowPos(new HandleRef(null, hWnd), NativeMethods.NullHandleRef, x, y, 0, 0, NativeMethods.SWP_NOSIZE |
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (2)
1297NativeMethods.NullHandleRef, 1302NativeMethods.NullHandleRef);
winforms\Managed\System\WinForms\ContainerControl.cs (1)
739IntPtr dc = UnsafeNativeMethods.CreateCompatibleDC(NativeMethods.NullHandleRef);
winforms\Managed\System\WinForms\Control.cs (21)
7270null, NativeMethods.NullHandleRef, 7315ref rcArea, NativeMethods.NullHandleRef, 10090UnsafeNativeMethods.MapWindowPoints(NativeMethods.NullHandleRef, new HandleRef(this, Handle), point, 1); 10107UnsafeNativeMethods.MapWindowPoints(new HandleRef(this, Handle), NativeMethods.NullHandleRef, point, 1); 11062UnsafeNativeMethods.MapWindowPoints(NativeMethods.NullHandleRef, new HandleRef(this, Handle), ref rect, 2); 11079UnsafeNativeMethods.MapWindowPoints(new HandleRef(this, Handle), NativeMethods.NullHandleRef, ref rect, 2); 11898SafeNativeMethods.SetWindowPos(new HandleRef(window, Handle), NativeMethods.NullHandleRef, x, y, width, height, flags); 12145NativeMethods.NullHandleRef, 12198new HandleRef(window, Handle), NativeMethods.NullHandleRef, 0, 0, 0, 0, NativeMethods.SWP_NOSIZE | 12522UnsafeNativeMethods.MapWindowPoints(NativeMethods.NullHandleRef, new HandleRef(null, UnsafeNativeMethods.GetParent(new HandleRef(window, InternalHandle))), ref rect, 2); 12756new HandleRef(this, Handle), NativeMethods.NullHandleRef, 0, 0, 0, 0, 16509IntPtr dc = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 16512UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, dc)); 19228HandleRef hBitmapDC = NativeMethods.NullHandleRef; 19229HandleRef hBitmap = NativeMethods.NullHandleRef; 19230HandleRef hOriginalBmp = NativeMethods.NullHandleRef; 19231HandleRef hMetafileDC = NativeMethods.NullHandleRef; 19248hBitmapDC = new HandleRef(this, UnsafeNativeMethods.CreateCompatibleDC(NativeMethods.NullHandleRef)); 19280hBitmapDC = NativeMethods.NullHandleRef; 19281hBitmap = NativeMethods.NullHandleRef; 19282hOriginalBmp = NativeMethods.NullHandleRef;
winforms\Managed\System\WinForms\Control.Ime.cs (1)
902IntPtr oldContext = UnsafeNativeMethods.ImmAssociateContext( new HandleRef( null, handle ), NativeMethods.NullHandleRef );
winforms\Managed\System\WinForms\ControlPaint.cs (8)
307IntPtr hdcS = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 310UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hdcS)); 1783IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(null, UnsafeNativeMethods.GetDesktopWindow()), NativeMethods.NullHandleRef, NativeMethods.DCX_WINDOW | NativeMethods.DCX_LOCKWINDOWUPDATE | NativeMethods.DCX_CACHE); 1812UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, dc)); 1826IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(null, UnsafeNativeMethods.GetDesktopWindow()), NativeMethods.NullHandleRef, NativeMethods.DCX_WINDOW | NativeMethods.DCX_LOCKWINDOWUPDATE | NativeMethods.DCX_CACHE); 1841UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, dc)); 2007IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(null, UnsafeNativeMethods.GetDesktopWindow()), NativeMethods.NullHandleRef, NativeMethods.DCX_WINDOW | NativeMethods.DCX_LOCKWINDOWUPDATE | NativeMethods.DCX_CACHE); 2019UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, dc));
winforms\Managed\System\WinForms\Cursor.cs (2)
500new HandleRef(this, handle), drawWidth, drawHeight, 0, NativeMethods.NullHandleRef, NativeMethods.DI_NORMAL); 580handle = SafeNativeMethods.LoadCursor(NativeMethods.NullHandleRef, nResourceId);
winforms\Managed\System\WinForms\DataGrid.cs (1)
5857IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE);
winforms\Managed\System\WinForms\DataGridViewMethods.cs (2)
5767IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE); 5788IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE);
winforms\Managed\System\WinForms\DataObject.cs (2)
146IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 170UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC));
winforms\Managed\System\WinForms\DateTimePicker.cs (1)
1574UnsafeNativeMethods.EnumChildWindows(new HandleRef(this, Handle), cb, NativeMethods.NullHandleRef);
winforms\Managed\System\WinForms\ErrorProvider.cs (1)
1074SafeNativeMethods.DrawIconEx(new HandleRef(this, mirrordc.Hdc), bounds.X - windowBounds.X, bounds.Y - windowBounds.Y, new HandleRef(provider.Region, provider.Region.IconHandle), bounds.Width, bounds.Height, 0, NativeMethods.NullHandleRef, NativeMethods.DI_NORMAL);
winforms\Managed\System\WinForms\FontDialog.cs (4)
557IntPtr screenDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 573UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC)); 685IntPtr screenDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 708UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC));
winforms\Managed\System\WinForms\Form.cs (7)
1778SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.NullHandleRef, 5117SafeNativeMethods.SetWindowPos(new HandleRef(this, HandleInternal), NativeMethods.NullHandleRef, e.SuggestedRectangle.X, e.SuggestedRectangle.Y, e.SuggestedRectangle.Width, e.SuggestedRectangle.Height, NativeMethods.SWP_NOZORDER | NativeMethods.SWP_NOACTIVATE); 6429HandleRef ownerHwnd = NativeMethods.NullHandleRef; 6523UnsafeNativeMethods.SetMenu(new HandleRef(this, Handle), NativeMethods.NullHandleRef); 6565UnsafeNativeMethods.SetMenu(new HandleRef(this, this.Handle), NativeMethods.NullHandleRef); 6830SafeNativeMethods.RedrawWindow(new HandleRef(this, Handle), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME); 7776UnsafeNativeMethods.SetWindowLong(hRef, NativeMethods.GWL_HWNDPARENT, NativeMethods.NullHandleRef);
winforms\Managed\System\WinForms\Help.cs (1)
249SafeNativeMethods.HtmlHelp(NativeMethods.NullHandleRef, pathAndFileName, HH_DISPLAY_TOPIC, (string)null);
winforms\Managed\System\WinForms\MaskedTextBox.cs (1)
2007SafeNativeMethods.RedrawWindow(new HandleRef(this, this.Handle), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME);
winforms\Managed\System\WinForms\MenuItem.cs (2)
1525IntPtr screendc = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 1534UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screendc));
winforms\Managed\System\WinForms\NativeWindow.cs (2)
764cp.Caption, cp.Style, cp.X, cp.Y, cp.Width, cp.Height, new HandleRef(cp, cp.Parent), NativeMethods.NullHandleRef, 1598bool ok = UnsafeNativeMethods.GetClassInfo(NativeMethods.NullHandleRef, className, wcls);
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (4)
1663SafeNativeMethods.SetWindowPos(new HandleRef(this.dropDownHolder, this.dropDownHolder.Handle), NativeMethods.NullHandleRef, loc.X, loc.Y, size.Width, size.Height, flags); 4977NativeMethods.NullHandleRef, 5060NativeMethods.NullHandleRef, 7158NativeMethods.NullHandleRef,
winforms\Managed\System\WinForms\RichTextBox.cs (3)
2949hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 2956UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC)); 3789UnsafeNativeMethods.ILockBytes pLockBytes = UnsafeNativeMethods.CreateILockBytesOnHGlobal(NativeMethods.NullHandleRef, true);
winforms\Managed\System\WinForms\Screen.cs (1)
124SafeNativeMethods.EnumDisplayMonitors(NativeMethods.NullHandleRef, null, proc, IntPtr.Zero);
winforms\Managed\System\WinForms\ScrollableControl.cs (1)
881NativeMethods.NullHandleRef,
winforms\Managed\System\WinForms\SplitContainer.cs (1)
1636IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE);
winforms\Managed\System\WinForms\Splitter.cs (1)
773IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(ParentInternal, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE);
winforms\Managed\System\WinForms\TextBox.cs (1)
608SafeNativeMethods.RedrawWindow(new HandleRef(this, this.Handle), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME);
winforms\Managed\System\WinForms\ToolBar.cs (2)
1556UnsafeNativeMethods.MapWindowPoints(new HandleRef(nmTB.hdr, nmTB.hdr.hwndFrom), NativeMethods.NullHandleRef, ref rc, 2); 1753SafeNativeMethods.SetWindowPos(new HandleRef(null, note.hwndFrom), NativeMethods.NullHandleRef, leftTop.x, leftTop.y, 0, 0, NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOZORDER | NativeMethods.SWP_NOACTIVATE);
winforms\Managed\System\WinForms\ToolStrip.cs (6)
4127UnsafeNativeMethods.SetFocus(NativeMethods.NullHandleRef); 5218private HandleRef cachedItemHDC = NativeMethods.NullHandleRef; 5220private HandleRef cachedItemBitmap = NativeMethods.NullHandleRef; 5261cachedItemBitmap = NativeMethods.NullHandleRef; 5267cachedItemHDC = NativeMethods.NullHandleRef; 5268cachedItemBitmap = NativeMethods.NullHandleRef;
winforms\Managed\System\WinForms\ToolStripDropDown.cs (1)
2234SafeNativeMethods.RedrawWindow(activeHwndHandleRef, null, NativeMethods.NullHandleRef, NativeMethods.RDW_FRAME | NativeMethods.RDW_INVALIDATE);
winforms\Managed\System\WinForms\ToolStripManager.cs (5)
733private HandleRef _activeHwnd = NativeMethods.NullHandleRef; // the window that was active when we showed the dropdown 734private HandleRef _lastActiveWindow = NativeMethods.NullHandleRef; // the window that was last known to be active 920ActiveHwndInternal = NativeMethods.NullHandleRef; 927SafeNativeMethods.ShowCaret(NativeMethods.NullHandleRef); 1174SafeNativeMethods.HideCaret(NativeMethods.NullHandleRef);
winforms\Managed\System\WinForms\ToolStripTextBox.cs (3)
721HandleRef hNonClientRegion = NativeMethods.NullHandleRef; 722HandleRef hClientRegion = NativeMethods.NullHandleRef; 723HandleRef hTotalRegion = NativeMethods.NullHandleRef;
winforms\Managed\System\WinForms\TreeView.cs (2)
2045SafeNativeMethods.SetWindowPos(new HandleRef(this, this.Handle), NativeMethods.NullHandleRef, this.Left, this.Top, Int32.MaxValue, this.Height, flags); 2051SafeNativeMethods.SetWindowPos(new HandleRef(this, this.Handle), NativeMethods.NullHandleRef, this.Left, this.Top, oldSize, this.Height, flags);
winforms\Managed\System\WinForms\UnsafeNativeMethods.cs (1)
1320return System.Internal.HandleCollector.Add(IntCreateDC(lpszDriver, null, null, NativeMethods.NullHandleRef), NativeMethods.CommonHandles.HDC);
winforms\Managed\System\WinForms\VisualStyles\VisualStyleRenderer.cs (1)
948lastHResult = SafeNativeMethods.HitTestThemeBackground( new HandleRef( this, Handle ), hdc, part, state, (int) options, new NativeMethods.COMRECT( backgroundRectangle ), NativeMethods.NullHandleRef, point, ref htCode );
winforms\Managed\System\WinForms\WebBrowserHelper.cs (4)
117IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 120UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC)); 135IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 138UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC));
winforms\Managed\System\WinForms\WinFormsUtils.cs (1)
616HandleRef hOriginalClippingRegion = NativeMethods.NullHandleRef;