Click here to Skip to main content
15,922,145 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: get member var from App Pin
JabraJabra30-Jun-04 23:43
JabraJabra30-Jun-04 23:43 
GeneralToolBar won't un-hide correctly. Pin
zooosta30-Jun-04 21:13
zooosta30-Jun-04 21:13 
GeneralRe: ToolBar won't un-hide correctly. Pin
bneacetp30-Jun-04 23:58
bneacetp30-Jun-04 23:58 
GeneralRe: ToolBar won't un-hide correctly. Pin
zooosta1-Jul-04 13:05
zooosta1-Jul-04 13:05 
GeneralRe: ToolBar won't un-hide correctly. Pin
bneacetp1-Jul-04 13:25
bneacetp1-Jul-04 13:25 
GeneralRe: ToolBar won't un-hide correctly. Pin
bneacetp1-Jul-04 13:28
bneacetp1-Jul-04 13:28 
GeneralRe: ToolBar won't un-hide correctly. Pin
zooosta1-Jul-04 13:35
zooosta1-Jul-04 13:35 
GeneralRe: ToolBar won't un-hide correctly. Pin
bneacetp1-Jul-04 13:53
bneacetp1-Jul-04 13:53 
Generalquestion related to system font Pin
johnny,Kim30-Jun-04 20:26
johnny,Kim30-Jun-04 20:26 
GeneralUsing SpinButtonCtrl Pin
Shuang. Wu30-Jun-04 20:13
Shuang. Wu30-Jun-04 20:13 
GeneralRe: Using SpinButtonCtrl Pin
bneacetp1-Jul-04 0:05
bneacetp1-Jul-04 0:05 
GeneralRe: Using SpinButtonCtrl Pin
Shuang. Wu1-Jul-04 16:10
Shuang. Wu1-Jul-04 16:10 
GeneralRe: Using SpinButtonCtrl Pin
bneacetp1-Jul-04 16:45
bneacetp1-Jul-04 16:45 
GeneralRe: Using SpinButtonCtrl Pin
Shuang. Wu1-Jul-04 19:17
Shuang. Wu1-Jul-04 19:17 
GeneralRe: Using SpinButtonCtrl Pin
bneacetp1-Jul-04 20:35
bneacetp1-Jul-04 20:35 
QuestionHow to find location of Button? Pin
Rajesh_K_Sharma30-Jun-04 18:56
Rajesh_K_Sharma30-Jun-04 18:56 
AnswerRe: How to find location of Button? Pin
Neville Franks30-Jun-04 23:54
Neville Franks30-Jun-04 23:54 
AnswerRe: How to find location of Button? Pin
Antony M Kancidrowski1-Jul-04 0:00
Antony M Kancidrowski1-Jul-04 0:00 
Questionare dialog boxes the way to go? Pin
AmericanBacon30-Jun-04 18:47
AmericanBacon30-Jun-04 18:47 
AnswerRe: are dialog boxes the way to go? Pin
Steve Mayfield30-Jun-04 19:02
Steve Mayfield30-Jun-04 19:02 
AnswerRe: are dialog boxes the way to go? Pin
palbano1-Jul-04 4:52
palbano1-Jul-04 4:52 
QuestionHow to insert Borland C++ program into a MFC thread? Pin
Einly30-Jun-04 17:49
Einly30-Jun-04 17:49 
AnswerRe: How to insert Borland C++ program into a MFC thread? Pin
valikac1-Jul-04 11:30
valikac1-Jul-04 11:30 
GeneralNeed help w/ a simple recursive function Pin
georgiek5030-Jun-04 17:29
georgiek5030-Jun-04 17:29 
I wrote a function a while back to clean out a directory and all of its contents and tried re-writing the same one tonight but can't seem to get it right. Any chance someone can point out my mistake?

short ClearEntireDirectory(char *szDirectory)
{
	// Function to work on a directory until everything is wiped out

	HANDLE hFile;
	WIN32_FIND_DATA wfd;

	if ( SetCurrentDirectory(szDirectory) == 0 )
		return 1;

	hFile = FindFirstFile("*.*", &wfd);

	while ( FindNextFile(hFile, &wfd) != 0 )
	{
		if ( wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY &&
			 strcmp(wfd.cFileName, "..") != 0 &&
			 strcmp(wfd.cFileName, ".")  != 0
		   )
		{
			if ( ClearEntireDirectory(wfd.cFileName) == 1 )
				return 1;
		}

		DeleteFile(wfd.cFileName);
	}

	if ( SetCurrentDirectory("..") == 0 )
		return 1;

	if ( RemoveDirectory(szDirectory) == 0 )
		return 1;

	FindClose(hFile);

	return 0;
}


I keep getting error 32 (ERROR_SHARING_VIOLATION) when I try to ultimatelly remove the directory.
GeneralRe: Need help w/ a simple recursive function Pin
georgiek5030-Jun-04 17:39
georgiek5030-Jun-04 17:39 

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.