public static IntPtr SelectObject(Standard.SafeDC hdc, Standard.SafeHBITMAP hgdiobj) { IntPtr ptr = _SelectObjectSafeHBITMAP(hdc, hgdiobj); if (ptr == IntPtr.Zero) { Standard.HRESULT.ThrowLastError(); } return(ptr); }
public static Standard.SafeHBITMAP CreateDIBSection(Standard.SafeDC hdc, ref Standard.BITMAPINFO bitmapInfo, out IntPtr ppvBits, IntPtr hSection, int dwOffset) { Standard.SafeHBITMAP ehbitmap = null; if (hdc == null) { ehbitmap = _CreateDIBSectionIntPtr(IntPtr.Zero, ref bitmapInfo, 0, out ppvBits, hSection, dwOffset); } else { ehbitmap = _CreateDIBSection(hdc, ref bitmapInfo, 0, out ppvBits, hSection, dwOffset); } if (ehbitmap.IsInvalid) { Standard.HRESULT.ThrowLastError(); } return(ehbitmap); }
private static extern IntPtr _SelectObjectSafeHBITMAP(Standard.SafeDC hdc, Standard.SafeHBITMAP hgdiobj);