GetPageTypeCompressionInfo Example VC++

This example demonstrates how to read and retain all current compression settings. In the event that another application makes changes to these settings at runtime, the saved values can be restored.

void CNewscanDlg::OnGetcompression() 
{
    // Option Base 1
    long lCompInfo[6];
    long iCompType[6];
    int iCompPref, iImgType;
    iCompPref = ImgScan1.GetCompressionPreference();
    // Using intImgType to loop through 6 times (for each page type) 
    // and also as the input parameter to the methods.
    for(iImgType = 0; iImgType < 6 ; iImgType++)
        {
        iCompType[iImgType] = ImgScan1.GetPageTypeCompressionType(iImgType+1);
        lCompInfo[iImgType] = ImgScan1.GetPageTypeCompressionInfo(iImgType+1);
        }
}