|
chethu665 wrote: find out no of files in a folder of same extension and also i need names of it
Have a look at FindFirstFile(), FindNextFile() and WIN32_FIND_DATA
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
And in the end use of FindClose
|
|
|
|
|
int getFileCount()
{
int count = 0;
CFileFind finder;
BOOL bWorking = finder.FindFile("*.*");
while (bWorking)
{
bWorking = finder.FindNextFile();
count ++
}
return count;
}
'life is like a ten speed bike,most of us having gears
we ne never use' ... i want
to try those.
|
|
|
|
|
Oops.. You also need the names..
modify the function to return also the names using finder.GetFileName().
You can pass a pointer to a string array as argument and store the names in that.
'life is like a ten speed bike,most of us having gears
we ne never use' ... i want
to try those.
|
|
|
|
|
Hello
Reply from Aman Sonny seems correct.
You can get the number of file in the varible count used by Aman.
To get the name of file excluding extention use finder.getFileTitle()
method.
Abhijeet
|
|
|
|
|
Hello,
Here goes ur full solution.
int count = 0;
CFileFind finder;
CStringArray l_caryFileNames;
BOOL bWorking = finder.FindFile("*.*");
while (bWorking)
{
bWorking = finder.FindNextFile();
l_caryFileNames.Add(finder.GetFileTitle());
count ++;
}
Abhijeet
-- modified at 6:41 Tuesday 19th December, 2006
|
|
|
|
|
Hello All,
Help needed !!
Situation:
In and MDI application several child window are open.
On the event of selecting a child window ,some task is done on the selected document,previously active document and background.
Prob:
Let window A,B,C and D are open, A is currently selected and doing some work.
Now I want refuse selecting any other( or only B ) window before A is finished.
Or may be one toolbar button is pressed, so i want to refuse any other
window ( or any particular windo )to get selected.
If it is possible may plz have a guide line ?
Thank you.
'life is like a ten speed bike,most of us having gears
we ne never use' ... i want
to try those.
|
|
|
|
|
Hi all,
I have a little dialog-based application that maintains information on paintings. On the dialog where I show/edit the information pertaining to an individual painting (like the filename of the painting's image, a title, a date etc) I would like to show a thumbnail of the image. These images can be either jpeg, bmp or gif files. Anyone have any suggestions on how to do this?
Thanks in advance
William
|
|
|
|
|
|
Yes you can use of CListCtrl with CListImage but If you know C# you can see an article of Mr Mark clifton about your question on that article you can Inc or Dec size of thumbnail of images
|
|
|
|
|
hello all:
i want to build a filtergraph to convert my video from avi format into mpg format,how to build that graph,give me some good idea or a figure to show that graph,thank you
henry
|
|
|
|
|
Something like:
File Source -> AVI Splitter -> AVI Decompressor -> MPEG Encoder -> File Writer
There's no MPEG encoders included with DirectShow (because of licensing).
ASF (.wmv) file format has MPEG-4 encoder/decoder though.
|
|
|
|
|
which asf filter i can use,
i tried but i failed,
sos~~~~
|
|
|
|
|
|
By the way, you ARE using graphedit.exe to test graphs, right?
Much easier than having to try different filters in code
|
|
|
|
|
yes,but after that test,i need to try filters in code,5555555
thanks a lot
|
|
|
|
|
Hello friends
could any body tell me how i can compile any VC++ project either Dialog based or MDi according to my knowledge it should be generalized i tried by MSDN help i set the VC++ enviorment by executing vcvars32.bat but when i comiled any file i got error - cannot open input file BINMODE.OBJ
and this already available in system i think i missed some step. I tried it for dialog based project
if any body knows any thing then plz reply me as soon as possible.
My mainly concern to dialog based project
Regards
Ruchi Bansal
|
|
|
|
|
try this
msdev yourproject.dsw /make ALL /REBUILD
nave
|
|
|
|
|
Hi all, i was wondering how do i check for individual bits in a byte. Like if i wanted to check if the 3rd bit in a byte was 1 or 0, how do i do that in c++?
|
|
|
|
|
You can use binary operators (such as and ) with proper operands.
for example:
bool checkbit2(unsigned char b)
{
if ( b & 0x04) return true else return false;
}
returns true if third bit (which is bit 2) of b is set (note the operand 0x04 , that is binary 00000100 ).
hope that helps.
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.
|
|
|
|
|
Hi,
count the bits: 8-7-6-5-4-3-2-1
if(myByte & 0x4)
{
}
else
{
}
HTH
|
|
|
|
|
How to send a message to a tree control to select an item inside it( I have the handle to the tree view in my hands)?
SYAMLAL
|
|
|
|
|
Hi,
SendMessage(hWndTreeView, TVM_SELECTITEM, ActionFlag, hTreeItem);
TVM_.... -> TreeViewMessage
HTH
|
|
|
|
|
Hi Frank
I know the prototype of send message,,,But can U explain the 4th parameter in particular..
What I am trying to do is: To automate a local ghosting tool
The tool is having a window upon which the treeview resides
Items in tree view:
Harddisk
DellUtility
C:
D:
All these are selected by default
I want to select the C: only,,and that I have to do from the code
I have the handle to the tree view(Obtained using EnumChildWindows())
I think two ways of sending message is there:
1)Get handle to the item"C:" of type HTREEITEM and send a mouse click message
2)Get handle to the item "C:" of type HTREEITEM and send a select message
But how to do it?????I tried in different ways ,,but no hope....
Pls help me,,,,
SYAMLAL
|
|
|
|
|
SyamlalS wrote: ,,,But can U explain the 4th parameter in particular..
Its handle to tree item.
Its can be obtained using any of CTreeCtrl functions(GetNextItem,GetChildItem etc,).
|
|
|
|