使用如下代码,为何不能完全删除CImageList中所有的图片 for (int i = 0; i <

问题描述:

使用如下代码,为何不能完全删除CImageList中所有的图片
for (int i = 0; i < m_myImageList.GetImageCount(); i++)
{
m_myImageList.Remove(i);
}

Remove会改变GetImageCount的结果, 你这个for循环相当凶险

0

Remove会改变GetImageCount的结果, 你这个for循环相当凶险