加载一个指定路径的位图到CBit地图中

加载一个指定路径的位图到CBitmap中CImageList m_imlistm_imlist.Create(27,26,ILC_COLOR8,2,2)CBitmap

加载一个指定路径的位图到CBitmap中

CImageList m_imlist;
 m_imlist.Create(27,26,ILC_COLOR8,2,2);
 
 CBitmap bmp[2];
 HBITMAP hbmp=(HBITMAP)::LoadImage(NULL,"e:\\1.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE);
 if (hbmp==NULL)
 {
 MessageBox("err");
 return ;
 }
 bmp[0].Attach(hbmp);
 bmp[1].Attach(hbmp);
 
 m_imlist.Add(&bmp[0],RGB(0,0,0));
 m_imlist.Add(&bmp[1],RGB(0,0,0));
 
 m_TreeCtrl.SetImageList(&m_imlist,TVSIL_NORMAL);
 
 m_TreeCtrl.ModifyStyle(0,TVS_HASBUTTONS|TVS_HASLINES);
 HTREEITEM root=m_TreeCtrl.InsertItem(_T("我的好友"),0,0);

在线聊 。。

[解决办法]
CImageList m_imlist;这个是在哪里定义的?局部变量?还是某一个类的成员变量?