Click here to Skip to main content
15,914,327 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: File Opening problem [modified] Pin
Stephen Hewitt22-May-06 21:38
Stephen Hewitt22-May-06 21:38 
GeneralRe: File Opening problem [modified] Pin
Hamid_RT22-May-06 22:03
Hamid_RT22-May-06 22:03 
GeneralRe: File Opening problem [modified] Pin
Laxman Auti22-May-06 22:03
Laxman Auti22-May-06 22:03 
GeneralRe: File Opening problem [modified] Pin
VinayCool22-May-06 22:14
VinayCool22-May-06 22:14 
AnswerRe: File Opening problem Pin
Hamid_RT22-May-06 21:33
Hamid_RT22-May-06 21:33 
GeneralRe: File Opening problem [modified] Pin
Stephen Hewitt22-May-06 21:37
Stephen Hewitt22-May-06 21:37 
GeneralRe: File Opening problem [modified] Pin
Hamid_RT22-May-06 21:50
Hamid_RT22-May-06 21:50 
GeneralRe: File Opening problem Pin
VinayCool22-May-06 21:38
VinayCool22-May-06 21:38 
Hi WhiteSky,

below is the function which i have used can u please what the error in it

<br />
void CSearchDlg::OnDblclkSout() <br />
{<br />
	// TODO: Add your control notification handler code here<br />
<br />
	// Code to open the selected file.<br />
	int d;<br />
	d=m_SOUT.GetCurSel();<br />
	CString FName;<br />
	m_SOUT.GetText(d,FName); <br />
<br />
<br />
		char str[100];<br />
		int i,l,k,j,m;<br />
		strcpy(str, FName);<br />
<br />
		for (i=0;str[i]!='\0';i++)<br />
<br />
		{<br />
<br />
			if (str[i]=='\\')<br />
<br />
			{<br />
<br />
				l=i; k=0;<br />
				char str1[100];<br />
				if (str[l+1]=='\0')<br />
				{<br />
					str[l]='/';<br />
				}<br />
				else<br />
					{<br />
    					for (j=l+1;str[j]!='\0';j++)<br />
						{<br />
							str1[k]=str[j];<br />
							k++;<br />
<br />
						}<br />
				str1[k]='\0';<br />
				str[l]='/';<br />
				for (m=0;str1[m]!='\0';m++)<br />
				{<br />
<br />
					str[++l]=str1[m];<br />
<br />
				}<br />
<br />
			}<br />
<br />
			str[++l]='\0';<br />
			i=i++;<br />
<br />
		}<br />
	<br />
	}<br />
			m_ctrlEDIT.SetWindowText(str);<br />
		<br />
	ShellExecute(NULL, "open", str ,NULL, NULL, SW_SHOWNORMAL);	<br />
<br />
	<br />
}<br />
<br />

GeneralRe: File Opening problem Pin
Stephen Hewitt22-May-06 21:47
Stephen Hewitt22-May-06 21:47 
GeneralRe: File Opening problem Pin
VinayCool22-May-06 21:55
VinayCool22-May-06 21:55 
GeneralRe: File Opening problem Pin
Hamid_RT22-May-06 21:57
Hamid_RT22-May-06 21:57 
GeneralRe: File Opening problem Pin
VinayCool22-May-06 22:23
VinayCool22-May-06 22:23 
GeneralRe: File Opening problem Pin
Hamid_RT22-May-06 22:32
Hamid_RT22-May-06 22:32 
GeneralRe: File Opening problem Pin
VinayCool22-May-06 22:56
VinayCool22-May-06 22:56 
GeneralRe: File Opening problem Pin
Hamid_RT23-May-06 0:00
Hamid_RT23-May-06 0:00 
GeneralRe: File Opening problem Pin
VinayCool23-May-06 0:19
VinayCool23-May-06 0:19 
GeneralRe: File Opening problem Pin
Hamid_RT23-May-06 1:20
Hamid_RT23-May-06 1:20 
GeneralRe: File Opening problem [modified] Pin
VinayCool23-May-06 1:27
VinayCool23-May-06 1:27 
GeneralRe: File Opening problem [modified] Pin
Hamid_RT23-May-06 1:46
Hamid_RT23-May-06 1:46 
GeneralRe: File Opening problem [modified] Pin
VinayCool23-May-06 1:51
VinayCool23-May-06 1:51 
GeneralRe: File Opening problem [modified] Pin
VinayCool23-May-06 1:56
VinayCool23-May-06 1:56 
GeneralRe: File Opening problem [modified] Pin
Hamid_RT23-May-06 2:05
Hamid_RT23-May-06 2:05 
AnswerRe: File Opening problem Pin
knoxplusplus23-May-06 5:38
knoxplusplus23-May-06 5:38 
Questionrecv and send in different size problem [modified] Pin
followait22-May-06 20:45
followait22-May-06 20:45 
GeneralRe: recv and send in different size problem Pin
Laxman Auti22-May-06 21:04
Laxman Auti22-May-06 21:04 

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.