CImageList::Attach

更新 : 2007 年 11 月

イメージ リストを CImageList オブジェクトに結び付けます。

BOOL Attach(
   HIMAGELIST hImageList 
);

パラメータ

  • hImageList
    イメージ リスト オブジェクトへのハンドル。

戻り値

正常終了した場合は 0 以外を返します。それ以外の場合は 0 を返します。

使用例

void AddQuestion(HIMAGELIST hmyImageList)
{
   CImageList imgList;

   // Attach the image list handle to the CImageList object.
   imgList.Attach(hmyImageList);

   // Add a new icon to the image list.
   imgList.Add(AfxGetApp()->LoadStandardIcon(IDI_QUESTION));

   // Detach the handle from the CImageList object.
   imgList.Detach();
}

必要条件

ヘッダー : afxcmn.h

参照

参照

CImageList クラス

階層図

CImageList::Detach

CImageList::GetSafeHandle

その他の技術情報

CImageList のメンバ