Windows 7 新特性 Shell Library 编程接口介绍
2009-09-04 00:00:00 来源:WEB开发网管理Windows Shell Library
你可以通过调用SHShowManageLibraryUI API显示出Windows 标准的Shell Library管理对话框。值得注意的是,在调用SHShowManageLibraryUI前请确保 shell library没有被以可写方式打开。否则在SHShowManageLibraryUI中对shell library的修改将无法被保存。
C++ ShowManageLibraryUI
/**//*!
* Shows the library management dialog box of the specified library, which
* enables users to manage the library folders and default save location.
*
* \param pwszLibraryName
* The name of the shell library
*/
BOOL ShowManageLibraryUI(LPWSTR pwszLibraryName)
{
// Get the shell item that represents the library.
IShellItem2* pShellItem = GetShellLibraryItem(pwszLibraryName);
HRESULT hr = SHShowManageLibraryUI(pShellItem, NULL,
L"CppWin7ShellLibrary", L"Manage Library folders and settings",
LMD_ALLOWUNINDEXABLENETWORKLOCATIONS);
// Clean up
if (pShellItem != NULL)
pShellItem->Release();
return SUCCEEDED(hr);
}
更多精彩
赞助商链接