共用方式為


CD2DBitmap::CD2DBitmap

Constructs a CD2DBitmap object from resource.

CD2DBitmap(
   CRenderTarget* pParentTarget,
   UINT uiResID,
   LPCTSTR lpszType = NULL,
   CD2DSizeU sizeDest = CD2DSizeU(0,
   0),
   BOOL bAutoDestroy = TRUE
);
CD2DBitmap(
   CRenderTarget* pParentTarget,
   LPCTSTR lpszPath,
   CD2DSizeU sizeDest = CD2DSizeU(0,
   0),
   BOOL bAutoDestroy = TRUE
);
CD2DBitmap(
   CRenderTarget* pParentTarget,
   HBITMAP hbmpSrc,
   CD2DSizeU sizeDest = CD2DSizeU(0,
   0),
   BOOL bAutoDestroy = TRUE
);
CD2DBitmap(
   CRenderTarget* pParentTarget,
   BOOL bAutoDestroy = TRUE
);

Parameters

  • pParentTarget
    A pointer to the render target.

  • uiResID
    The resource ID number of the resource.

  • lpszType
    Pointer to a null-terminated string that contains the resource type.

  • sizeDest
    Destination size of the bitmap.

  • bAutoDestroy
    Indicates that the object will be destroyed by owner (pParentTarget).

  • lpszPath
    Pointer to a null-terminated string that contains the name of file.

  • hbmpSrc
    Handle to the bitmap.

Requirements

Header: afxrendertarget.h

See Also

Reference

CD2DBitmap Class