Available in the LEADTOOLS Imaging toolkit. |
FilePageLoaded example for C++ 4.0 and later
// The following example loads the first five pages of a multipage file,
// and writes the individual pages as TIF files
// m_nCount is an integer member varaiable of the class
void CGetArrayInfoDlg::OnFilePageLoadedLeadctrl1()
{
CString strFileName;
m_nCount++;
strFileName.Format("d:\\erase\\mpage%d.TIF", m_nCount);
m_LEAD1.Save(strFileName, FILE_TIF, 0, 0, SAVE_OVERWRITE);
}
void CGetArrayInfoDlg::OnFilePageLoaded()
{
m_nCount = 0;
m_LEAD1.SetEnableFilePageLoadedEvent(TRUE);
m_LEAD1.Load("d:\\work\\images\\mtif.tif", 0, 0, 5);
m_LEAD1.SetEnableFilePageLoadedEvent(FALSE);
}