Click here to Skip to main content
15,895,871 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Capturing type of file Pin
Iain Clarke, Warrior Programmer8-Sep-06 0:20
Iain Clarke, Warrior Programmer8-Sep-06 0:20 
QuestionRe: Capturing type of file Pin
David Crow8-Sep-06 3:21
David Crow8-Sep-06 3:21 
Questionhow to find hidden windows restricted due to mandatory profile Pin
yang__lee8-Sep-06 0:00
yang__lee8-Sep-06 0:00 
QuestionSocket programming -2 Pin
Kiran Pinjala7-Sep-06 23:53
Kiran Pinjala7-Sep-06 23:53 
AnswerRe: Socket programming -2 Pin
Steve S8-Sep-06 0:47
Steve S8-Sep-06 0:47 
QuestionHow to install SNMP services through MFC? Pin
Aryan S7-Sep-06 23:53
Aryan S7-Sep-06 23:53 
AnswerRe: How to install SNMP services through MFC? Pin
Hamid_RT8-Sep-06 8:33
Hamid_RT8-Sep-06 8:33 
QuestionOpen File Dailog with Multiple Files Selection Pin
Andy Rama7-Sep-06 23:37
Andy Rama7-Sep-06 23:37 
Hi to all,
I want to implement an Open File Dailog to select multiple files.
I have written code (following), but when I select more files ( i tried for more than 12 files) then control goes to return;.
I think it cause due to numbers of characters in all file path; As when same code i tried for other files with long file name & located at long location(long file path), control goes to return; when I select more than 4 files.

What might be the problem? Help me.

CFileDialog m_Open_Dialog(1,0,0,OFN_ALLOWMULTISELECT | OFN_EXPLORER ,"Text Files (*.txt)|*.txt||",0);<br />
<br />
	if(m_Open_Dialog.DoModal() != IDOK)<br />
		return;<br />
<br />
	CString m_strPath;<br />
	char *sFile_Name = m_Open_Dialog.m_ofn.lpstrFile;<br />
	int iCount =0;<br />
<br />
// FOR SINGLE FILE SELECTION<br />
	if( strlen(m_Open_Dialog.m_ofn.lpstrFileTitle) != 0)<br />
	{<br />
		m_strPath.Format("%s",sFile_Name);<br />
		iCount++;<br />
		return;<br />
	}<br />
<br />
	sFile_Name += ( strlen(sFile_Name) + 1);<br />
<br />
// FOR MULIPLE FILE SELECTION<br />
	do<br />
	{<br />
		m_strPath.Format("%s",sFile_Name);<br />
		iCount++;<br />
<br />
		sFile_Name += ( strlen(sFile_Name) + 1);<br />
	}while(strlen(sFile_Name)!=0);<code><br />
<br />
Thanks & Best regards,<br />
  Aniket Salunkhe

AnswerRe: Open File Dailog with Multiple Files Selection Pin
tanvon malik8-Sep-06 0:05
tanvon malik8-Sep-06 0:05 
GeneralRe: Open File Dailog with Multiple Files Selection Pin
Andy Rama8-Sep-06 1:16
Andy Rama8-Sep-06 1:16 
GeneralRe: Open File Dailog with Multiple Files Selection Pin
David Crow8-Sep-06 3:26
David Crow8-Sep-06 3:26 
Questionfocus problem in dialog box Pin
kanna_p7-Sep-06 23:06
kanna_p7-Sep-06 23:06 
AnswerRe: focus problem in dialog box Pin
toxcct7-Sep-06 23:22
toxcct7-Sep-06 23:22 
QuestionRe: focus problem in dialog box Pin
kanna_p8-Sep-06 0:02
kanna_p8-Sep-06 0:02 
QuestionRe: focus problem in dialog box Pin
David Crow8-Sep-06 3:31
David Crow8-Sep-06 3:31 
QuestionSocket programming Pin
Kiran Pinjala7-Sep-06 23:02
Kiran Pinjala7-Sep-06 23:02 
QuestionTWAIN WIA driver problem Pin
majco3337-Sep-06 22:27
majco3337-Sep-06 22:27 
AnswerRe: TWAIN WIA driver problem Pin
majco3338-Sep-06 2:07
majco3338-Sep-06 2:07 
AnswerRe: TWAIN WIA driver problem Pin
majco33310-Sep-06 22:27
majco33310-Sep-06 22:27 
GeneralRe: TWAIN WIA driver problem Pin
majco33311-Sep-06 4:35
majco33311-Sep-06 4:35 
QuestionCould find 'iphlpapi.h' and 'iphlpapi.lib' Pin
Ranjan Shrestha7-Sep-06 22:00
Ranjan Shrestha7-Sep-06 22:00 
AnswerRe: Could find 'iphlpapi.h' and 'iphlpapi.lib' Pin
Sarath C7-Sep-06 22:47
Sarath C7-Sep-06 22:47 
AnswerRe: Could find 'iphlpapi.h' and 'iphlpapi.lib' Pin
Hamid_RT8-Sep-06 8:29
Hamid_RT8-Sep-06 8:29 
QuestionCMap with CString as Key Pin
anilksingh7-Sep-06 21:37
anilksingh7-Sep-06 21:37 
AnswerRe: CMap with CString as Key Pin
Naveen7-Sep-06 21:41
Naveen7-Sep-06 21:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.