CFileDialog MULTISELECT
-
Hi Gang, I was wondering if anybody has a sample of a CFileDialog where I can select more than 12 items. It reliably selects 12, just nothing more. When more are highlighted, it just returns nothing. Any ideas? Env: VC6,sp5,XP/SP1 Thanks, Nick
-
Hi Gang, I was wondering if anybody has a sample of a CFileDialog where I can select more than 12 items. It reliably selects 12, just nothing more. When more are highlighted, it just returns nothing. Any ideas? Env: VC6,sp5,XP/SP1 Thanks, Nick
-
Hi Gang, I was wondering if anybody has a sample of a CFileDialog where I can select more than 12 items. It reliably selects 12, just nothing more. When more are highlighted, it just returns nothing. Any ideas? Env: VC6,sp5,XP/SP1 Thanks, Nick
You need to allocate enough memory for the lpstrFileTitle member of the OPENFILENAME struct as well change the nMaxFile member! Nish
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
-
You need to allocate enough memory for the lpstrFileTitle member of the OPENFILENAME struct as well change the nMaxFile member! Nish
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
Nishant S wrote: You need to allocate enough memory for the lpstrFileTitle member of the OPENFILENAME struct as well change the nMaxFile member! Nish Hey Nish, do you by chance have a quickie example? My program keeps excepting. I'm sure it's something simple. Thanks for the help, Nick
-
Nishant S wrote: You need to allocate enough memory for the lpstrFileTitle member of the OPENFILENAME struct as well change the nMaxFile member! Nish Hey Nish, do you by chance have a quickie example? My program keeps excepting. I'm sure it's something simple. Thanks for the help, Nick
Hi Nick, the following code allows you to open multiple files in a MDI app. Tabbing got lost :)
void CManagerApp::OnFileOpen() { // Query files to open CFileDialog dlg(true, _T("process"), NULL, OFN_ALLOWMULTISELECT | OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY, _T("Process definitions (*.process)||")); DWORD dwMaxFile = 4096; dlg.m_ofn.nMaxFile = dwMaxFile; LPTSTR pszFilenames = new TCHAR[dwMaxFile]; dlg.m_ofn.lpstrFile = pszFilenames; dlg.m_ofn.lpstrFile[0] = NULL; if (dlg.DoModal() == IDOK) { // Open selected file(s) POSITION pos = dlg.GetStartPosition(); while(pos) OpenDocumentFile(dlg.GetNextPathName(pos)); } delete[] pszFilenames; }
Alwin