|
I think is quite clear what he means:
Debug (compile and run) only one function without having to build+run the whole app; may be passing it some arguments using some kind of dialog.
Im googling the same subject.
I think that a good solution would be to call that function just at the beginning of your app and use a breakpoint as they say.
Reegards.
|
|
|
|
|
hi
i have a application in windows mobile .
when i click a button it opens a file (if the file name is there )..It works .
Now the problem is that when there is no filename a message shows that "this file name does not exist" . at the same time ,previous file is opened in there .
please help how to close the file after i read it ..
advaned thanks
guru moorthy.k
k.guru moorthy
|
|
|
|
|
Since my CPMRU (Code Project Mind Reader Unit) is out of order, could you please post the relevant code?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
SHELLEXECUTEINFO info;
info.cbSize = sizeof(info);
info.hwnd = NULL;
info.lpVerb = _T("open");
info.lpFile = _T(L"\\Programs\\File Explorer\\sample.pdf")
info.lpParameters = _T("");
info.lpDirectory = _T("");
info.nShow = SW_SHOW;
ShellExecuteEx(&info);
this is for pocket pc ... It works prpoerly but when give wrong file name , it diaplays message box like "the file name is not exist "
and also it shows the previous file opened .
help me
k.guru moorthy
|
|
|
|
|
If you need to close the formerly open documents, then you have to terminate the process whose handle corrensponds to the one returned (if any) by hProcess member of SHELLEXECUTEINFO . But gracefully terminating such process isn't a simple task (at least IMHO).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
also adding to CPallini'd reply
guru moorthy.k wrote: Now the problem is that when there is no filename a message shows that "this file name does not exist" .
set SEE_MASK_FLAG_NO_UI to fMask of SHELLEXECUTEINFO to avoid getting the error dialog
|
|
|
|
|
And why don't you simply check if the file exist before opening it ?
|
|
|
|
|
What the hell are you talking about ?
How do you open your file ?
Where is this message coming form ? Do your program display it ?
You really need to explain your problem in a nore understandable way...
|
|
|
|
|
Hi developers....I have one query regarding to my project...
How to generate serial numbers in file?
Thanks n Advance
raju.k
|
|
|
|
|
Rajesh has answered you with the code snippet 1 hour ago!
Maxwell Chen
|
|
|
|
|
|
sorry rajesh i am not getting ur code ..becoz i am not searching ..its my fault ..plz dont use strong word it hurt it ..i am not a specialist in this
domain just i am fresher ..plz dont do it ..
raju.k
|
|
|
|
|
CStdioFile csf;
CFileException cfe;
CString str, sTemp;
CStringArray csa;
int iSize=0, iVer=0;
if ( !csf.Open(_T("E:\\Some.txt"), CFile::modeReadWrite, &cfe) )
AfxMessageBox(_T("Failed to open the file"));
while(csf.ReadString(str))
{
sTemp = str;
str.Format(_T("%d. %s"), iVer+1, sTemp);
csa.Add(str);
++iVer;
}
csf.SeekToBegin();
iSize = csa.GetSize();
for(int i=1; i<=iSize; ++i)
{
sTemp.Format(_T("%s\n"), csa.GetAt(i-1));
csf.WriteString(sTemp);
}
csf.Close();
1. Copy paste the above code into your project.
2. Change the path of the file name.
3. Compile and run.
4. I pity your employer.
Seriously, if you are not good at something, you should not take that as your profession.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
thanks ..rajesh i ll try my level best ..and plz give ur advice ...
raju.k
|
|
|
|
|
There's no advice. Just copy paste the code and use it.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
That hurts? You do not know John Simmons, do you?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
sorry rajesh i dont know whos jhon simmons.....
raju.k
|
|
|
|
|
raju.k wrote: i dont know whos jhon simmons.....
You're a lucky guy.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
y ?i cant get it wat u saying ...mr.pallini
raju.k
|
|
|
|
|
Oh, don't worry, just kidding. Anyway John Simmons [^] is a CP's MVP, quite popular for his answers.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
modified on Wednesday, January 30, 2008 5:39:17 AM
|
|
|
|
|
It points to your own page. Here[^] is the correct link.
|
|
|
|
|
Thanks, I don't know if the Firefox address bar or my famous double personality made it.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
raju.k wrote: y ?i cant get it wat u saying ...mr.pallini
well, it means you are lucky not to have john simmons replying to your posts. Rajesh's reply was kind to you. If you think Rajesh's words were hard to digest and it hurt you, then I am sure you will be hurt more if john replies to you. Beware of his wrath.
Regards,
Vijay.
|
|
|
|
|
|
raju.k wrote: i am not getting ur code
Then ask questions about what you are not understand about it rather than asking your original question over and over again. That'll get you ignored real fast.
raju.k wrote: becoz i am not searching
What's to search for? The code has been provided...multiple times.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|