Click here to Skip to main content
15,915,164 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to implement edit box and spin control Pin
Adam Roderick J16-Dec-09 0:10
Adam Roderick J16-Dec-09 0:10 
AnswerRe: How to implement edit box and spin control Pin
KingsGambit15-Dec-09 21:06
KingsGambit15-Dec-09 21:06 
GeneralRe: How to implement edit box and spin control Pin
deadlyabbas15-Dec-09 23:23
deadlyabbas15-Dec-09 23:23 
GeneralRe: How to implement edit box and spin control Pin
KingsGambit15-Dec-09 23:29
KingsGambit15-Dec-09 23:29 
GeneralRe: How to implement edit box and spin control Pin
deadlyabbas15-Dec-09 23:37
deadlyabbas15-Dec-09 23:37 
GeneralRe: How to implement edit box and spin control Pin
deadlyabbas16-Dec-09 0:01
deadlyabbas16-Dec-09 0:01 
GeneralRe: How to implement edit box and spin control Pin
KingsGambit16-Dec-09 0:40
KingsGambit16-Dec-09 0:40 
QuestionHow to use WIN32_FIND_DATA to find whole disk drive ? Pin
wangningyu15-Dec-09 14:04
wangningyu15-Dec-09 14:04 
Hello everyone !

I want to find some files in the whole disk drive , the code like this :
void C***Dlg::EmuFiles(CString strPath, CString strType)
{
	WIN32_FIND_DATA	data;
	CString			csPath(strPath);
	csPath = csPath + "\\*." +strType;

	HANDLE	handle	=	FindFirstFile((LPCSTR)csPath,&data);   
	BOOL	ret		=	(BOOL)handle;
	while(ret)   
	{   
		if(data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
		{   
			if(data.cFileName[0]   !=   '.')     // if is Directory ,continue  
			{   
				csPath   =   strPath;
				csPath   +="\\";
				csPath   +=   data.cFileName;
				EmuFiles(csPath,strType);
			}   
		}   
		else	 
		{   
			csPath   =   strPath;				// if find the type file, add it it to the ListBox 
			csPath   +="\\";   
			csPath   +=   data.cFileName;   
			m_ListBox.InsertString(nCount,csPath);
			m_ListBox.SetCurSel(nCount);
			m_nTotal = nCount;
			UpdateData(FALSE);
			nCount ++;
		}   
		ret = FindNextFile(handle,&data);   
	} 
	
	// end find.
	FindClose(handle);  
}


when I use EmuFiles("C:\WINDOWS","exe"), it can be found.

but if I use EmuFiles("C:","exe"),it can't be found as more.

how to set the WIN32_FIND_DATA's parameters to find whole disk?
AnswerRe: How to use WIN32_FIND_DATA to find whole disk drive ? Pin
«_Superman_»15-Dec-09 16:35
professional«_Superman_»15-Dec-09 16:35 
QuestionRe: How to use WIN32_FIND_DATA to find whole disk drive ? Pin
David Crow15-Dec-09 16:37
David Crow15-Dec-09 16:37 
AnswerRe: How to use WIN32_FIND_DATA to find whole disk drive ? Pin
wangningyu15-Dec-09 20:54
wangningyu15-Dec-09 20:54 
AnswerRe: How to use WIN32_FIND_DATA to find whole disk drive ? Pin
Michael Schubert15-Dec-09 21:03
Michael Schubert15-Dec-09 21:03 
GeneralRe: How to use WIN32_FIND_DATA to find whole disk drive ? Pin
wangningyu16-Dec-09 1:58
wangningyu16-Dec-09 1:58 
GeneralRe: How to use WIN32_FIND_DATA to find whole disk drive ? [modified] Pin
Michael Schubert16-Dec-09 4:03
Michael Schubert16-Dec-09 4:03 
GeneralRe: How to use WIN32_FIND_DATA to find whole disk drive ? Pin
David Crow16-Dec-09 4:57
David Crow16-Dec-09 4:57 
QuestionAsyncronus class and your method Pin
Ruscoff15-Dec-09 11:26
Ruscoff15-Dec-09 11:26 
AnswerRe: Asyncronus class and your method Pin
Moak15-Dec-09 12:59
Moak15-Dec-09 12:59 
GeneralRe: Asyncronus class and your method Pin
Ruscoff16-Dec-09 2:59
Ruscoff16-Dec-09 2:59 
QuestionMFC ListControl flicker in win7 Pin
yctsai15-Dec-09 8:08
yctsai15-Dec-09 8:08 
QuestionCIPAddressCtrl cannot create vc+= mfc Pin
saarfu15-Dec-09 5:08
saarfu15-Dec-09 5:08 
AnswerRe: CIPAddressCtrl cannot create vc+= mfc Pin
Abhi Lahare15-Dec-09 13:04
Abhi Lahare15-Dec-09 13:04 
QuestionVS2008 CMFCToolbar and inserting a combo box Pin
Jerry Evans15-Dec-09 4:29
Jerry Evans15-Dec-09 4:29 
QuestionUsing function from other class Pin
blackbolek15-Dec-09 2:41
blackbolek15-Dec-09 2:41 
QuestionRe: Using function from other class Pin
David Crow15-Dec-09 2:53
David Crow15-Dec-09 2:53 
AnswerRe: Using function from other class [modified] Pin
blackbolek15-Dec-09 4:16
blackbolek15-Dec-09 4:16 

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.