1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| #define NB_FIC_MAX 15
CString filtre = _T("Tous les fichiers (*.*)|*.*||");
CFileDialog fileDialog(TRUE, NULL, NULL, OFN_ALLOWMULTISELECT | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST, filtre, this);
if (repertoire.GetLength())
fileDialog.m_ofn.lpstrInitialDir = repertoire;
fileDialog.m_ofn.lpstrTitle = _T("Sélectionnez le(s) fichier(s) à ajouter à la liste");
fileDialog.m_ofn.nMaxFile = NB_FIC_MAX * (_MAX_PATH + 1) + 1;
fileDialog.m_ofn.lpstrFile = new char[NB_FIC_MAX * (_MAX_PATH + 1) + 1];
*fileDialog.m_ofn.lpstrFile = 0;
if (fileDialog.DoModal() != IDOK)
return;
... |
Partager