CImageList::SetImageCount
呼叫此成員函式重設影像的數目。 CImageList 物件的。
BOOL SetImageCount(
UINT uNewCount
);
參數
- uNewCount
指定影像的新總數值在影像清單。
傳回值
如果不是零,則成功,則為零。
備註
如果您呼叫此成員函式將影像數目影像清單中的,然後呼叫每個影像的 取代 指派新的索引有效影像。 如果您沒有指派索引有效影像,建立新的影像繪製作業將無法預期。
使用這個函式,則會降低影像清單的大小,會被截斷的影像中釋放。
範例
// Set the image count of the image list to be 10 with
// all images being the system question mark icon.
m_myImageList.SetImageCount(10);
HICON hIcon = AfxGetApp()->LoadStandardIcon(IDI_QUESTION);
for (int i=0;i < 10;i++)
{
m_myImageList.Replace(i, hIcon);
}
需求
Header: afxcmn.h