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