Click here to Skip to main content
15,913,773 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How do I get process name from handle? Pin
pba_30-Dec-02 11:03
pba_30-Dec-02 11:03 
GeneralIs this possible.... Pin
Member 9630-Dec-02 7:56
Member 9630-Dec-02 7:56 
GeneralRe: Is this possible.... Pin
Anders Molin30-Dec-02 9:44
professionalAnders Molin30-Dec-02 9:44 
GeneralRe: Is this possible.... Pin
Member 9630-Dec-02 11:05
Member 9630-Dec-02 11:05 
GeneralRe: Is this possible.... Pin
peter271330-Dec-02 12:43
peter271330-Dec-02 12:43 
GeneralRe: Is this possible.... Pin
Member 9630-Dec-02 15:35
Member 9630-Dec-02 15:35 
GeneralFunction required similar to DOS "deltree.exe" Pin
Still learning how to code30-Dec-02 7:45
Still learning how to code30-Dec-02 7:45 
GeneralRe: Function required similar to DOS "deltree.exe" Pin
Jason Henderson30-Dec-02 8:30
Jason Henderson30-Dec-02 8:30 
Try this:
BOOL DelTree(CString cstrPath)
{
	BOOL bRetVal = FALSE;
	CString cstrTemp = cstrPath;
	CString cstrOldDir;
	char buffer[MAX_PATH];
	
	CFileFind cFind;
	CString cstrFileName, cstrTempFile;

	cstrFileName.Format("%s%s",cstrPath,"\\*.*");
	if (cFind.FindFile(cstrFileName))
	{	
		BOOL bFound = TRUE;
		while (bFound)
		{
			bFound = cFind.FindNextFile();
			if (cFind.IsDots())
				continue;
			else
			{
				// Get Current File Name
				cstrTempFile = cFind.GetFilePath();
				bRetVal = DeleteFile(cstrTempFile);
				if (!bRetVal) break;
			}
		}
	}
	cFind.Close();
	
	if (bRetVal)
		bRetVal = ::RemoveDirectory(cstrPath);
	else
		// put a failure message here

	return bRetVal;
}


Jason Henderson
start page ; articles
henderson is coming
henderson is an opponent's worst nightmare
* googlism *


GeneralRe: Function required similar to DOS "deltree.exe" Pin
Alvaro Mendez30-Dec-02 10:06
Alvaro Mendez30-Dec-02 10:06 
GeneralRe: Function required similar to DOS "deltree.exe" Pin
Jason Henderson30-Dec-02 10:15
Jason Henderson30-Dec-02 10:15 
GeneralRe: Function required similar to DOS "deltree.exe" Pin
Ancient Dragon31-Dec-02 2:00
Ancient Dragon31-Dec-02 2:00 
GeneralRe: Function required similar to DOS "deltree.exe" Pin
Jason Henderson31-Dec-02 2:44
Jason Henderson31-Dec-02 2:44 
GeneralRe: Function required similar to DOS "deltree.exe" Pin
Alvaro Mendez30-Dec-02 9:50
Alvaro Mendez30-Dec-02 9:50 
GeneralRe: Function required similar to DOS "deltree.exe" Pin
karl_w31-Dec-02 1:03
karl_w31-Dec-02 1:03 
GeneralRe: Function required similar to DOS "deltree.exe" Pin
Still learning how to code31-Dec-02 2:48
Still learning how to code31-Dec-02 2:48 
QuestionFindFirstFile wants an unsigned short* ? Pin
Fahr30-Dec-02 7:03
Fahr30-Dec-02 7:03 
AnswerRe: FindFirstFile wants an unsigned short* ? Pin
Chris Losinger30-Dec-02 7:12
professionalChris Losinger30-Dec-02 7:12 
GeneralRe: FindFirstFile wants an unsigned short* ? Pin
User 665830-Dec-02 7:41
User 665830-Dec-02 7:41 
GeneralRe: FindFirstFile wants an unsigned short* ? Pin
Fahr30-Dec-02 9:41
Fahr30-Dec-02 9:41 
GeneralRe: FindFirstFile wants an unsigned short* ? Pin
Fahr30-Dec-02 9:58
Fahr30-Dec-02 9:58 
GeneralRe: FindFirstFile wants an unsigned short* ? Pin
Fahr30-Dec-02 9:08
Fahr30-Dec-02 9:08 
GeneralRe: FindFirstFile wants an unsigned short* ? Pin
Chris Losinger30-Dec-02 13:17
professionalChris Losinger30-Dec-02 13:17 
GeneralSetting cursor position in CComboBox Pin
The Lady of Shallots30-Dec-02 7:00
The Lady of Shallots30-Dec-02 7:00 
GeneralRe: Setting cursor position in CComboBox Pin
Nick Parker30-Dec-02 17:54
protectorNick Parker30-Dec-02 17:54 
GeneralRe: Setting cursor position in CComboBox Pin
The Lady of Shallots31-Dec-02 2:16
The Lady of Shallots31-Dec-02 2: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.