Click here to Skip to main content
15,900,108 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionChange BAR Color of CProgressCtrl Pin
CodeMak11-Jul-07 23:47
CodeMak11-Jul-07 23:47 
AnswerRe: Change BAR Color of CProgressCtrl Pin
Nibu babu thomas11-Jul-07 23:53
Nibu babu thomas11-Jul-07 23:53 
GeneralRe: Change BAR Color of CProgressCtrl Pin
CodeMak11-Jul-07 23:56
CodeMak11-Jul-07 23:56 
GeneralRe: Change BAR Color of CProgressCtrl Pin
Nibu babu thomas12-Jul-07 0:11
Nibu babu thomas12-Jul-07 0:11 
GeneralRe: Change BAR Color of CProgressCtrl Pin
CodeMak12-Jul-07 0:34
CodeMak12-Jul-07 0:34 
AnswerRe: Change BAR Color of CProgressCtrl Pin
David Crow12-Jul-07 2:33
David Crow12-Jul-07 2:33 
QuestionEnumerating all paths on a drive? Pin
Lord Kixdemp11-Jul-07 23:41
Lord Kixdemp11-Jul-07 23:41 
AnswerRe: Enumerating all paths on a drive? Pin
Nibu babu thomas11-Jul-07 23:55
Nibu babu thomas11-Jul-07 23:55 
See this illustration from MSDN, the part you are missing in colored in red...

#include <afx.h>
#include <iostream>

using namespace std;

void Recurse(LPCTSTR pstr)
{
   CFileFind finder;
 
   // build a string with wildcards
   CString strWildcard(pstr);
   strWildcard += _T("\\*.*");
 
   // start working for files
   BOOL bWorking = finder.FindFile(strWildcard);
 
   while (bWorking)
   {
      bWorking = finder.FindNextFile();
 
<code>      // skip . and .. files; otherwise, we'd
      // recur infinitely!</code>

<code>      if (finder.IsDots())
         continue;</code>
 
      // if it's a directory, recursively search it
 
      if (finder.IsDirectory())
      {
         CString str = finder.GetFilePath();
         cout << (LPCTSTR) str << endl;
         Recurse(str);
      }
   }
 
   finder.Close();
}

void main()
{
   if (!AfxWinInit(GetModuleHandle(NULL), NULL, GetCommandLine(), 0)
      cout << "panic!" << endl;
   else
      Recurse(_T("C:"));
}
A dot(.) indicates current directory and a dot dot(..) indicates parent directory. So you need to ignore these two entries.


Nibu thomas
A Developer

Code must be written to be read, not by the compiler, but by another human being.

http:\\nibuthomas.wordpress.com

GeneralRe: Enumerating all paths on a drive? Pin
Lord Kixdemp12-Jul-07 0:12
Lord Kixdemp12-Jul-07 0:12 
GeneralRe: Enumerating all paths on a drive? Pin
Nibu babu thomas12-Jul-07 0:22
Nibu babu thomas12-Jul-07 0:22 
AnswerRe: Enumerating all paths on a drive? Pin
Michael Dunn12-Jul-07 8:32
sitebuilderMichael Dunn12-Jul-07 8:32 
QuestionUnicode support for MS-Chart control Pin
RaviPK11-Jul-07 22:52
RaviPK11-Jul-07 22:52 
QuestionWord game Pin
Yustme11-Jul-07 22:48
Yustme11-Jul-07 22:48 
AnswerRe: Word game Pin
Rage12-Jul-07 0:17
professionalRage12-Jul-07 0:17 
GeneralRe: Word game Pin
Yustme12-Jul-07 0:34
Yustme12-Jul-07 0:34 
GeneralRe: Word game Pin
Rage12-Jul-07 1:16
professionalRage12-Jul-07 1:16 
GeneralRe: Word game Pin
Yustme12-Jul-07 1:24
Yustme12-Jul-07 1:24 
AnswerRe: Word game Pin
Hans Dietrich12-Jul-07 1:15
mentorHans Dietrich12-Jul-07 1:15 
GeneralRe: Word game Pin
Yustme12-Jul-07 1:28
Yustme12-Jul-07 1:28 
AnswerRe: Word game Pin
Yustme12-Jul-07 1:23
Yustme12-Jul-07 1:23 
AnswerRe: Word game Pin
cp987612-Jul-07 2:13
cp987612-Jul-07 2:13 
QuestionHow to get the Instance Handle from a Process ID&#65311; Pin
Billypon11-Jul-07 22:26
Billypon11-Jul-07 22:26 
AnswerRe: How to get the Instance Handle from a Process ID&amp;amp;#65311; [modified] Pin
Nibu babu thomas11-Jul-07 22:29
Nibu babu thomas11-Jul-07 22:29 
QuestionResources for STL Pin
vipin_nvk11-Jul-07 22:12
vipin_nvk11-Jul-07 22:12 
AnswerRe: Resources for STL Pin
SandipG 11-Jul-07 22:37
SandipG 11-Jul-07 22:37 

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.