|
Check this out.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
I have a dialog based application which was initially in C:\ drive. After running the project in C:\ drive for a couple of times, I made a copy of it in the D:\ drive and when I run open the project file in the D:\ drive (clicking on the .sln file) and if I put a break point in say the OnInitDialog() of a dialog class, when I run the project, this break point
automatically goes to the same function but to the project in the C:\ drive.
Also when I try to go to the declaration of any function by pressing F12 at the function definition, an resolve ambiguity dialog is shown and the function declarations of the project in C:\ and D:\ drive are listed. In the above mentioned scenario, files names of the project in the C:\ drive are
represented in lower case (tab name in the workspace)
How do i get over this issue?
I am using VS 2003 on XP.
|
|
|
|
|
Make sure that for every include in your source code, you supply relative paths and not absolute paths. Check that also for all the include directories if necessary in the project options.
|
|
|
|
|
Hi Cédric Moonen,
After reading your reply, I created a dialog based application using the Wizard(without adding any code) and the similar behaviour as described in my earlier post is observed.
Is there any setting in VS that I need to check for??
|
|
|
|
|
What do you mean ? So, you created a completely new dialog Based application on the D drive. When you put a breakpoint in one of your function, it points to a source file on the C drive ? That's impossible because you don't have a similar solution on your C drive
Could you explain clearly your problem ?
|
|
|
|
|
I create a project in the C:\ drive, run it once, then close the project.
Now make an extra copy the same project in the D:\ drive, then run this project in the D:\ drive. If I search for a string say OnInitDialog(), then in
my search result, I find that both the projects that in the C:\ and the D:\ are shown.
|
|
|
|
|
Hi all,
I'm looking for a function that can delete files by means of a wild card.
Is there such a functionIf so, can anyone please provide some more informationMany Thanks in advance
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
I do not think that there is a standard Win32 API function do to that. You would need to enumerate items using the wildcard and then delete matching items one by one.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Thanks James, do you know wheter a standard command exists to perform my previous asked question over FTP.
Many Thanks
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Only Command found: DELE - Delete file.
But this won't do the job ... Thanks anyway James
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Use SHFileOperation() .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi David, I have tried the following:
SHFILEOPSTRUCT wildcards;
wildcards.wFunc = FO_DELETE;
wildcards.hwnd=NULL;
wildcards.pFrom=(LPCTSTR)lpUpDownFiles[first].szUpFName;
wildcards.fFlags=FOF_FILESONLY;
SHFileOperation(wildcards);
But get the following error:
Error 7 error C2664: 'SHFileOperationA' : cannot convert parameter 1 from 'SHFILEOPSTRUCT' to 'LPSHFILEOPSTRUCTA'
Can you please help?
Many Thanks
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
The compiler is telling you the problem. SHFileOperation() is expectnng a pointer (to a SHFILEOPSTRUCT ).
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
No memory has been assigned to lpFileOp . Why aren't you using:
SHFILEOPSTRUCT lpFileOp = {0};
lpFileOp.wFunc = FO_DELETE;
lpFileOp.pFrom = (LPCTSTR)lpUpDownFiles[first].szUpFName;
lpFileOp.fFlags = FOF_FILESONLY;
SHFileOperation(&lpFileOp);
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi David ... What would I do in the following instance:
Run-Time Check Failure #3 - The variable 'lpFileOp' is being used without being initialized.
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
|
|
LOL the compilers telling you the answer but you won't take the time to stop and read it...too funny!;P
Yours Truly, The One and Only!
|
|
|
|
|
Can we find out the size of a structure without using sizeof function?
I have tried to write a macro passing the name of the structure as a parameter, but it did not work as expected!! Is there anyother way to do this?
Please provide your valuable suggestions and code(if possible).....
R@j@$eg@r
|
|
|
|
|
Yes.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Homework-time, eh?
Hint: You can get adresses of struct members...
Failure is not an option - it's built right in.
|
|
|
|
|
Even sizeof usage is hazardous on Win32 structures.
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.
|
|
|
|
|
Why?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Since we are working on generating metadata about a structure by supplying the name of the structure, and getting its size during run time!!
R@j@$eg@r
|
|
|
|