Поделиться через


CPictureHolder::CreateFromIcon

Uses an icon to initialize the picture object in a CPictureHolder.

BOOL CreateFromIcon(
   UINT idResource 
);
BOOL CreateFromIcon(
   HICON hIcon,
   BOOL bTransferOwnership = FALSE 
);

Параметры

  • idResource
    Resource ID of a bitmap resource.

  • hIcon
    Handle to the icon from which the CPictureHolder object is created.

  • bTransferOwnership
    Indicates whether the picture object will take ownership of the icon object.

Возвращаемое значение

Nonzero if the object is successfully created; otherwise 0.

Заметки

If bTransferOwnership is TRUE, the caller should not use the icon object in any way after this call returns. If bTransferOwnership is FALSE, the caller is responsible for ensuring that the icon object remains valid for the lifetime of the picture object.

Требования

Header: afxwin.h

См. также

Основные понятия

CPictureHolder Class

CPictureHolder Members

Hierarchy Chart

CPictureHolder::CreateEmpty

CPictureHolder::CreateFromBitmap

CPictureHolder::CreateFromMetafile