我在OnCreate的代码是:
   CImageList imageList;
   CBitmap bitmap;
   bitmap.LoadBitmap(IDB_COOLBMP);
   imageList.Create(21, 20, ILC_COLORDDB|ILC_MASK, 13, 1);
   imageList.Add(&bitmap,RGB(255,0,255));
   m_hotToolBar.SendMessage(TB_SETIMAGELIST, 0, (LPARAM)imageList.m_hImageList);//运行出错
   imageList.Detach();//运行出错
   bitmap.Detach();   //运行出错
   什么原因。/
   IDB_COOLBMP对应得是一副位图。