Click here to Skip to main content
16,005,697 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to change the background color of menu bar... Pin
Hamid_RT18-Jun-07 20:31
Hamid_RT18-Jun-07 20:31 
GeneralRe: How to change the background color of menu bar... Pin
BlrBoy18-Jun-07 20:36
BlrBoy18-Jun-07 20:36 
QuestionHOW to call a menu dialog box from one to another? Pin
vikramkarthik18-Jun-07 18:41
vikramkarthik18-Jun-07 18:41 
QuestionRe: HOW to call a menu dialog box from one to another? Pin
Hamid_RT18-Jun-07 18:57
Hamid_RT18-Jun-07 18:57 
AnswerRe: HOW to call a menu dialog box from one to another? Pin
vikramkarthik18-Jun-07 19:07
vikramkarthik18-Jun-07 19:07 
QuestionListing the Files in a Directory Pin
EngMohab18-Jun-07 18:18
EngMohab18-Jun-07 18:18 
QuestionRe: Listing the Files in a Directory Pin
Hamid_RT18-Jun-07 18:59
Hamid_RT18-Jun-07 18:59 
AnswerRe: Listing the Files in a Directory Pin
Programm3r18-Jun-07 19:40
Programm3r18-Jun-07 19:40 
This works aswell ...

HANDLE hFile;
WIN32_FIND_DATA FileInformation;
TCHAR m_szPath[MAX_PATH];
TCHAR m_szFolderInitialPath[MAX_PATH];
TCHAR wildCard[MAX_PATH] = "\\*.*";

hFile = ::FindFirstFile(m_szFolderInitialPath, &FileInformation);
if(hFile != INVALID_HANDLE_VALUE)
{
   do{
      if(FileInformation.cFileName[0] != '.')
      {
         strcpy(m_szPath,m_szFdPath);
         if(FileInformation.dwFileAttributes &
            FILE_ATTRIBUTE_DIRECTORY)
         {
            //it is a sub directory
            ::SetFileAttributes(m_szPath,FILE_ATTRIBUTE_NORMAL);
         }
         else
         {
            //it is a file
            ::SetFileAttributes(m_szPath,FILE_ATTRIBUTE_NORMAL);
         }
      }
   }while(::FindNextFile(hFile, &FileInformation) == TRUE);
   // Close handle
   ::FindClose(hFile);
   DWORD dwError = ::GetLastError();
   if(dwError == ERROR_NO_MORE_FILES)
   {
      //Attributes successfully changed
   }
}


Regards,


The only programmers that are better than C programmers are those who code in 1's and 0's..... Smile | :)

Smile | :) Programm3r

My Blog: ^_^

GeneralRe: Listing the Files in a Directory Pin
EngMohab19-Jun-07 1:48
EngMohab19-Jun-07 1:48 
GeneralRe: Listing the Files in a Directory Pin
David Crow19-Jun-07 4:32
David Crow19-Jun-07 4:32 
QuestionHow to catch unhandled exceptions? Pin
Best Kiluyar18-Jun-07 18:05
Best Kiluyar18-Jun-07 18:05 
AnswerRe: How to catch unhandled exceptions? Pin
Hamid_RT18-Jun-07 19:06
Hamid_RT18-Jun-07 19:06 
Questionconvert Pin
p_18-Jun-07 18:05
p_18-Jun-07 18:05 
AnswerRe: convert Pin
Hamid_RT18-Jun-07 19:13
Hamid_RT18-Jun-07 19:13 
GeneralRe: convert Pin
p_18-Jun-07 19:37
p_18-Jun-07 19:37 
GeneralRe: convert Pin
p_18-Jun-07 20:05
p_18-Jun-07 20:05 
GeneralRe: convert Pin
Hamid_RT18-Jun-07 20:42
Hamid_RT18-Jun-07 20:42 
AnswerRe: convert Pin
David Crow19-Jun-07 4:55
David Crow19-Jun-07 4:55 
QuestionMonitor tool required Pin
ramesh_hp200618-Jun-07 17:50
ramesh_hp200618-Jun-07 17:50 
AnswerRe: Monitor tool required Pin
Hamid_RT18-Jun-07 19:10
Hamid_RT18-Jun-07 19:10 
Questionhow can i convert ms-word to bmp by program??? Pin
hua_hero0718-Jun-07 15:37
hua_hero0718-Jun-07 15:37 
AnswerRe: how can i convert ms-word to bmp by program??? Pin
Christian Graus18-Jun-07 15:53
protectorChristian Graus18-Jun-07 15:53 
QuestionsendASPI32Command returns SS_ASPI_IS_BUSY Pin
aks.18-Jun-07 14:01
aks.18-Jun-07 14:01 
QuestionDetecting Windows Session Change Pin
Akin Ocal18-Jun-07 13:43
Akin Ocal18-Jun-07 13:43 
QuestionRe: Detecting Windows Session Change Pin
David Crow18-Jun-07 16:23
David Crow18-Jun-07 16:23 

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.