FileFormatsCount Example for C++ 5.0 and later
void CDialogs::OnFileSave()
{
m_pRasterFileDlg->DialogTitle = "Save a File";
m_pRasterFileDlg->InitialDir = "C:\\";
m_pRasterFileDlg->FileFormatsCount = 2;
m_pRasterFileDlg->GetFileFormats(0)->PutFormat(FF_SAVE_LEAD);
m_pRasterFileDlg->GetFileFormats(0)->PutBitsPerPixelCount(1);
m_pRasterFileDlg->GetFileFormats(0)->PutBitsPerPixelFormat(0,24);
m_pRasterFileDlg->GetFileFormats(0)->PutSubFormat(0,FF_SAVE_SUB_CMP_NONPROGRESSIVE | FF_SAVE_SUB_CMP_PROGRESSIVE);
m_pRasterFileDlg->GetFileFormats(1)->PutFormat(FF_SAVE_TIFF);
m_pRasterFileDlg->GetFileFormats(1)->PutBitsPerPixelCount(1);
m_pRasterFileDlg->GetFileFormats(1)->PutBitsPerPixelFormat(0,24);
m_pRasterFileDlg->GetFileFormats(1)->PutSubFormat(0,FF_SAVE_SUB_TIFF1_CCITT |
FF_SAVE_SUB_TIFF1_CCITT_G3_1D |
FF_SAVE_SUB_TIFF1_CCITT_G3_2D |
FF_SAVE_SUB_TIFF1_CCITT_G4 |
FF_SAVE_SUB_TIFF1_UNCOMPRESSEDRGB | FF_SAVE_SUB_TIFF1_RLERGB |
FF_SAVE_SUB_TIFF1_LZWRGB | FF_SAVE_SUB_TIFF1_JBIG);
m_pRasterFileDlg->UIFlags = SAVE_AUTOPROCESS |
SAVE_SHOW_FILEOPTIONS_PROGRESSIVE |
SAVE_SHOW_FILEOPTIONS_MULTIPAGE |
SAVE_SHOW_FILEOPTIONS_STAMP |
SAVE_SHOW_FILEOPTIONS_QFACTOR |
SAVE_SHOW_FILEOPTIONS_J2KOPTIONS |
SAVE_SHOW_FILEOPTIONS_BASICJ2KOPTIONS;
m_pRasterFileDlg->Bitmap = m_LeadRasterView.GetRaster ().GetBitmap ();
m_pRasterFileDlg->ShowSaveDlg ((long)this->m_hWnd);
}