ExportPage Example for C++ 5.0 and later

void CSample_COMDlg::OnButton5()
{
   int nRet = pRasterDoc->ExportPage (pRaster, 0); 
   if (nRet == 0) 
      AfxMessageBox(TEXT("The engine exported the specified page."));
   else
      AfxMessageBox(TEXT("The engine couldn't export the specified page."));
}