资源预览内容
第1页 / 共8页
第2页 / 共8页
第3页 / 共8页
第4页 / 共8页
第5页 / 共8页
第6页 / 共8页
第7页 / 共8页
第8页 / 共8页
亲,该文档总共8页全部预览完了,如果喜欢就下载吧!
资源描述
VC如果需要,请在StdAfx.h中添加#includeTCHARMyDir_MAX_PATH;SHGetSpecialFolderPath(this-GetSafeHwnd(),MyDir,CSIDL_APPDATA,0);AfxMessageBox(MyDir);其中第三个参数CSIDL_APPDATA可以为以下的值:CSIDL_BITBUCKET回收站CSIDL_CONTROLS控制面板CSIDL_DESKTOPWindows桌面DesktopCSIDL_DESKTOPDIRECTORYDesktop的目录CSIDL_DRIVES我的电脑CSIDL_FONTS字体目录CSIDL_NETHOOD网上邻居CSIDL_NETWORK网上邻居虚拟目录CSIDL_PERSONAL我的文档CSIDL_PRINTERS打印机CSIDL_PROGRAMS程序组CSIDL_RECENT最近打开的文档CSIDL_SENDTO“发送到”菜单项CSIDL_STARTMENU任务条启动菜单项CSIDL_STARTUP启动目录CSIDL_TEMPLATES文档模板如果下面的值在VC开发环境中不存在话,可以在VC98/include/SHLOBJ.H中定义该变量CSIDL_FLAG_CREATE(0x8000)Version5.0.CombinethisCSIDLwithanyofthefollowingCSIDLstoforcethecreationoftheassociatedfolder.CSIDL_ADMINTOOLS(0x0030)Version5.0.Thefilesystemdirectorythatisusedtostoreadministrativetoolsforanindividualuser.TheMicrosoftManagementConsole(MMC)willsavecustomizedconsolestothisdirectory,anditwillroamwiththeuser.CSIDL_ALTSTARTUP(0x001d)ThefilesystemdirectorythatcorrespondstotheusersnonlocalizedStartupprogramgroup.CSIDL_APPDATA(0x001a)Version4.71.Thefilesystemdirectorythatservesasacommonrepositoryforapplication-specificdata.AtypicalpathisC:DocumentsandSettingsusernameApplicationData.ThisCSIDLissupportedbytheredistributableShfolder.dllforsystemsthatdonothavetheMicrosoft®InternetExplorer4.0integratedShellinstalled.CSIDL_BITBUCKET(0x000a)ThevirtualfoldercontainingtheobjectsintheusersRecycleBin.CSIDL_CDBURN_AREA(0x003b)Version6.0.ThefilesystemdirectoryactingasastagingareaforfileswaitingtobewrittentoCD.AtypicalpathisC:DocumentsandSettingsusernameLocalSettingsApplicationDataMicrosoftCDBurning.CSIDL_COMMON_ADMINTOOLS(0x002f)Version5.0.Thefilesystemdirectorycontainingadministrativetoolsforallusersofthecomputer.CSIDL_COMMON_ALTSTARTUP(0x001e)ThefilesystemdirectorythatcorrespondstothenonlocalizedStartupprogramgroupforallusers.ValidonlyforMicrosoftWindowsNT®systems.Version5.0.Thefilesystemdirectorycontainingapplicationdataforallusers.AtypicalpathisC:DocumentsandSettingsAllUsersApplicationData.CSIDL_COMMON_DESKTOPDIRECTORY(0x0019)/获取桌面CSIDL_COMMON_DOCUMENTS(0x002e)Thefilesystemdirectorythatcontainsdocumentsthatarecommontoallusers.AtypicalpathsisC:DocumentsandSettingsAllUsersDocuments.ValidforWindowsNTsystemsandMicrosoftWindows®95andWindows98systemswithShfolder.dllinstalled.CSIDL_COMMON_FAVORITES(0x001f)/获取收藏文件夹Thefilesystemdirectorythatservesasacommonrepositoryforfavoriteitemscommontoallusers.ValidonlyforWindowsNTsystems.CSIDL_COMMON_MUSIC(0x0035)Version6.0.Thefilesystemdirectorythatservesasarepositoryformusicfilescommontoallusers.AtypicalpathisC:DocumentsandSettingsAllUsersDocumentsMyMusic.CSIDL_COMMON_PICTURES(0x0036)Version6.0.Thefilesystemdirectorythatservesasarepositoryforimagefilescommontoallusers.AtypicalpathisC:DocumentsandSettingsAllUsersDocumentsMyPictures.CSIDL_COMMON_PROGRAMS(0x0017)/获取程序菜单目录ThefilesystemdirectorythatcontainsthedirectoriesforthecommonprogramgroupsthatappearontheStartmenuforallusers.AtypicalpathisC:DocumentsandSettingsAllUsersStartMenuPrograms.ValidonlyforWindowsNTsystems.CSIDL_COMMON_STARTMENU(0x0016)/开始菜单ThefilesystemdirectorythatcontainstheprogramsandfoldersthatappearontheStartmenuforallusers.AtypicalpathisC:DocumentsandSettingsAllUsersStartMenu.ValidonlyforWindowsNTsystems.CSIDL_COMMON_STARTUP(0x0018)/获取启动菜单ThefilesystemdirectorythatcontainstheprogramsthatappearintheStartupfolderforallusers.AtypicalpathisC:DocumentsandSettingsAllUsersStartMenuProgramsStartup.ValidonlyforWindowsNTsystems.CSIDL_COMMON_TEMPLATES(0x002d)/临时文件夹Thefilesystemdirectorythatcontainsthetemplatesthatareavailabletoallusers.AtypicalpathisC:DocumentsandSettingsAllUsersTemplates.ValidonlyforWindowsNTsystems.CSIDL_COMMON_VIDEO(0x0037)Version6.0.Thefilesystemdirectorythatservesasarepositoryforvideofilescommontoallusers.AtypicalpathisC:DocumentsandSettingsAllUsersDocumentsMyVideos.CSIDL_CONTROLS(0x0003)ThevirtualfoldercontainingiconsfortheControlPanelapplications.CSIDL_COOKIES(0x0021)/获取Cookies目录ThefilesystemdirectorythatservesasacommonrepositoryforInternetcookies.AtypicalpathisC:DocumentsandSettingsusernameCookies.CSIDL_DESKTOP(0x0000)/获取桌面ThevirtualfolderrepresentingtheWindowsdesktop,therootofthenamespace.CSIDL_DESKTOPDIRECTORY(0x0010)/获取桌面Thefilesystemdirectoryusedtophysicallystorefileobjectsonthedesktop(nottobeconfusedwiththedesktopfolderitself).AtypicalpathisC:DocumentsandSettingsusernameDesktop.ThevirtualfolderrepresentingMyComputer,containingeverythingonthelocalcomputer:storagedevices,printers,andControlPanel.Thefoldermayalsocontainmappednetworkdrives.CSIDL_FAVORITES(0x0006)Thefilesystemdirectorythatservesasacommonrepositoryfortheusersfavoriteitems.AtypicalpathisC:DocumentsandSettingsusernameFavorites.CSIDL_FONTS(0x0014)/获取字体目录Avirtualfoldercontainingfonts.AtypicalpathisC:WindowsFonts.CSIDL_HISTORY(0x0022)/获取历史目录ThefilesystemdirectorythatservesasacommonrepositoryforInternethistoryitems.CSI
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号