Click here to Skip to main content
15,914,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Item changed event in CListCtrl Pin
tataxin24-Jul-08 20:16
tataxin24-Jul-08 20:16 
Questionhow do i know the number of messages left unprocessed in a message queue? Pin
namaskaaram21-Jul-08 4:28
namaskaaram21-Jul-08 4:28 
AnswerRe: how do i know the number of messages left unprocessed in a message queue? Pin
Patrick G21-Jul-08 5:46
Patrick G21-Jul-08 5:46 
GeneralRe: how do i know the number of messages left unprocessed in a message queue? Pin
namaskaaram21-Jul-08 22:15
namaskaaram21-Jul-08 22:15 
GeneralRe: how do i know the number of messages left unprocessed in a message queue? Pin
Patrick G22-Jul-08 2:41
Patrick G22-Jul-08 2:41 
QuestionRe: how do i know the number of messages left unprocessed in a message queue? Pin
David Crow22-Jul-08 2:50
David Crow22-Jul-08 2:50 
GeneralRe: how do i know the number of messages left unprocessed in a message queue? Pin
Mark Salsbery22-Jul-08 4:57
Mark Salsbery22-Jul-08 4:57 
QuestionDeletion of a directory Pin
Abhinay Kumar21-Jul-08 4:12
Abhinay Kumar21-Jul-08 4:12 
Suppose the path comes as C:\Program Files\n1\n2,the code i am mentioning below only deletes the contents of n2 and n2.what modification should i do to delete n1 also.please reply immeaditely,as my project deadline is appraoching near.if posible reply to my e-mailid abhinay.krs@gmail.com

BOOL CMbaloadApp::DeletePath (CString& path)
{
HANDLE hFile = INVALID_HANDLE_VALUE;
WIN32_FIND_DATA fd;
CString buffer;
BOOL bContinue = TRUE;

// Build enumeration of path contents
buffer = path;
NameAppendFile (buffer, "*.*");

// Init buffes
memset (&fd, 0, sizeof(fd));

// Perform find first...
hFile = FindFirstFile (buffer, &fd);
if (hFile != INVALID_HANDLE_VALUE)
{
do
{
// Check for directory attribute on
if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
// Directory Found!

// Make sure we don't have "." or ".."
if ( strcmp (fd.cFileName, ".") &&
strcmp (fd.cFileName, "..") )
{
// We have a valid directory, build path to it and
// call self to remove all
buffer = path;
NameAppendFile (buffer, fd.cFileName);
bContinue = DeletePath (buffer);
}
}
else
{
// Remove this file
buffer = path;
NameAppendFile (buffer, fd.cFileName);

// Normalize the file attributes prior to deleting it
SetFileAttributes(buffer, FILE_ATTRIBUTE_NORMAL);

TRY
{
// Get rid of it...
CFile::Remove (buffer);
}
CATCH( CFileException, e )
{
// Flag it, we can't remove directory
bContinue = FALSE;
DumpDebug ("Failed to delete file %s", buffer, 1);
}
END_CATCH
}

// Find the next entry...
} while (FindNextFile (hFile, &fd));

// Release file handle info
FindClose (hFile);
}

// Remove actual path itself
if (bContinue)
{
bContinue = (_rmdir(path) == 0);
}

return bContinue;
}
AnswerRe: Deletion of a directory Pin
David Crow21-Jul-08 5:01
David Crow21-Jul-08 5:01 
GeneralRe: Deletion of a directory Pin
Abhinay Kumar21-Jul-08 6:52
Abhinay Kumar21-Jul-08 6:52 
GeneralRe: Deletion of a directory Pin
David Crow21-Jul-08 7:00
David Crow21-Jul-08 7:00 
GeneralRe: Deletion of a directory Pin
Abhinay Kumar22-Jul-08 21:36
Abhinay Kumar22-Jul-08 21:36 
QuestionRe: Deletion of a directory Pin
David Crow23-Jul-08 7:40
David Crow23-Jul-08 7:40 
QuestionHow to Call structures from c# dll Pin
manju#12321-Jul-08 3:09
manju#12321-Jul-08 3:09 
QuestionRe: How to Call structures from c# dll Pin
David Crow21-Jul-08 3:53
David Crow21-Jul-08 3:53 
AnswerRe: How to Call structures from c# dll Pin
Alan Balkany21-Jul-08 5:39
Alan Balkany21-Jul-08 5:39 
QuestionUser privillage Pin
pooja_friends21-Jul-08 2:32
pooja_friends21-Jul-08 2:32 
AnswerRe: User privillage Pin
KarstenK21-Jul-08 2:49
mveKarstenK21-Jul-08 2:49 
QuestionEdit System file Pin
pooja_friends21-Jul-08 2:31
pooja_friends21-Jul-08 2:31 
AnswerRe: Edit System file Pin
David Crow21-Jul-08 2:49
David Crow21-Jul-08 2:49 
AnswerRe: Edit System file Pin
_AnsHUMAN_ 21-Jul-08 2:52
_AnsHUMAN_ 21-Jul-08 2:52 
GeneralRe: Edit System file Pin
pooja_friends21-Jul-08 4:04
pooja_friends21-Jul-08 4:04 
QuestionProcessShellCommand() gives unhandled exception in VS2005 Pin
Shaileshhex21-Jul-08 1:42
Shaileshhex21-Jul-08 1:42 
AnswerRe: ProcessShellCommand() gives unhandled exception in VS2005 Pin
_AnsHUMAN_ 21-Jul-08 1:48
_AnsHUMAN_ 21-Jul-08 1:48 
AnswerRe: ProcessShellCommand() gives unhandled exception in VS2005 Pin
KarstenK21-Jul-08 2:50
mveKarstenK21-Jul-08 2:50 

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.