我是Namespace Extensions的新手。我正在尝试禁用命名空间扩展的导航窗格。
我有我的Shell View实现工具IFolderView :: GetFolder,它返回一个IShellFolder对象。 Shell Folder类正在实现IExplorerPaneVisibility :: GetPaneState方法。
但是我没有得到GetFolder(IID_ExplorerPaneVisibility)调用。有人可以帮我这个吗?
STDMETHODIMP ShellFolderViewImpl::GetFolder(REFIID riid, VOID ** ppv)
{
if (riid == IID_IExplorerPaneVisibility)
{
this->QueryInterface(riid, (void**)ppv);
}
return S_OK;
}
STDMETHODIMP ShellFolderViewImpl::GetPaneState(REFEXPLORERPANE ep,EXPLORERPANESTATE * peps)
{
if (ep == EP_NavPane)
*peps = EPS_DEFAULT_OFF;
else if (ep == EP_Commands)
*peps = EPS_DEFAULT_OFF;
else if (ep == EP_DetailsPane)
*peps = EPS_DEFAULT_OFF;
else if (ep == EP_AdvQueryPane)
*peps = EPS_DEFAULT_OFF;
else if (ep == EP_QueryPane)
*peps = EPS_DEFAULT_OFF;
else
*peps = EPS_DONTCARE;
return S_OK;
}
答案 0 :(得分:0)
从Shell中检索IExplorerPaneVisibility实现 夹。反过来,Shell文件夹将从视图中检索。
我将此解释为;它将使用您的IShellFolder QueryInterface来获取您的IExplorerPaneVisibility实现。
您还应该检查this newsgroup thread,它显示了关闭某些窗格可能需要的一些解决方法。
我希望你的代码不是真正的实现,你永远不应该在GetFolder中返回S_OK,因为你不认识的东西!