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