请问一下,我有一些icon格式图标,通过CImageList,ToolBar却显赤不出来,是什么原因?

解决方案 »

  1.   

    CImageList img;
    img.Create(32, 32, ILC_COLOR4|ILC_MASK,1,1); 
    img.Add(AfxGetApp()->LoadIconW(IDI_ICON_LOG));
    img.Add(AfxGetApp()->LoadIconW(IDI_ICON1));
    img.Add(AfxGetApp()->load);


    m_wndToolBar.GetToolBarCtrl().SetImageList(&img);
    我的图片是.ico,32*32,4位
    请帮我检查一下
      

  2.   

    多了一个img.Add(AfxGetApp()->load); 
      

  3.   

    你的img是不是全局变量,放到.h文件里去?
      

  4.   

    还有这个函数的参数看看
    ILC_COLOR4这个要不要改改ILC_COLOR8,ILC_COLOR16,ILC_COLOR24
    后面的两个参数我也忘了具体是什么意思 了,查下
    img.Create(32, 32, ILC_COLOR4|ILC_MASK,1,1);