Click here to Skip to main content
15,903,201 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MSDN 2003 Pin
Toni7820-Jul-03 16:04
Toni7820-Jul-03 16:04 
GeneralRe: MSDN 2003 Pin
Ryan Binns20-Jul-03 16:31
Ryan Binns20-Jul-03 16:31 
GeneralRe: MSDN 2003 Pin
Atlantys20-Jul-03 16:57
Atlantys20-Jul-03 16:57 
GeneralRe: MSDN 2003 Pin
J. Dunlap20-Jul-03 20:08
J. Dunlap20-Jul-03 20:08 
GeneralControl Panel applet Pin
TSimoes20-Jul-03 11:35
TSimoes20-Jul-03 11:35 
GeneralTCP/IP Question Pin
arunkk20-Jul-03 11:32
arunkk20-Jul-03 11:32 
GeneralRe: TCP/IP Question Pin
Ilushka20-Jul-03 20:49
Ilushka20-Jul-03 20:49 
GeneralFindFiles Pin
pranavamhari20-Jul-03 9:27
pranavamhari20-Jul-03 9:27 
hi all,

Please see the function below, and let me know if there is something wrong.
It is working, but i don't know if this is the correct way.

void ListFiles(CString strFolder)
{
WIN32_FIND_DATA wfd;
HANDLE handle = FindFirstFile(strFolder+_T("\\*.*"),&wfd);

if(INVALID_HANDLE_VALUE != handle)
{
do
{
if(!(wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{
//do some thing with func
}


else
{
//check if it is . or ..
BOOL bIsDot = FALSE;
if (wfd.cFileName[0] == '.')
{
if (wfd.cFileName[1] == '\0' || (wfd.cFileName[1] == '.' && wfd.cFileName[2] == '\0'))
{
bIsDot = TRUE;
}
}
if(!bIsDot)
ListFiles(strFolder + _T("\\") + wfd.cFileName);
}

}while (FindNextFile(handle,&wfd));

FindClose( handle );
}


}

Hari Krishnan
GeneralRe: FindFiles Pin
John R. Shaw20-Jul-03 11:37
John R. Shaw20-Jul-03 11:37 
QuestionFree graphing library? Pin
Nathan Evans20-Jul-03 7:43
Nathan Evans20-Jul-03 7:43 
AnswerRe: Free graphing library? Pin
John R. Shaw20-Jul-03 11:40
John R. Shaw20-Jul-03 11:40 
GeneralIStream from CComVariant (Help!!!) Pin
yitzhak20-Jul-03 5:38
yitzhak20-Jul-03 5:38 
GeneralUsing vectors Pin
gweather20-Jul-03 3:56
gweather20-Jul-03 3:56 
GeneralRe: Using vectors Pin
Dudi Avramov20-Jul-03 4:35
Dudi Avramov20-Jul-03 4:35 
GeneralRe: Using vectors Pin
gweather20-Jul-03 20:19
gweather20-Jul-03 20:19 
GeneralRe: Using vectors Pin
Dudi Avramov20-Jul-03 20:45
Dudi Avramov20-Jul-03 20:45 
GeneralSetRedraw in OnDraw(CDC *pDC) Pin
Majid Shahabfar20-Jul-03 2:54
Majid Shahabfar20-Jul-03 2:54 
GeneralRe: SetRedraw in OnDraw(CDC *pDC) Pin
Ryan Binns20-Jul-03 4:54
Ryan Binns20-Jul-03 4:54 
GeneralRe: SetRedraw in OnDraw(CDC *pDC) Pin
John M. Drescher21-Jul-03 3:26
John M. Drescher21-Jul-03 3:26 
QuestionHow to read data from serial port. Pin
George220-Jul-03 2:33
George220-Jul-03 2:33 
AnswerRe: How to read data from serial port. Pin
John R. Shaw20-Jul-03 11:44
John R. Shaw20-Jul-03 11:44 
GeneralRe: How to read data from serial port. Pin
George220-Jul-03 18:02
George220-Jul-03 18:02 
Generallearning vc++ Pin
virtualspy20-Jul-03 0:50
virtualspy20-Jul-03 0:50 
GeneralRe: learning vc++ Pin
Paul Ingles20-Jul-03 1:09
Paul Ingles20-Jul-03 1:09 
GeneralRe: learning vc++ Pin
Tom Archer20-Jul-03 4:02
Tom Archer20-Jul-03 4:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.