CPictureHolder::CreateFromBitmap

BOOL CreateFromBitmap( UINT idResource );

BOOL CreateFromBitmap( CBitmap* pBitmap, CPalette* pPal = NULL, BOOL bTransferOwnership = TRUE );

BOOL CreateFromBitmap( HBITMAP hbm, HPALETTE hpal = NULL );

Return Value

Nonzero if the object is successfully created; otherwise 0.

Parameters

idResource

Resource ID of a bitmap resource.

pBitmap

Pointer to a CBitmap object.

pPal

Pointer to a CPalette object.

bTransferOwnership

Indicates whether the picture object will take ownership of the bitmap and palette objects.

hbm

Handle to the bitmap from which the CPictureHolder object is created.

hpal

Handle to the palette used for rendering the bitmap.

Remarks

Uses a bitmap to initialize the picture object in a CPictureHolder. If bTransferOwnership is TRUE, the caller should not use the bitmap or palette object in any way after this call returns. If bTransferOwnership is FALSE, the caller is responsible for ensuring that the bitmap and palette objects remain valid for the lifetime of the picture object.

CPictureHolder OverviewClass MembersHierarchy Chart

See Also   CPictureHolder::CreateEmpty, CPictureHolder::CreateFromIcon, CPictureHolder::CreateFromMetafile