Open Desktop Items
Posted on 2002-04-22
I'm making a Desktop kind of program.
It scans the Desktop Folder via:
if( SHGetDesktopFolder(&pDTF) == NOERROR )
if( pDTF->EnumObjects(hWnd, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN, &pEIL) == NOERROR )
while( pEIL->Next(1, &pDTIcon, &uNumIcon) == NOERROR )
if( SHGetFileInfo((LPCTSTR)pDTIcon, 0, &fi, sizeof(fi), SHGFI_DISPLAYNAME | SHGFI_PIDL | SHGFI_ICON | SHGFI_TYPENAME | (bSmall ? SHGFI_SMALLICON : SHGFI_LARGEICON)) )
It works perfectly
But now my question:
I want to open all of the items in the Desktop Folder (not all at once ofcourse). There are also the items like "My Computer" "Internet Explorer" etc. those are "Sytem Folders" (fi.szTypeName). How can I open/run these system folder types??
The "My Documents" is no problem, I can get the path (SHGetPathFromIDList()) and ShellExecute it, but those other ones??
Can somebody help me?
If the question is too hard for 100 points just let me know!