Click here to Skip to main content
15,909,051 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: problem with device context (and some other bad things) Pin
csrss5-Mar-11 0:53
csrss5-Mar-11 0:53 
QuestionSending windows message from worker thread Pin
GC1044-Mar-11 0:41
GC1044-Mar-11 0:41 
AnswerRe: Sending windows message from worker thread Pin
CPallini4-Mar-11 1:47
mveCPallini4-Mar-11 1:47 
GeneralRe: Sending windows message from worker thread Pin
GC1044-Mar-11 2:29
GC1044-Mar-11 2:29 
GeneralRe: Sending windows message from worker thread Pin
prasad_som4-Mar-11 2:33
prasad_som4-Mar-11 2:33 
GeneralRe: Sending windows message from worker thread Pin
CPallini4-Mar-11 3:05
mveCPallini4-Mar-11 3:05 
GeneralRe: Sending windows message from worker thread Pin
CPallini4-Mar-11 2:36
mveCPallini4-Mar-11 2:36 
AnswerRe: Sending windows message from worker thread Pin
prasad_som4-Mar-11 2:30
prasad_som4-Mar-11 2:30 
QuestionGetting Time Difference [modified] Pin
AmbiguousName3-Mar-11 22:29
AmbiguousName3-Mar-11 22:29 
AnswerRe: Getting Time Difference Pin
CPallini3-Mar-11 22:46
mveCPallini3-Mar-11 22:46 
AnswerRe: Getting Time Difference Pin
Cool_Dev3-Mar-11 23:40
Cool_Dev3-Mar-11 23:40 
AnswerRe: Getting Time Difference Pin
David Crow4-Mar-11 2:07
David Crow4-Mar-11 2:07 
AnswerRe: Getting Time Difference Pin
Andrew Brock4-Mar-11 20:06
Andrew Brock4-Mar-11 20:06 
Questionon button stop control transfers to a option button click code Pin
VCProgrammer3-Mar-11 20:14
VCProgrammer3-Mar-11 20:14 
QuestionRe: on button stop control transfers to a option button click code Pin
David Crow4-Mar-11 2:08
David Crow4-Mar-11 2:08 
AnswerRe: on button stop control transfers to a option button click code Pin
VCProgrammer4-Mar-11 18:09
VCProgrammer4-Mar-11 18:09 
AnswerRe: on button stop control transfers to a option button click code Pin
prasad_som4-Mar-11 2:36
prasad_som4-Mar-11 2:36 
QuestionSOLVED Application failed to initialize ?? [modified] Pin
Vaclav_3-Mar-11 13:48
Vaclav_3-Mar-11 13:48 
QuestionAdding a static library build Pin
softwaremonkey3-Mar-11 11:39
softwaremonkey3-Mar-11 11:39 
AnswerRe: Adding a static library build Pin
Andrew Brock3-Mar-11 16:06
Andrew Brock3-Mar-11 16:06 
GeneralRe: Adding a static library build Pin
softwaremonkey3-Mar-11 19:44
softwaremonkey3-Mar-11 19:44 
QuestionRecursive CFileFind problem [modified] Pin
Mr_Gbg3-Mar-11 6:43
Mr_Gbg3-Mar-11 6:43 
I have a recursive CountFiles function that I just can't get to work properly. It counts all files in all directories under a given root. But when I run it it allways returns somewhat less nr of files than expected. I suspect I've made a logical dive somewhere, but I just can't see it! Cry | :(( The code below is supposed to return 13.301 files for my image library, but comes with 12.110... Can anybody see what my mistake is??Rose | [Rose]

int CBackupImagesDlg::CountFiles(const CString strRoot) 
{
	int count=0;
	CFileFind f;
	CString strDir = strRoot;
	strDir +=+ _T("\\*");
	CString csNewPath(_T(""));	
	
	if(f.FindFile(LPCTSTR(strDir)))
	{
		
		while(f.FindNextFile() )
		{
			BOOL bDir=f.IsDirectory();
			BOOL bDot=f.IsDots();
			csNewPath = f.GetFilePath();
			if (bDot)
				continue;
			if(bDir)
			{
                             count=count + CountFiles(csNewPath);
			}
			else // not dot, not dir = count as file
			{
					count++;
			}
		}//while...

	}

	f.Close();
	return count;
}


modified on Thursday, March 3, 2011 12:56 PM

AnswerRe: Recursive CFileFind problem Pin
Frank Seidler3-Mar-11 7:30
Frank Seidler3-Mar-11 7:30 
QuestionRe: Recursive CFileFind problem Pin
David Crow3-Mar-11 8:07
David Crow3-Mar-11 8:07 
AnswerRe: Recursive CFileFind problem Pin
Luc Pattyn3-Mar-11 8:47
sitebuilderLuc Pattyn3-Mar-11 8:47 

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.