ShowDirectoryDlg Example for C++ 5.0 and later
void CDialogs::OnShowDirectoryDlg()
{
int nRet;
m_pRasterFileDlg->Directory= "c:\\images\\";
m_pRasterFileDlg->Filter= "ALL|*.*|LEAD|*.cmp|JPEG|*.JPG";
m_pRasterFileDlg->DialogTitle = "Select a Directory Please";
m_pRasterFileDlg->EnableMethodErrors= false;
nRet= m_pRasterFileDlg->ShowDirectoryDlg((long)this->m_hWnd);
if ( nRet == 0 && m_pRasterFileDlg->DialogStatus ==DLG_OK )
{
MessageBox( m_pRasterFileDlg->Directory );
}
}
void CRasterFileDlgSink::OnDlgHelp (long DlgFrom, long CtlID)
{
switch(DlgFrom)
{
case HELP_FILESASSOCIATION:
AfxMessageBox(TEXT("'Help from FilesAssociation dialog "));
break;
case HELP_OPEN:
AfxMessageBox(TEXT("Help from Open dialog "));
case HELP_SAVE:
AfxMessageBox(TEXT("Help from Save dialog "));
break;
case HELP_FILECONVERSION:
AfxMessageBox(TEXT("Help from FileConversion dialog "));
case HELP_FILESASSOCIATION:
AfxMessageBox(TEXT("Help from FilesAssociation dialog "));
break;
case HELP_PRINTPREVIEW:
AfxMessageBox(TEXT("Help from PrintPreview dialog "));
case HELP_PRINTSTITCHEDIMAGES:
AfxMessageBox(TEXT("Help from PrintStitchedImages dialog "));
}
}