How to active "my computer" in my program

axi 2000-01-08 04:24:00
How to active "my computer" in my program
...全文
1225 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
kxy 2000-01-14
  • 打赏
  • 举报
回复
留着吧,要不然告诉zdg, zdg@csdn.net
WHQ 2000-01-14
  • 打赏
  • 举报
回复
多贴了一次,怎么删除?
WHQ 2000-01-14
  • 打赏
  • 举报
回复
WINSHELLAPI HRESULT WINAPI SHGetSpecialFolderLocation(
HWND hwndOwner,
int nFolder,
LPITEMIDLIST *ppidl
);
其中 nFolder 取值为CSIDL_DRIVES,详细说明如下:
[Now Supported on Windows NT]

Retrieves the location of a special folder.

WINSHELLAPI HRESULT WINAPI SHGetSpecialFolderLocation(;

HWND hwndOwner,
int nFolder,
LPITEMIDLIST *ppidl
);


Parameters

hwndOwner

Handle of the owner window that the client should specify if it displays a dialog box or message box.

nFolder

Value specifying the folder to retrieve the location of. This parameter can be one of the following values:

CSIDL_BITBUCKET Recycle bin ?file system directory containing file objects in the user's recycle bin. The location of this directory is not in the registry; it is marked with the hidden and system attributes to prevent the user from moving or deleting it.
CSIDL_CONTROLS Control Panel ?virtual folder containing icons for the control panel applications.
CSIDL_DESKTOP Windows desktop ?virtual folder at the root of the name space.
CSIDL_DESKTOPDIRECTORY File system directory used to physically store file objects on the desktop (not to be confused with the desktop folder itself).
CSIDL_DRIVES My Computer ?virtual folder containing everything on the local computer: storage devices, printers, and Control Panel. The folder may also contain mapped network drives.
CSIDL_FONTS Virtual folder containing fonts.
CSIDL_NETHOOD File system directory containing objects that appear in the network neighborhood.
CSIDL_NETWORK Network Neighborhood ?virtual folder representing the top level of the network hierarchy.
CSIDL_PERSONAL File system directory that serves as a common respository for documents.
CSIDL_PRINTERS Printers folder ?virtual folder containing installed printers.
CSIDL_PROGRAMS File system directory that contains the user's program groups (which are also file system directories).
CSIDL_RECENT File system directory that contains the user's most recently used documents.
CSIDL_SENDTO File system directory that contains Send To menu items.
CSIDL_STARTMENU File system directory containing Start menu items.
CSIDL_STARTUP File system directory that corresponds to the user's Startup program group.
CSIDL_TEMPLATES File system directory that serves as a common repository for document templates.


ppidl

Address that receives a pointer to an item identifier list specifying the folder's location relative to the root of the name space (the desktop).



Return Values

Returns NOERROR if successful or an OLE-defined error result otherwise.
ljunfa 2000-01-14
  • 打赏
  • 举报
回复
请将问题详细点,好不好!
Fancy 2000-01-14
  • 打赏
  • 举报
回复
Using SHGetSpecialFolderPath get the path of "my computer",
then using ShellExecute open it!

16,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧