Click here to Skip to main content
15,917,565 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: COleDropTarget.Register() problem - HELP ! Pin
Jörgen Sigvardsson30-Nov-03 11:47
Jörgen Sigvardsson30-Nov-03 11:47 
GeneralRe: COleDropTarget.Register() problem - HELP ! Pin
Still learning how to code30-Nov-03 21:42
Still learning how to code30-Nov-03 21:42 
GeneralShellExecute problem Pin
nss30-Nov-03 5:04
nss30-Nov-03 5:04 
GeneralRe: ShellExecute problem Pin
BaldwinMartin30-Nov-03 6:20
BaldwinMartin30-Nov-03 6:20 
GeneralRe: ShellExecute problem Pin
nss30-Nov-03 6:53
nss30-Nov-03 6:53 
GeneralRe: ShellExecute problem Pin
Michael Dunn30-Nov-03 8:38
sitebuilderMichael Dunn30-Nov-03 8:38 
GeneralRe: ShellExecute problem Pin
BaldwinMartin30-Nov-03 19:49
BaldwinMartin30-Nov-03 19:49 
GeneralSetting File Attributes Pin
#realJSOP30-Nov-03 3:44
professional#realJSOP30-Nov-03 3:44 
Visual C++ 6.0/SP5

I have written a program that sets folders to be either "hidden" or "normal" (based on user selections). This program works just fine on Win2K and WinXP, but Win98 users aren't seeing any success at all. Here's the code I'm using:

void CMyClass::ChangeFolderAttributes(CPersonality* pItem)
{
	if (g_pPersonHelper->GetChangeTrackFiles())
	{
		CTracksINI* pTracksINI = GetSimTrackList(SIM_NR2K3);
		if (pTracksINI)
		{
			CString sInstalledTrackDir = "";
			CString sInstalledFullPath = "";
			int nInstalledCount = pTracksINI->GetCount();

			for (int i = 0; i < nInstalledCount; i++)
			{
				// get the track folder name
				sInstalledTrackDir = pTracksINI->GetTrack(i)->GetTrackDir();

				// make a fully qualified path
				sInstalledFullPath.Format("%stracks\\%s", m_sSimPath, sInstalledTrackDir);

				// see if it's in the trackset
				bool  bInTrackSet = g_pTrackSetHelper->GetTrackSet(pItem->GetTrackSet())->TrackIsInSet(sInstalledTrackDir);

				DWORD dwDesiredAttrib = (bInTrackSet) ? FILE_ATTRIBUTE_NORMAL : FILE_ATTRIBUTE_HIDDEN;

				BOOL  bResult     = SetFileAttributes((LPCTSTR)sInstalledFullPath, dwDesiredAttrib); 
			}
		}
		else
		{
			// pTracksINI is NULL - not an error
		}
	}
	else
	{
		// user doesn't want to play with tracksets - not an error
	}
}


I've scoured the MSDN stuff, google the API calls, and checked a number of programming bulletin boards, but there is no mention of an incompatibility.

The one thing I did notice is that when I manually select a folder and set it to hidden (using Windows Explorer) Win2k asks is I also want to hide all of the sub-items. I don't have a Win9x box, so I can't see if Win9x does the same thing, but I don't remember that happening.



------- signature starts

"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

"You won't like me when I'm angry..." - Dr. Bruce Banner

Please review the Legal Disclaimer in my bio.

------- signature ends
GeneralRe: Setting File Attributes Pin
Michael Dunn30-Nov-03 8:49
sitebuilderMichael Dunn30-Nov-03 8:49 
QuestionHow Creating Login with Password included by Dot? Pin
YULISA30-Nov-03 3:43
YULISA30-Nov-03 3:43 
QuestionHow Creating Login with Password included by Dot? Pin
YULISA30-Nov-03 3:38
YULISA30-Nov-03 3:38 
GeneralUSB Port &amp; IEEE1394 Pin
mhmoud rawas30-Nov-03 2:22
mhmoud rawas30-Nov-03 2:22 
GeneralHelp of the program Pin
Member 64882830-Nov-03 2:04
Member 64882830-Nov-03 2:04 
GeneralRe: Help of the program Pin
Michael P Butler30-Nov-03 3:16
Michael P Butler30-Nov-03 3:16 
Generalregd CFile Object Pin
karteek30-Nov-03 1:24
karteek30-Nov-03 1:24 
GeneralRe: regd CFile Object Pin
David Wulff30-Nov-03 2:36
David Wulff30-Nov-03 2:36 
GeneralGetSystemMenu() doesn't contain Minimize/Maximize Pin
ohadp30-Nov-03 1:12
ohadp30-Nov-03 1:12 
GeneralRe: GetSystemMenu() doesn't contain Minimize/Maximize Pin
Michael Dunn30-Nov-03 8:56
sitebuilderMichael Dunn30-Nov-03 8:56 
GeneralRe: GetSystemMenu() doesn't contain Minimize/Maximize Pin
ohadp30-Nov-03 18:43
ohadp30-Nov-03 18:43 
GeneralSHGetPathFromIDList fails for the PIDL of the Recycle-Bin Pin
ohadp30-Nov-03 0:44
ohadp30-Nov-03 0:44 
GeneralRe: SHGetPathFromIDList fails for the PIDL of the Recycle-Bin Pin
Jörgen Sigvardsson30-Nov-03 11:51
Jörgen Sigvardsson30-Nov-03 11:51 
QuestionWSANO_DATA- WHAT does this mean? Pin
Stan the man30-Nov-03 0:20
Stan the man30-Nov-03 0:20 
Questionhow to create a shortcut to a dialup networking connection programmtically Pin
jetboy29-Nov-03 23:58
jetboy29-Nov-03 23:58 
GeneralProblems by catching outlook events Pin
derzellner29-Nov-03 23:52
derzellner29-Nov-03 23:52 
Generalwsnprintf() method .h file needed .. Pin
derik_konark29-Nov-03 23:52
derik_konark29-Nov-03 23:52 

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.