SaveResolutionCount example for C++ 5.0 and later

int i;
   CString csOut;
   CString cstmp;
ILEADRasterIO *pRasterIO=NULL;
CoCreateInstance(CLSID_LEADRasterIO, NULL, CLSCTX_ALL,
                 IID_ILEADRasterIO, (void**)&pRasterIO);

   // assume that our bitmap is 800 x 600
   // save 3 resolutions
   pRasterIO->PutSaveResolutionCount(3);

   pRasterIO->PutSaveResolutionWidth(0,800.0f);
   pRasterIO->PutSaveResolutionHeight(0,600.0f);
   pRasterIO->PutSaveResolutionWidth(1,400.0f);
   pRasterIO->PutSaveResolutionHeight(1,300.0f);
   pRasterIO->PutSaveResolutionWidth(2,200.0f);
   pRasterIO->PutSaveResolutionHeight(2,150.0f);

   // get the SaveResolution info

   csOut.Format(TEXT("SaveResolutionCount = %d"),
                pRasterIO->GetSaveResolutionCount());
   AfxMessageBox(csOut);

   csOut.Empty();
   for( i = 0; i<pRasterIO->GetSaveResolutionCount(); i++ )
   {
      cstmp.Format(TEXT("SaveResolution(%d) = %.2f x %.2f\n"),
                   i,
                   pRasterIO->GetSaveResolutionWidth(i),
                   pRasterIO->GetSaveResolutionHeight(i));
      csOut = csOut + cstmp;
   }
   AfxMessageBox(csOut);
pRasterIO->Release();