SaveToFile example for C++ 5.0 and later
int i;
// select 2nd to 4th items
for(i=1; i<=3; ++i)
m_LEADImageList.Item (i).SetSelected(TRUE);
DeleteFile(TEXT("d:\\temp\\testing.tif"));
//save all selected items to a multipage file
m_LEADImageList.SaveToFile("d:\\temp\\testing.tif", FILE_TIF_CMP, 0, QFACTOR_QS, TRUE);
AfxMessageBox(TEXT("about to reload file"));
//clear list
m_LEADImageList.Clear();
//reload file
m_LEADImageList.LoadFromFile("d:\\temp\\testing.tif", 0, 1, -1);