47 references to SelectObject
System.Windows.Forms (47)
winforms\Managed\System\WinForms\ContainerControl.cs (2)
755HandleRef hfontOld = new HandleRef(this, SafeNativeMethods.SelectObject(hdc, hfont)); 775SafeNativeMethods.SelectObject(hdc, hfontOld);
winforms\Managed\System\WinForms\Control.cs (4)
19254hOriginalBmp = new HandleRef(this, SafeNativeMethods.SelectObject(hBitmapDC, hBitmap)); 19271SafeNativeMethods.SelectObject(hBitmapDC, hOriginalBmp); 19304HandleRef hBitmap = new HandleRef(this, SafeNativeMethods.SelectObject(hdcSrc, hNullBitmap)); 19309SafeNativeMethods.SelectObject(hdcSrc, hBitmap);
winforms\Managed\System\WinForms\ControlPaint.cs (15)
215IntPtr previousBitmap = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, hBitmap)); 311IntPtr previousSourceBitmap = SafeNativeMethods.SelectObject(new HandleRef(null, source), new HandleRef(null, monochromeMask)); 312IntPtr previousTargetBitmap = SafeNativeMethods.SelectObject(new HandleRef(null, target), new HandleRef(null, colorMask)); 326SafeNativeMethods.SelectObject(new HandleRef(null, source), new HandleRef(null, previousSourceBitmap)); 327SafeNativeMethods.SelectObject(new HandleRef(null, target), new HandleRef(null, previousTargetBitmap)); 1798IntPtr oldBrush = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, UnsafeNativeMethods.GetStockObject(NativeMethods.HOLLOW_BRUSH))); 1799IntPtr oldPen = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, pen)); 1804SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, oldBrush)); 1805SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, oldPen)); 1830IntPtr oldBrush = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, UnsafeNativeMethods.GetStockObject(NativeMethods.HOLLOW_BRUSH))); 1831IntPtr oldPen = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, pen)); 1838SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, oldBrush)); 1839SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, oldPen)); 2011IntPtr oldBrush = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, brush)); 2017SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, oldBrush));
winforms\Managed\System\WinForms\DataGrid.cs (2)
5859IntPtr saveBrush = SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, halftone)); 5861SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, saveBrush));
winforms\Managed\System\WinForms\DataGridViewMethods.cs (4)
5769IntPtr saveBrush = SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, halftone)); 5776SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, saveBrush)); 5790IntPtr saveBrush = SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, halftone)); 5792SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, saveBrush));
winforms\Managed\System\WinForms\DataObject.cs (4)
151IntPtr srcOld = SafeNativeMethods.SelectObject(new HandleRef(null, dcSrc), new HandleRef(bm, hBitmap)); 160IntPtr destOld = SafeNativeMethods.SelectObject(new HandleRef(null, dcDest), new HandleRef(null, hBitmapNew)); 165SafeNativeMethods.SelectObject(new HandleRef(null, dcSrc), new HandleRef(null, srcOld)); 166SafeNativeMethods.SelectObject(new HandleRef(null, dcDest), new HandleRef(null, destOld));
winforms\Managed\System\WinForms\Design\ComponentEditorForm.cs (3)
712hfontOld = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(Parent, ((Control)Parent).FontHandle)); 770SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, hfontOld)); 834IntPtr hbrushOld = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(this, hbrushDither));
winforms\Managed\System\WinForms\ListView.cs (3)
2518SafeNativeMethods.SelectObject(new HandleRef(nmcd->nmcd, nmcd->nmcd.hdc), new HandleRef(odCacheFontHandleWrapper, odCacheFontHandleWrapper.Handle)); 2842SafeNativeMethods.SelectObject(new HandleRef(nmcd->nmcd, nmcd->nmcd.hdc), new HandleRef(null, odCacheFontHandle)); 2852SafeNativeMethods.SelectObject(new HandleRef(nmcd->nmcd, nmcd->nmcd.hdc), new HandleRef(odCacheFontHandleWrapper, odCacheFontHandleWrapper.Handle));
winforms\Managed\System\WinForms\PropertyGridInternal\GridEntry.cs (2)
2210hfont = SafeNativeMethods.SelectObject(new HandleRef(g, hdc), new HandleRef(null, hfont)); 2236hfont = SafeNativeMethods.SelectObject(new HandleRef(g, hdc), new HandleRef(null, hfont));
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (2)
3876hFont = SafeNativeMethods.SelectObject(new HandleRef(DropDownListBox, hdc), new HandleRef(Font, hFont)); 3895hFont = SafeNativeMethods.SelectObject(new HandleRef(DropDownListBox, hdc), new HandleRef(Font, hFont));
winforms\Managed\System\WinForms\SplitContainer.cs (2)
1638IntPtr saveBrush = SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, halftone)); 1640SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, saveBrush));
winforms\Managed\System\WinForms\Splitter.cs (2)
775IntPtr saveBrush = SafeNativeMethods.SelectObject(new HandleRef(ParentInternal, dc), new HandleRef(null, halftone)); 777SafeNativeMethods.SelectObject(new HandleRef(ParentInternal, dc), new HandleRef(null, saveBrush));
winforms\Managed\System\WinForms\ToolStrip.cs (1)
5227IntPtr oldBitmap = SafeNativeMethods.SelectObject(cachedItemHDC,cachedItemBitmap);
winforms\Managed\System\WinForms\TreeView.cs (1)
2793SafeNativeMethods.SelectObject(new HandleRef(nmcd.nmcd, nmcd.nmcd.hdc), new HandleRef(renderinfo, renderinfo.FontHandle));