Desktop Functions: Smart Device Functions:
|
Search Results for "HBitmap" in [All]gdi321: AlphaBlend
IntPtr pOrig = SelectObject(pSource, bmp.GetHbitmap(Color.Black)); 2: BitBlt
IntPtr pOrig = SelectObject(pSource, bmp.GetHbitmap()); hSection is a handle to a file mapping object that the function will use to create the DIB and can be NULL. If hSection is not NULL, it must be a handle to a file mapping object created by calling the CreateFileMapping function (otherwise CreateDIBSection will fail). Moreover, the CreateDIBSection function will locate the bitmap’s bit values at offset dwOffset in the file mapping object referred to by hSection. An application can retrieve the hSection handle by calling the GetObject function with the HBITMAP returned by CreateDIBSection.
gBrush = CreatePatternBrush(bB.GetHbitmap) 5: CreatePen IntPtr maskHbitmap = maskImage.GetHbitmap(); void PaintLine3(IntPtr hbitmap, Point start, Point end, bool erase)
IntPtr pOrig = SelectObject(pDC, hbitmap); 6: DeleteObject Call DeleteObject on a HBitmap object after using the GDI+ function:
public static Bitmap FromHbitmap(
IntPtr hbitmap FromHbitmap transfers a copy of the image bytes into returned Bitmap so it is important to call DeleteObject on the HBitmap to prevent two copies of the image from existing in the system. 7: GetObject Had a terrible time getting this to work to retrieve a BITMAP object from a HBITMAP, this code finally worked. GDI32.GetObject(hBitmap, Marshal.SizeOf<GDI32.BITMAP>(), ptrToBitmap); A better option than the above example would be to leverage Image.FromHbitmap Image.FromHbitmap Documentation on MSDN: https://msdn.microsoft.com/en-us/library/k061we7x 8: HBitmap
9: LineTo IntPtr maskHbitmap = maskImage.GetHbitmap(); void PaintLine3(IntPtr hbitmap, Point start, Point end, bool erase)
IntPtr pOrig = SelectObject(pDC, hbitmap); 10: MoveToEx IntPtr maskHbitmap = maskImage.GetHbitmap(); void PaintLine3(IntPtr hbitmap, Point start, Point end, bool erase)
IntPtr pOrig = SelectObject(pDC, hbitmap); 11: SetMapMode
public static extern int DeleteObject(int hBitmap); 12: StretchBlt
hbmp = bmp.GetHbitmap(); user3213: CreateCaret
static extern bool CreateCaret(IntPtr hWnd, IntPtr hBitmap, int nWidth,
Public Shared Function CreateCaret(ByVal hWnd As IntPtr, ByVal hBitmap As IntPtr, ByVal nWidth As Integer, ByVal nHeight As Integer) As Boolean
Public Shared Function CreateCaret(ByVal hWnd As IntPtr, ByVal hBitmap As IntPtr, ByVal nWidth As Integer, ByVal nHeight As Integer) As Boolean
Dim bmPtr As IntPtr = GetHBitmap()
The hBitmap parameter is a handle to the bitmap you want to use(or gray/solid).
Function GetHBitmap() As IntPtr
Return bm.GetHbitmap() 14: CreateIcon
IntPtr imgHandle = img.GetHbitmap();
IntPtr imgHandle = img.GetHbitmap(); 16: CreatePopupMenu
internal static extern int SetMenuItemBitmaps(HMenu hmenu, int nPosition, MFMENU uflags, IntPtr hBitmapUnchecked, IntPtr hBitmapChecked); 17: GetIconInfo
public IntPtr hbmMask; // (HBITMAP) Specifies the icon bitmask bitmap. If this structure defines a black and white icon,
public IntPtr hbmColor; // (HBITMAP) Handle to the icon color bitmap. This member can be optional if this
return Image.FromHbitmap(ii.hbmColor);
return Image.FromHbitmap(ii.hbmMask);
uint uFlags, IntPtr hBitmapUnchecked, IntPtr hBitmapChecked);
public static extern int SetMenuItemBitmaps(IntPtr hMenu, IntPtr nPosition, int wFlags, IntPtr hBitmapUnchecked, IntPtr hBitmapChecked);
IntPtr intp = bmp.GetHbitmap(); 19: ShowCaret
CreateCaret(listBox1.Handle,mybitmap.GetHbitmap(), 1, listBox1.Height);
IntPtr hBitmap = IntPtr.Zero;
hBitmap = bitmap.GetHbitmap(Color.FromArgb(0));
oldBitmap = Win32.SelectObject(memDc, hBitmap);
if (hBitmap != IntPtr.Zero)
Win32.DeleteObject(hBitmap); gdiplus
static extern int GdipCreateBitmapFromHBITMAP(HandleRef hbitmap,
Declare Function GdipCreateBitmapFromHBITMAP Lib "gdiplus.dll" (TODO) As TODO comctl3222: ImageList_Add
static extern bool ImageList_AddMasked(IntPtr hImageList, IntPtr hBitmap, int crMask);
Private Shared Function ImageList_AddMasked(hImageList As IntPtr, hBitmap As IntPtr, crMask As Integer) As Boolean
static extern bool ImageList_AddMasked(IntPtr hImageList, IntPtr hBitmap, int crMask); Interfaces24: ISharedBitmap
25: IShellItem
IntPtr hbitmap = IntPtr.Zero;
((IShellItemImageFactory)ppsi).GetImage(new SIZE(256, 256), 0x0, out hbitmap);
IntPtr hbitmap = IntPtr.Zero;
((IShellItemImageFactory)ppsi).GetImage(new SIZE(256, 256), 0x0, out hbitmap); 27: IUIImage
HRESULT CreateImage(IntPtr /* HBITMAP */ bitmap, UI_Ownership options, [Out(), MarshalAs(UnmanagedType.Interface)] out IUIImage image); Structures28: FORMATETC
// The storage medium is a Graphics Device Interface (GDI) component (HBITMAP).
' The storage medium is a Graphics Device Interface (GDI) component (HBITMAP). Enums29: UI_Ownership
Transfer = 0, // IUIImage now owns HBITMAP.
Copy = 1, // IUIImage creates a copy of HBITMAP. Caller still owns HBITMAP. |