|
deeps_cute wrote: hmm i think this lists all files.
It lists the directories too...
nave
|
|
|
|
|
Have u read it carefully? It gives u folders too.
Smile
|
|
|
|
|
Try using CFileFind .
Regards,
Paresh.
|
|
|
|
|
yes i got it but how to list it in list box
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
A easy way is that you can use of DlgDirList
|
|
|
|
|
hmm yes sir but i have to list the files similar to windows explorer ie with icons
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
WhiteSky wrote: A easy way...
But not the correct way. The requirement was to list "all the files and folders in c: drive." DlgDirList() does nothing more than populate a listbox with the names of the subdirectories and files in a specified directory.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
deeps_cute wrote: to list all the files and folders in c: drive programatically.
you can use FindFirst() and FindNext() functions. But using the CFileFind class would be an easier option.
Regards,
Vijay.
God may not give us what we 'want', but he surely gives us what we 'need'.
|
|
|
|
|
I am hiding my window when its close button in clicked and i am keeping it in the system tray.
When some condition is true the window has to be shown on the window.
For this i wrote
AfxGetMainWnd()->ShowWindow(SW_SHOW)
But the window is not coming up. Its coming into the task bar only and when i am clicking on it its being shown.
I want my window to be automatically poped up.
Where i have gone wrong?
Thank you.
KIRAN PINJARLA
|
|
|
|
|
ShowWindow(SW_MAXIMIZE);
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
just try the below code...
DWORD dwThreadId = GetWindowThreadProcessId(::GetForegroundWindow(),NULL);
DWORD dwCurrentThreadId = GetCurrentThreadId();
AttachThreadInput( dwThreadId, dwCurrentThreadId,TRUE );
AfxGetMainWnd()->ShowWindow(SW_SHOW)
AfxGetMainWnd()->SetForegroundWindow();
AfxGetMainWnd()->SetFocus();
AttachThreadInput( dwThreadId, dwCurrentThreadId ,FALSE );
nave
|
|
|
|
|
Thank you Naveen. It worked.
KIRAN PINJARLA
|
|
|
|
|
Hi
I have a object.And i want to convert it into VT_DISPATCH variant.How can i do this.
|
|
|
|
|
Is it a COM object which implements the IDispatch interface? If not it makes little sense to do so.
Steve
|
|
|
|
|
Hi
Does anyone know how to import makefiles for GNU into VC++6.0?
I have some open source code and makefiles. The code is written portable.
But the makefiles arent.
Please anyone suggest me what can be done.
There are lots of module therefore the makefile is important as to tell which one should be compiled first etc.
Regards
The Best Religion is Science.
Once you understand it, you will know God.
|
|
|
|
|
Hi All
I got some .h and .cpp file for read/write floppy drive from this link
http://www.codeproject.com/system/cfloppydisk.asp
But i unable to understand how to use it and can i set permission for read/write on Floppy drive using this code?
Thanks in advance
RYK
-- modified at 5:39 Monday 2nd April, 2007
|
|
|
|
|
have you asked the author directly using the forum at the bottom of that article ?
|
|
|
|
|
Hello Friends
I remember there was something that allowed to do some code & full excel was there in a Doc / View Application , but i could not remember that.
Any idea?
Regards
|
|
|
|
|
Vikrant for VC++ wrote: I remember there was something that allowed to do some code & full excel was there in a Doc / View Application , but i could not remember that.
Check out MSDN for "Some APIs".
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Did yo try searching the site?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hi all,
How can one remove the backslashes froma string(path) to get the filename.
For example you have a path: C:\<dir>\testfile.txt
Now I want to get only the testfile.txt part.
I wrote a function, but it doesn't do exactly what I want, can anyone help.
static char *FindLastSlash(char *Ptr)
{
char c;
char *LastPtr = NULL;
while(1)
{
c = *Ptr;
if(c=='\\') LastPtr = Ptr;
if(c=='\0') break;
Ptr++;
}
return LastPtr;
}
Mant thanx,
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
There's an API which does this exactly (getting a full path and returning only the file name); unfortunately, i can't remember its exact name, nor having time to search it.
search the MSDN a little on "files API"... you would find some useful help
|
|
|
|
|
Programm3r wrote: Now I want to get only the testfile.txt part.
You can use CString::ReverseFind() and then use CString::TrimLeft()/CString::TrimRight() to get what you want.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
Change it to,
static char *FindLastSlash(char *Ptr)
{
char* pFileName = NULL;
pFileName = strrchr(Ptr, '\\');
if (pFileName) pFileName++;
return pFileName;
}
Note that the pointer returned is the part of Ptr string, no new memory is allocated here.
or as mentioned by toxcct, you can use,
PathFindFileName(..)
Do your Duty and Don't expect the Result Rate this Post, if I helped You
|
|
|
|