|
Also how to count no.of folders/no. of files? in VC++ MFC.
|
|
|
|
|
Use ::CreateDirectory (...) to create a folder.
Or
::SHCreateDirectoryEx (...) to make a deep path of directories
As for counting files, you'll have to use FindFirstFile / FindNextFile to get a list of files/directories in a directory. You can check the WIN32_FIND_DATA structures dwFileAttributes for a FILE_ATTRIBUTE_DIRECTORY flag to see if it's a directory.
Good luck,
Iain.
|
|
|
|
|
http://msdn2.microsoft.com/en-us/library/aa365522.aspx
there you go.
|
|
|
|
|
Or you can use of dlgdirlist for get folder and file names and count.
|
|
|
|
|
hi,
1. how can i capture a window (dialog) that is under another window?
2. also, is it possible to force a window to be display off screen, e.g.
i use findwindow to find the window, and then move it to offscreen for
display.
3. i'll then capture the window that is offscreen and put into another window
for display.
thanks.
br,
calvin
|
|
|
|
|
|
How to recognize whether selected font is printer font?
Any APIs.
|
|
|
|
|
hey ,i met with a problem here~ i wanna find a code snippet which can read the "*.hgt" file
does anyone know where i can get this?
thanks a lot
|
|
|
|
|
The extension of a file is not the problem to read a file. You can use CFile/CArchive or any other possibility to open almost all extensions. The most important things are: Which saving mode has it? Binary, plain Text, UNICODE... and how is the structure of saved data (i.e. The first 30 Bytes is a header where 4 parameters mean 4 different things, then come 30 Bytes for a string, after 10x1 Byte for unsigned shorts, then a 10x20 Bytes to a matrix of...)
I want to mean... can you be a bit more concrete?
BTW, have you tried google?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
first ,thank u for ur attention
yeah , you got the point~ "The most important things are: Which saving mode has it?"
and this is also where the problem lies ,thats i have no idea of whats the structure of this ".hgt" file
someone told me perhaps its NASA Shuttle Radar Topography Mission files
but i am still not sure
|
|
|
|
|
Then... I think ready code will be not easy to find, and without the structure and meaning of every data unit... practically impossible to code it. Good luck
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Nelek wrote: I think ready code will be not easy to find
yeah i think so~
hehe thank u very much all the same
|
|
|
|
|
if you don't know what the file is, why would you want to open it ?
you just have a file with that extension and just have the urge toopen it ?
|
|
|
|
|
hehe
all i know about this file is its a 3D map,i just have no idea what the structrue of this file is~~
however after i checked some websites i am partly sure its a Shuttle Radar Topography Mission file~
have u got any idea for this?
|
|
|
|
|
Hello everyone,
I have tried that even if I have multiple character pointer variables, if the content they pointed to are the same, they are allocated with the same value. So, I think from compiler point of view, the constant with the same content shares the single copy in memory?
Here is my test program in Visual Studio 2005.
<br />
<br />
int main (int argc, char** argv)<br />
{<br />
char* abc = "Hello";<br />
<br />
char* abc2 = "Hello";<br />
<br />
<br />
return 0;<br />
}<br />
thanks in advance,
George
-- modified at 2:28 Thursday 15th November, 2007
|
|
|
|
|
That is a compiler optimization that you shouldnt rely on. /Gf on the compiler commandline tells the compiler to "place a single copy of identical strings into the executable file" and /GF "the pooled strings are placed in read-only memory".
|
|
|
|
|
Thanks Roger,
I have checked that I do not have /Gf defined. Here is project --> properties --> C/C++ --> Command line --> All options,
/Od /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /nologo /c /Wp64 /ZI /TP /errorReport:prompt
Any more comments?
I am using .c other .cpp in this case.
regards,
George
|
|
|
|
|
/ZI = Program Database for Edit & Continue, in this case /GF becomes the default
|
|
|
|
|
Thanks Roger,
My question is answered.
regards,
George
|
|
|
|
|
George-so-good-you-named-yourself-twice,
As has been said, the answer depends on compiler flags. But I would strongly pretend to yourself that the answer is impossible to know, and not depend on it.
If you want two pointers to the same place, be explicit about it. Or some person who changes your code in three years (ie, you) will have no idea you intended them to be the same, and will break things.
Or you will upgrade to Visual Studio 2020 (in the year 2012) and the compiler will do different things and you'll get nasty to find bugs.
To save this you'll have to write more comments than the effort is worth.
Iain.
|
|
|
|
|
Thanks for your advice, Iain!
I agree that your idea will make code more safe and conforming to standard -- by not assuming any non-language-standard points.
regards,
George
|
|
|
|
|
Hi ALL,
Can please anyone give me the code in vc++ to calculate FFT?I have the gray values of the image as input in array form.
Please help me.I really need it ASAP.I would really appreciate it.
Thanks & Regards
|
|
|
|
|
The forum usually is to ask questions, I don't think the people here is going to give ready codes without questions. Have you at least used google to search? Most probably there will somewhere be available code to do that.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
raavn wrote: I really need it ASAP.
Asking for free help and wanting it ASAP is rude. You are abusive in my opinion.
|
|
|
|
|
Please do not take it in negative sense.
I was really in need of it.
If you would be in such a need,then only you can understand.
|
|
|
|