So, in the constructor for CFileDialog, you can set the dwFlags parameter to OFN_ALLOWMULTISELECT. It's just that in order to actually get a few file names back, you need to change the m_ofn.lpstrFile member in CFileDialog to point to the allocated buffer. Look at here:
http://msdn.microsoft.com/en-us/library/wh5hz49d(VS.80).aspx
, , :
void CMainFrame::OnFileOpen()
{
char strFilter[] = { "Rule Profile (*.txt)|*.txt*||" };
CFileDialog FileDlg(TRUE, "txt", NULL, OFN_ALLOWMULTISELECT, strFilter);
CString str;
int nMaxFiles = 256;
int nBufferSz = nMaxFiles*256 + 1;
FileDlg.GetOFN().lpstrFile = str.GetBuffer(nBufferSz);
if( FileDlg.DoModal() == IDOK )
{
int pos = str.Find(' ', 0);
if ( pos == -1 );
CString FilePath = str.Left(pos);
while ( (pos = str.Find(' ', pos)) != -1 )
{
}
}
else
return;
}