|
|
That does not seem a setting for project because I need to Choose "C/C++" tab -> "Preprocessor" category. In test opencv propery does not have C/C++ tab
|
|
|
|
|
C/C++ tab would be just right there under configuration properties.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
|
I won't click on another link if it ponits to a 2 Mb Bitmap. Why can't you upload it as a JPG?
And to solve your problem, is that an empty project[^]? The C/C++ settings applies for the files that belong to the properties of a project. So, if you don't have files, then the tab shouldn't appear. Try adding files to your project first.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
There are no settings for C++ because you don't have any files in the project. Add some files and the settings will appear.
-Saurabh
|
|
|
|
|
Hi All
I am useing SHFileOperation.Code is here
void CAbc::OnBnClickedButton1()
{
CString pzFrom=_T("C:\\Test\\");
CString psTo=_T("C:\\");
CopyFolder(pzFrom, psTo);
}
void CAbc::CopyFolder(LPCTSTR pszFrom, LPCTSTR pszTo)
{
SHFILEOPSTRUCT fos ={0};
fos.wFunc = FO_COPY;
fos.pTo = pszTo;
fos.pFrom = pszFrom;
::SHFileOperation(&fos);
}
Both Directory exits.I am geting Error this on Dailog Box
Could not find this item
This is no longer in C:\Test\.Verify the Item's location and try again.
I am not to figure out why this is happen.Becouse both directory exits.
Plz help me
|
|
|
|
|
Where's your name file in this code?
|
|
|
|
|
Sorry Sir i am not geting waht you want to know from me?Plz tell me
|
|
|
|
|
|
Plz help me it's urgent sir..
|
|
|
|
|
Hi,
There you have just specified two folders name.
What happened to the file name.
Because its SHFileOperation file operation..
|
|
|
|
|
TeVc++ wrote: urgent
For urgentz matterz plz askz CPallini. He willz helpz.
|
|
|
|
|
TeVc++ wrote: Plz help me it's urgent sir..
Of course when you use of this phrase you must be wait for CPallini but
your code is working for me:
SHFILEOPSTRUCT p={0};
p.wFunc = FO_COPY;
p.pTo = _T("c:\\");
p.pFrom = _T("c:\\2\\1");
SHFileOperation(&p);
You got this error because you use of p.pFrom = _T("c:\\2\\"); but you must be set a name after \\
|
|
|
|
|
Did you try to use flags for SHFILEOPSTRUCT, like FOF_MULTIDESTFILES ? Did you read the documentation?
|
|
|
|
|
Try this:
LPCTSTR lpFrom = _T("D:\\SymbianDev\\Test\0");
LPCTSTR lpTo = _T("D:\\SymbianDev\\Test1\0");
SHFILEOPSTRUCT fos ={0};
fos.wFunc = FO_COPY;
fos.pTo = lpTo;
fos.pFrom = lpFrom;
if(::SHFileOperation(&fos) == 0)
cout<<"SHFileOperation succeeded"<<endl;
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
modified on Friday, October 3, 2008 6:42 AM
|
|
|
|
|
One suggestion
Rajesh R Subramanian wrote: LPCTSTR lpFrom = _T("D:\\SymbianDev\\Test");
LPCTSTR lpTo = _T("D:\\SymbianDev\\Test1");
should end with two null characters
At least document says that i don't know if it works without that
Regards,
Sandip.
|
|
|
|
|
Luckily, it works. But that's a good point there. I will modify my previous post.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Hi all,
I am having a list(queue)of tasks. My two threads are using the same list.
First thread is to insert the task into it. (appending the list)
Second thread is to process on each task . ( reading the list)
My aim is to give the maximum availability to Thread one without hanging thread two.
How to synchronize both thread so that, second thread should not wait for long and First thread keep inserting the item into list.
Thanks in advance
|
|
|
|
|
critical section! look for CCriticalSection class in MFC!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
A piece of good advice is to stay clear of the MFC synchronization objects because they are not working properly. They may fail under certain circumstances.
E.g. you cannot recursively lock a CCriticalSection from the same thread because it will cause a deadlock.
Use the Win32 API with ::EnterCriticalSection() and ::LeaveCriticalSection() instead.
Read more here[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Roger Stoltz wrote: E.g. you cannot recursively lock a CCriticalSection from the same thread because it will cause a deadlock.
Wow, thanks for the info Roger. I've never used the MFC sync objects before but I don't think I will ever use them now.
|
|
|
|
|
Yup, pretty amazing, isn't it?
But the evidence is right there in the code.
I've never used the MFC sync classes since I read Joe's advice many years ago in a much earlier essay of his.
Even though CCriticalSection may work if it's only locked once in a call chain, you will eventually find yourself in a situation where you should perform a second lock due to encapsulation and at that time you're smoked; a re-write using the Win32 primitives is essential before it has a chance of working.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Hey Guys,
I have always used MFC, but now that I have upgraded to visual studio 2005 and 2008 I am forced to use MSI installers due to the depencies on the new merge modules. I really don't like the msi installer I think it's horrible and I would rather use inno setup or the old wise installer.
I just want to be sure.... If I was to start writing all my code in a pure Win32 Application from vs 2005 or 2008 I would no longer require the vcredist files in order to run my applications correct?
Thanks,
Greg
|
|
|
|
|
Your application will still depend on CRT DLL's.
You don't necessarily have to use MSI or other installers. You can always deploy you application using private assemblies. Read this article http://www.codeproject.com/KB/cpp/vcredists_x86.aspx[^], for more details. There is a section on "Install a private assembly".
-Saurabh
|
|
|
|