Available in the LEADTOOLS Imaging toolkit. |
OptionsFileType Example for C++ 5.0 and later
void CDialogs::OnFiledialogsOptiontype() { UpdateData(true); m_pRasterDlgFile->PutDialogTitle("LEADTOOLS Open dialog box"); m_pRasterDlgFile->InitialDir = "c:\\images"; m_pRasterDlgFile->FileDlgFlags = 0; m_pRasterDlgFile->EnableShowPreview= true; m_pRasterDlgFile->EnableShowLoadOptions= true; m_pRasterDlgFile->LoadRotated= false; m_pRasterDlgFile->LoadCompressed= false; m_pRasterDlgFile->LoadPasses= 0; m_pRasterDlgFile->UIFlags = OPEN_SHOW_PROGRESSIVE | OPEN_SHOW_MULTIPAGE | OPEN_SHOW_LOADROTATED | OPEN_SHOW_LOADCOMPRESSED | OPEN_SHOW_FILEINFO | OPEN_SHOW_PREVIEW | OPEN_SHOW_DELPAGE | OPEN_SHOW_PDFOPTIONS | OPEN_SHOW_RASTEROPTIONS | OPEN_SHOW_VECTOROPTIONS | OPEN_SHOW_LOADOPTIONS | OPEN_VIEWTOTALPAGES | OPEN_LOADBITMAP | OPEN_GENERATETHUMBNAIL; m_pRasterDlgFile->Bitmap = m_pLead1.GetBitmap(); nRet = m_pRasterDlgFile->ShowOpenDlg((long)m_hWnd); if (nRet == 0 && m_pRasterDlgFile->DialogStatus == DLG_OK) { switch(m_pRasterDlgFile->GetOptionsFileType()) { case FILE_PCD: m_Edit1.Format(TEXT("%d"),m_pRasterDlgFile->PCDResolution); case FILE_RAS_PDF: case FILE_RAS_PDF_G3_1D: case FILE_RAS_PDF_G3_2D: case FILE_RAS_PDF_G4 : case FILE_RAS_PDF_JPEG: case FILE_RAS_PDF_JPEG_422: case FILE_RAS_PDF_JPEG_411: m_Edit1.Format(TEXT("%d"),m_pRasterDlgFile->PDFXResolution); m_Edit2.Format(TEXT("%d"),m_pRasterDlgFile->PDFYResolution); m_Edit3.Format(TEXT("%d"),m_pRasterDlgFile->PDFDisplayDepth); m_Edit4.Format(TEXT("%d"),m_pRasterDlgFile->PDFTextAlpha); m_Edit5.Format(TEXT("%d"),m_pRasterDlgFile->PDFGraphicsAlpha); case FILE_FPX: case FILE_FPX_SINGLE_COLOR: case FILE_FPX_JPEG: case FILE_FPX_JPEG_QFACTOR: case FILE_CMW: case FILE_JBIG: case FILE_JP2: case FILE_J2K: m_Edit1.Format(TEXT("%d"),m_pRasterDlgFile->RasterXResolution); m_Edit2.Format(TEXT("%d"),m_pRasterDlgFile->RasterYResolution); case FILE_WMF: case FILE_EMF: m_Edit1.Format(TEXT("%d"),m_pRasterFileDlg->WMFXResolution); m_Edit2.Format(TEXT("%d"),m_pRasterFileDlg->WMFYResolution); case FILE_DWF: case FILE_CGM: case FILE_VECTOR_DUMP: case FILE_DRW: case FILE_INTERGRAPH_VECTOR: case FILE_GERBER: m_Edit1.Format(TEXT("%d"),m_pRasterDlgFile->VectorViewportWidth); m_Edit2.Format(TEXT("%d"),m_pRasterDlgFile->VectorViewportHeight); m_Edit3.Format(TEXT("%d"),m_pRasterDlgFile->VectorViewportMode); m_Edit4.Format(TEXT("%d"),m_pRasterDlgFile->VectorFont); case FILE_DXF: case FILE_DWG: m_Edit1.Format(TEXT("%d"),m_pRasterDlgFile->DXFViewportWidth); m_Edit2.Format(TEXT("%d"),m_pRasterDlgFile->DXFViewportHeight); m_Edit3.Format(TEXT("%d"),m_pRasterDlgFile->DXFViewportMode); m_Edit4.Format(TEXT("%d"),m_pRasterDlgFile->DXFFont); m_Edit5.Format(TEXT("%d"),m_pRasterDlgFile->DXFAutoCADColorScheme); case FILE_PLT: m_Edit1.Format(TEXT("%d"),m_pRasterDlgFile->PLTViewportWidth); m_Edit2.Format(TEXT("%d"),m_pRasterDlgFile->PLTViewportHeight); m_Edit3.Format(TEXT("%d"),m_pRasterDlgFile->PLTViewportMode); m_Edit4.Format(TEXT("%d"),m_pRasterDlgFile->PLTFont); } for(int i = 0;i< 7 ;++i) { m_Edit1.Format(TEXT("[%d]"),m_pRasterDlgFile->GetPLTPenWidth(i)); m_Edit1.Format(TEXT("[%d]"),m_pRasterDlgFile->GetPLTPenColor(i)); } } UpdateData(false); }