VC+获取系统特殊文件夹的路径如:系统目录,桌面等

上传人:cn****1 文档编号:512051603 上传时间:2023-07-10 格式:DOC 页数:8 大小:42.50KB
返回 下载 相关 举报
VC+获取系统特殊文件夹的路径如:系统目录,桌面等_第1页
第1页 / 共8页
VC+获取系统特殊文件夹的路径如:系统目录,桌面等_第2页
第2页 / 共8页
VC+获取系统特殊文件夹的路径如:系统目录,桌面等_第3页
第3页 / 共8页
VC+获取系统特殊文件夹的路径如:系统目录,桌面等_第4页
第4页 / 共8页
VC+获取系统特殊文件夹的路径如:系统目录,桌面等_第5页
第5页 / 共8页
点击查看更多>>
资源描述

《VC+获取系统特殊文件夹的路径如:系统目录,桌面等》由会员分享,可在线阅读,更多相关《VC+获取系统特殊文件夹的路径如:系统目录,桌面等(8页珍藏版)》请在金锄头文库上搜索。

1、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_NETH

2、OOD网上邻居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.CombinethisCSIDLwithanyofthefollowing

3、CSIDLstoforcethecreationoftheassociatedfolder.CSIDL_ADMINTOOLS(0x0030)Version5.0.Thefilesystemdirectorythatisusedtostoreadministrativetoolsforanindividualuser.TheMicrosoftManagementConsole(MMC)willsavecustomizedconsolestothisdirectory,anditwillroamwiththeuser.CSIDL_ALTSTARTUP(0x001d)Thefilesystemdir

4、ectorythatcorrespondstotheusersnonlocalizedStartupprogramgroup.CSIDL_APPDATA(0x001a)Version4.71.Thefilesystemdirectorythatservesasacommonrepositoryforapplication-specificdata.AtypicalpathisC:DocumentsandSettingsusernameApplicationData.ThisCSIDLissupportedbytheredistributableShfolder.dllforsystemstha

5、tdonothavetheMicrosoft®InternetExplorer4.0integratedShellinstalled.CSIDL_BITBUCKET(0x000a)ThevirtualfoldercontainingtheobjectsintheusersRecycleBin.CSIDL_CDBURN_AREA(0x003b)Version6.0.ThefilesystemdirectoryactingasastagingareaforfileswaitingtobewrittentoCD.AtypicalpathisC:DocumentsandSettingsuser

6、nameLocalSettingsApplicationDataMicrosoftCDBurning.CSIDL_COMMON_ADMINTOOLS(0x002f)Version5.0.Thefilesystemdirectorycontainingadministrativetoolsforallusersofthecomputer.CSIDL_COMMON_ALTSTARTUP(0x001e)ThefilesystemdirectorythatcorrespondstothenonlocalizedStartupprogramgroupforallusers.ValidonlyforMic

7、rosoftWindowsNT®systems.Version5.0.Thefilesystemdirectorycontainingapplicationdataforallusers.AtypicalpathisC:DocumentsandSettingsAllUsersApplicationData.CSIDL_COMMON_DESKTOPDIRECTORY(0x0019)/获取桌面CSIDL_COMMON_DOCUMENTS(0x002e)Thefilesystemdirectorythatcontainsdocumentsthatarecommontoallusers.Aty

8、picalpathsisC:DocumentsandSettingsAllUsersDocuments.ValidforWindowsNTsystemsandMicrosoftWindows®95andWindows98systemswithShfolder.dllinstalled.CSIDL_COMMON_FAVORITES(0x001f)/获取收藏文件夹Thefilesystemdirectorythatservesasacommonrepositoryforfavoriteitemscommontoallusers.ValidonlyforWindowsNTsystems.CS

9、IDL_COMMON_MUSIC(0x0035)Version6.0.Thefilesystemdirectorythatservesasarepositoryformusicfilescommontoallusers.AtypicalpathisC:DocumentsandSettingsAllUsersDocumentsMyMusic.CSIDL_COMMON_PICTURES(0x0036)Version6.0.Thefilesystemdirectorythatservesasarepositoryforimagefilescommontoallusers.Atypicalpathis

10、C:DocumentsandSettingsAllUsersDocumentsMyPictures.CSIDL_COMMON_PROGRAMS(0x0017)/获取程序菜单目录ThefilesystemdirectorythatcontainsthedirectoriesforthecommonprogramgroupsthatappearontheStartmenuforallusers.AtypicalpathisC:DocumentsandSettingsAllUsersStartMenuPrograms.ValidonlyforWindowsNTsystems.CSIDL_COMMON

11、_STARTMENU(0x0016)/开始菜单ThefilesystemdirectorythatcontainstheprogramsandfoldersthatappearontheStartmenuforallusers.AtypicalpathisC:DocumentsandSettingsAllUsersStartMenu.ValidonlyforWindowsNTsystems.CSIDL_COMMON_STARTUP(0x0018)/获取启动菜单ThefilesystemdirectorythatcontainstheprogramsthatappearintheStartupf

12、olderforallusers.AtypicalpathisC:DocumentsandSettingsAllUsersStartMenuProgramsStartup.ValidonlyforWindowsNTsystems.CSIDL_COMMON_TEMPLATES(0x002d)/临时文件夹Thefilesystemdirectorythatcontainsthetemplatesthatareavailabletoallusers.AtypicalpathisC:DocumentsandSettingsAllUsersTemplates.ValidonlyforWindowsNTs

13、ystems.CSIDL_COMMON_VIDEO(0x0037)Version6.0.Thefilesystemdirectorythatservesasarepositoryforvideofilescommontoallusers.AtypicalpathisC:DocumentsandSettingsAllUsersDocumentsMyVideos.CSIDL_CONTROLS(0x0003)ThevirtualfoldercontainingiconsfortheControlPanelapplications.CSIDL_COOKIES(0x0021)/获取Cookies目录Th

14、efilesystemdirectorythatservesasacommonrepositoryforInternetcookies.AtypicalpathisC:DocumentsandSettingsusernameCookies.CSIDL_DESKTOP(0x0000)/获取桌面ThevirtualfolderrepresentingtheWindowsdesktop,therootofthenamespace.CSIDL_DESKTOPDIRECTORY(0x0010)/获取桌面Thefilesystemdirectoryusedtophysicallystorefileobje

15、ctsonthedesktop(nottobeconfusedwiththedesktopfolderitself).AtypicalpathisC:DocumentsandSettingsusernameDesktop.ThevirtualfolderrepresentingMyComputer,containingeverythingonthelocalcomputer:storagedevices,printers,andControlPanel.Thefoldermayalsocontainmappednetworkdrives.CSIDL_FAVORITES(0x0006)Thefi

16、lesystemdirectorythatservesasacommonrepositoryfortheusersfavoriteitems.AtypicalpathisC:DocumentsandSettingsusernameFavorites.CSIDL_FONTS(0x0014)/获取字体目录Avirtualfoldercontainingfonts.AtypicalpathisC:WindowsFonts.CSIDL_HISTORY(0x0022)/获取历史目录ThefilesystemdirectorythatservesasacommonrepositoryforInternethistoryitems.CSI

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 解决方案

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号