|
ramyasangeet wrote: s.Format("%d", (xu_picno/2)+1);
filename = "c:\\temp\\";
filename+=s;
filename+="F";
filename+=".jpg";
Why not use:
filename.Format("c:\\temp\\%dF.jpg", (xu_picno/2)+1);
ramyasangeet wrote: xu_flag = cf.Open(filename, CFile::modeCreate | CFile::modeWrite);
cf.Write(sp_temp, xu_len);
If the call to Open() fails, there's no need to call Write() or Close().
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
and CreateDirectory
whitesky
|
|
|
|
|
can u please give me an example.
Also do i need to declare _mkdir??
help me out
cheers
sangeet
|
|
|
|
|
ramyasangeet wrote: Also do i need to declare _mkdir??
What do you mean ?? You simply need to call this function with the name of the folder you want to create. Did you read the doc from the MSDN (the link I sent you) ? It's pretty obvious how to use it. Also, don't forget to include <direct.h> (also stated in the doc).
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
I suggest that you read msdn
CreateDirectory("c:\\test",NULL);
whitesky
|
|
|
|
|
in www.msdn.com
CreateDirectory
This function creates a new directory
_mkdir
Create a new directory.
WhiteSky
|
|
|
|
|
thanks for ur reply.
I used the create directory function.
CreateDirectory("c:\\test\\",NULL);
To create another folder named front in the test folder,i used the same method.
CreateDirectory("c:\\test\\front",NULL); ,the folder is not creating..any other way to create subdirectories??
Also i have to store jpeg files in the created subdirectory.
How to do that.
cheers
sangeet
|
|
|
|
|
you can use each name instead test use your favorite name
like this
CopyFile("c:\\a.bmp","d:\\a.bmp",1);
whitesky
|
|
|
|
|
ramyasangeet wrote: CreateDirectory("c:\\test\\front",NULL); ,the folder is not creating..any other way to create subdirectories??
try SHFileOperation api or http://www.codeproject.com/shell/cshellfileop.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
ramyasangeet wrote: CreateDirectory("c:\\test\\front",NULL); ,the folder is not creating..
Are you sure that the c:\test folder exists? If it doesn't, CreateDirectory() will fail.
Why are you not checking the return value from GetLastError() ?
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
I would like to know how to control the charactor spacing in the CEdit control? Please help!
|
|
|
|
|
hai everybody
i want to create a notepad using a single document application.can you please help me how can i create that application.
|
|
|
|
|
Hi,
The best way is to use the MFC framework and choose the SDI application templete...most of the functionality is alreay implemented in the same.
or you can refer the sample source code provided in the MSDN for the notepad application.
all the best.
Jitendra.;)
|
|
|
|
|
|
Can any body explain me use of Static Function and Static Class in C++/VC++
|
|
|
|
|
What do you mean by static class ? As explained previously already, there is no such thing as a static class. You can only have a static instance of the class (like any other variable). Is that what you are looking for ?
For static function, in which context is that used ? You mean a static member function ? If yes, then it means that the function is shared across all instances of the class (thus, doesn't need a particular instance in order to be called). An example is the GetCurrentTime from CTime:
CTime t = CTime::GetCurrentTime();
As you see, you don't need to declare an instance in order to call the function.
Does that answer your question ?
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
it means that without creating an instance of the class I can call its static function.
|
|
|
|
|
NiLeSh KoRpE wrote: it means that without creating an instance of the class I can call its static function.
I don't understand... Is that a question ? If yes, I just answered in my previous post: yes it means that without creating an instance, you can call a static member function of the class.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Thank U
|
|
|
|
|
|
Hi,
Can we create a service (using VC++ 6) that runs on Windows 98. OR the services can only run on Windows NT and 2000.
Do they run on Windows XP.
Could you please tell me that on which Windows operating systems they can run.?
If i want to run them on Linux and Unix what are the thing to be considered?
Regards.
|
|
|
|
|
It is also possible to simulate a "service" on 9x platforms, although not a true NT service.
You have to use a function from kernel32.dll with GetProcAddress (although I don't remember the function name now, is something like RegisterService or similar, but I might be wrong).
|
|
|
|
|
Hi,
As far as my i know, windows services can only run on NT/2k/XP onwords. we can't deploy windows/NT services on windows 98 and on linux too.
but we can utilize the same functionality by running as a background process or demon.
Cheers
Jitendra.
Jitendra Pal Singh Gangwar
E-mail: jitendra_gangwar@hotmail.com
Mobile No: 09831352305
|
|
|
|
|
How can i use a tree control to display the directories in the system?
|
|
|
|
|
HI,
I want to run a MFC based Application on DOS.
Can i do this?
What are the conditions or limitation or precuation I have to take care of?
Any link or resource that explains about this?
Thanks
Regards.
|
|
|
|