|
Iain Clarke wrote: Which you may want to change! I'm guessing changing /'s to \'s will help.
Worked for me, but anyway changed as you said, thanks!
Nibu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
It's better now. Maybe it's a firefox thing? IExplore was being friendler about the /\'s?
Iain.
|
|
|
|
|
Hi All..Thanks for your replay..
i have the total file length like this only .i wanna create the serial no this total length of the file how its possible ..
Lfile.Write("",Lfile.GetLength());
Lfile is nothing but object of CFile.This Lfile contains some list of datas.
Thanks!!
raju.k
|
|
|
|
|
Do you want serial for files like (1) (2),...?
|
|
|
|
|
hi hamid...thanks for ur replay
like this only..
1.
2.
3.
4.
etc
Thanks
raju.k
|
|
|
|
|
Why have you created a new thread for asking something that you have asked in one of your earlier posts? There are some people trying to help you there and so I advice you to be patient and wait for someone to answer your question.
Don't expect that making a repost of the your questions by creating a new thread will get you answers quickly. If people have not been able to help you in the original thread, then its unlikely that they will answer here.
And seriously, though you have asked the question twice, i am still not able to figure out what you exactly want.
Regards,
Vijay.
|
|
|
|
|
vijay7173 wrote: And seriously, though you have asked the question twice, i am still not able to figure out what you exactly want.
Me too!
Maxwell Chen
|
|
|
|
|
Maxwell Chen wrote: Me too!
well, I read your replies to the original post and I should say that you tried your best to help him.
Regards,
Vijay.
|
|
|
|
|
hi vijay and all ..i read ur replay and i understood ..in feature i follow surely..i am new in this filed like VC++ ,code project also...
my question is ..
how to create serial no in a file ?
the output of file like this only..
1.
2.
3.
Thanks
raju.k
|
|
|
|
|
raju.k wrote: how to create serial no in a file ?
Several ways exist. One such way is:
FILE *pFile = fopen(..., "w");
fprintf(pFile, "1.\n");
fprintf(pFile, "%d.\n", 2);
int x = 3;
fprintf(pFile, "%d.\n", x);
fclose(pFile);
"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
|
|
|
|
|
Hi,
I have a treecontrol containing files and folders as it items.Now i have added drag and drop support to and from explorer to my tree control.Everything is working fine but,when i drag a item from tree control i have created a drag image and assigned it to a pointer variable of CImageList class and using it i have dragged the image during drag.It works well inside the view but whrn the cursor leaves the the view it is getting struct at the border of the view.How can i move the image on to the explorer.I have registered my view as a droptarget.
Thanks
|
|
|
|
|
I think codeproject has an example about drag to Explorer did you see it?
|
|
|
|
|
I am able to drag but image is getting struck at the end of the view.I have reffered Micheal dunn's example.
Thanks
modified on Monday, January 28, 2008 7:14:26 AM
|
|
|
|
|
Hello everyone,
Just want to check whether my understanding is correct,
Both (1) and (2) only covers Windows C++ platform.
1. If there is uncaught exception, destructor is not ensured to be called for active object;
2. All the resources (handles, memory, etc.) for current process will be released when uncaught exception causing process to terminate.
thanks in advance,
George
|
|
|
|
|
For this kind of questions, you can test by yourself with DebugView tool.
Maxwell Chen
|
|
|
|
|
Hi Maxwell,
I have used this tool before, but I do not think it has capability to monitor whether there is resource leak and whether destructor is called or not.
Maybe my knowledge about this tool is limited, and it is appreciated if you could help to give more information.
regards,
George
|
|
|
|
|
George_George wrote: capability to monitor whether there is resource leak
DebugView can. And no special setting is required.
George_George wrote: whether destructor is called or not.
You are the coder. You should trace this by yourself.
Maxwell Chen
|
|
|
|
|
Hi Maxwell,
I have tried to use DebugView to find whether there is memory leak and leaked memory is released finally when process terminates, but there is no output in DebugView. Anything wrong?
int main()
{
char* p = new char [100];
p [0] = 'a';
p [100] = 'z';
return 0;
}
regards,
George
|
|
|
|
|
You have to add the detection utility in your code.
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <ctrdbg.h>
void main()
{
int* p = new int;
_CrtDumpMemoryLeaks();
}
Then DebugView display something when you execute the output program.
Maxwell Chen
|
|
|
|
|
Thanks Maxwell,
I have tested your code and it works!
But I think it has limitation that it could only detect memory leak. How to detect others, like handles and locks? If DebugView could automatically monitor such resources, it will be great!
regards,
George
|
|
|
|
|
George_George wrote: How to detect others, like handles and locks?
There is a Add-In for VC++ called the "Deleaker" for what you want.
Maxwell Chen
|
|
|
|
|
|
Shareware, but you still can use it after expired.
(Don't ask me. I do not use it. I take care of my code by myself.)
Or maybe you would consider to switch to Managed C++ world. Everything is managed. You won't have to worry about leaks.
Maxwell Chen
|
|
|
|
|
Thanks Maxwell,
I am looking forward to a utility from Visual Studio or Microsoft itself, because it is helpful. Do not know whether utilities like Process Explorer has such functions.
regards,
George
|
|
|
|
|
You can use perfmon tool by Microsoft to count handles.
Maxwell Chen
|
|
|
|