Click here to Skip to main content
15,925,369 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionTo draw circles.. Pin
txE29-Jul-06 16:11
txE29-Jul-06 16:11 
AnswerRe: To draw circles.. Pin
spacecadet1029-Jul-06 16:42
spacecadet1029-Jul-06 16:42 
GeneralRe: To draw circles.. Pin
txE29-Jul-06 16:46
txE29-Jul-06 16:46 
GeneralRe: To draw circles.. Pin
ThatsAlok30-Jul-06 19:53
ThatsAlok30-Jul-06 19:53 
AnswerRe: To draw circles.. Pin
Hamid_RT30-Jul-06 3:21
Hamid_RT30-Jul-06 3:21 
Questioncommand prompt using c++ Pin
davidbr429-Jul-06 12:26
davidbr429-Jul-06 12:26 
AnswerRe: command prompt using c++ Pin
Trollslayer29-Jul-06 12:49
mentorTrollslayer29-Jul-06 12:49 
AnswerRe: command prompt using c++ Pin
spacecadet1029-Jul-06 16:26
spacecadet1029-Jul-06 16:26 
<br />
int GetDirectoryContents(CString sPath,CArray<CString,CString> &store,CString ext="*");<br />
//---------------------------------------------------------------------------<br />
// returns number of files in directory and fills a CArray filename list<br />
// pass '*.???'(i.e. '*.dat') as the 3rd param to search for specific extensions<br />
//---------------------------------------------------------------------------<br />
int CFileSystem::GetDirectoryContents(CString sPath,CArray<CString,CString> &store,CString ext) {<br />
	HANDLE hFind;    // file handle<br />
	WIN32_FIND_DATA FindFileData;<br />
	CString t_filenames;<br />
	int total_files=0;<br />
<br />
	TCHAR DirPath[MAX_PATH];<br />
	TCHAR FileName[MAX_PATH];<br />
<br />
	_tcscpy(DirPath,sPath);<br />
	_tcscat(DirPath,"\\");    // searching all files<br />
	_tcscat(DirPath,ext);    // searching all files<br />
<br />
	// find the first file<br />
	hFind = FindFirstFile(DirPath,&FindFileData);<br />
	if(hFind == INVALID_HANDLE_VALUE) return FALSE;<br />
	else {<br />
<br />
		_tcscpy(FileName,FindFileData.cFileName);<br />
		t_filenames.Format("%s",FileName);<br />
		store.Add(t_filenames);<br />
		++total_files;<br />
	}<br />
<br />
	while(FindNextFile(hFind,&FindFileData)) {<br />
		if( _tcscmp(FindFileData.cFileName,"." ) && <br />
		_tcscmp(FindFileData.cFileName,".." ) ) {<br />
			_tcscpy(FileName,FindFileData.cFileName);<br />
			t_filenames.Format("%s",FileName);<br />
			store.Add(t_filenames);<br />
			++total_files;<br />
<br />
		}<br />
	}<br />
	FindClose(hFind);   // close the file handle<br />
	return(total_files-1);<br />
}<br />

AnswerRe: command prompt using c++ Pin
Hamid_RT30-Jul-06 3:22
Hamid_RT30-Jul-06 3:22 
GeneralRe: command prompt using c++ Pin
davidbr430-Jul-06 9:24
davidbr430-Jul-06 9:24 
Questioncopy executable during run Pin
davidbr429-Jul-06 12:15
davidbr429-Jul-06 12:15 
AnswerRe: copy executable during run [modified] Pin
Trollslayer29-Jul-06 12:50
mentorTrollslayer29-Jul-06 12:50 
GeneralRe: copy executable during run Pin
davidbr430-Jul-06 9:27
davidbr430-Jul-06 9:27 
GeneralRe: copy executable during run Pin
ThatsAlok30-Jul-06 22:04
ThatsAlok30-Jul-06 22:04 
GeneralRe: copy executable during run Pin
davidbr431-Jul-06 8:18
davidbr431-Jul-06 8:18 
QuestionNot Visual C++... new coder using Dev C++ Pin
newcoder333329-Jul-06 11:27
newcoder333329-Jul-06 11:27 
AnswerRe: Not Visual C++... new coder using Dev C++ Pin
Christian Graus29-Jul-06 13:59
protectorChristian Graus29-Jul-06 13:59 
QuestionDrawing graphics on dialog box--which way is best? Pin
ctroyp29-Jul-06 11:01
ctroyp29-Jul-06 11:01 
AnswerRe: Drawing graphics on dialog box--which way is best? Pin
Justin Tay29-Jul-06 11:08
Justin Tay29-Jul-06 11:08 
GeneralRe: Drawing graphics on dialog box--which way is best? Pin
ctroyp29-Jul-06 11:22
ctroyp29-Jul-06 11:22 
GeneralRe: Drawing graphics on dialog box--which way is best? Pin
Justin Tay29-Jul-06 11:54
Justin Tay29-Jul-06 11:54 
GeneralRe: Drawing graphics on dialog box--which way is best? Pin
ctroyp29-Jul-06 11:59
ctroyp29-Jul-06 11:59 
GeneralRe: Drawing graphics on dialog box--which way is best? Pin
Trollslayer29-Jul-06 12:51
mentorTrollslayer29-Jul-06 12:51 
QuestionHelp with Windows forms Pin
samaruf29-Jul-06 10:30
samaruf29-Jul-06 10:30 
AnswerRe: Help with Windows forms Pin
Justin Tay29-Jul-06 10:46
Justin Tay29-Jul-06 10:46 

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.