当前位置: 首页>>代码示例>>C++>>正文


C++ IShellView::GetCurrentInfo方法代码示例

本文整理汇总了C++中IShellView::GetCurrentInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ IShellView::GetCurrentInfo方法的具体用法?C++ IShellView::GetCurrentInfo怎么用?C++ IShellView::GetCurrentInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IShellView的用法示例。


在下文中一共展示了IShellView::GetCurrentInfo方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: UpdateFolderView

void ShellBrowser::UpdateFolderView(IShellFolder* folder)
{
    CONTEXT("ShellBrowser::UpdateFolderView()");

    FOLDERSETTINGS fs;
    IShellView* pLastShellView = _pShellView;

    _folder = folder;

    if (pLastShellView)
        pLastShellView->GetCurrentInfo(&fs);
    else {
        fs.ViewMode = _create_info._open_mode&OWM_DETAILS? FVM_DETAILS: FVM_ICON;
        fs.fFlags = FWF_NOCLIENTEDGE|FWF_BESTFITWINDOW;
    }

#ifndef __MINGW32__	// IShellFolderViewCB missing in MinGW (as of 25.09.2005)
    SFV_CREATE sfv_create;

    sfv_create.cbSize = sizeof(SFV_CREATE);
    sfv_create.pshf = folder;
    sfv_create.psvOuter = NULL;
    sfv_create.psfvcb = this;

    HRESULT hr = SHCreateShellFolderView(&sfv_create, &_pShellView);
#else
    HRESULT hr = folder->CreateViewObject(_hwnd, IID_IShellView, (void**)&_pShellView);
#endif

    if (FAILED(hr)) {
        _pShellView = NULL;
        return;
    }

    RECT rect = {CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT};
    hr = _pShellView->CreateViewWindow(pLastShellView, &fs, static_cast<IShellBrowser*>(this), &rect, &_right_hwnd/*&m_hWndListView*/);

    if (pLastShellView) {
        pLastShellView->GetCurrentInfo(&fs);
        pLastShellView->UIActivate(SVUIA_DEACTIVATE);
        pLastShellView->DestroyViewWindow();
        pLastShellView->Release();
    }

    _pShellView->UIActivate(SVUIA_ACTIVATE_NOFOCUS);
}
开发者ID:svn2github,项目名称:ros-explorer,代码行数:46,代码来源:shellbrowser.cpp

示例2: UpdateFolderView

void ShellBrowserChild::UpdateFolderView(IShellFolder* folder)
{
	CONTEXT("ShellBrowserChild::UpdateFolderView()");

	FOLDERSETTINGS fs;
	IShellView* pLastShellView = _pShellView;

	_folder = folder;

	if (pLastShellView)
		pLastShellView->GetCurrentInfo(&fs);
	else {
		fs.ViewMode = _create_info._open_mode&OWM_DETAILS? FVM_DETAILS: FVM_ICON;
		fs.fFlags = FWF_BESTFITWINDOW;
	}

	HRESULT hr = folder->CreateViewObject(_hwnd, IID_IShellView, (void**)&_pShellView);

	if (FAILED(hr)) {
		_pShellView = NULL;
		return;
	}

	RECT rect = {CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT};
	hr = _pShellView->CreateViewWindow(pLastShellView, &fs, static_cast<IShellBrowser*>(this), &rect, &_right_hwnd/*&m_hWndListView*/);

	if (pLastShellView) {
		pLastShellView->GetCurrentInfo(&fs);
		pLastShellView->UIActivate(SVUIA_DEACTIVATE);
		pLastShellView->DestroyViewWindow();
		pLastShellView->Release();

		resize_children();
	}

	_pShellView->UIActivate(SVUIA_ACTIVATE_NOFOCUS);
}
开发者ID:svn2github,项目名称:ros-explorer,代码行数:37,代码来源:shellbrowser.cpp

示例3: PyCom_BuildPyException

// @pymethod <o PyFOLDERSETTINGS>|PyIShellView|GetCurrentInfo|Description of GetCurrentInfo.
PyObject *PyIShellView::GetCurrentInfo(PyObject *self, PyObject *args)
{
	IShellView *pISV = GetI(self);
	if ( pISV == NULL )
		return NULL;
	FOLDERSETTINGS fs;
	if ( !PyArg_ParseTuple(args, ":GetCurrentInfo") )
		return NULL;
	HRESULT hr;
	PY_INTERFACE_PRECALL;
	hr = pISV->GetCurrentInfo(&fs);
	PY_INTERFACE_POSTCALL;
	if ( FAILED(hr) )
		return PyCom_BuildPyException(hr, pISV, IID_IShellView );
	return PyObject_FromFOLDERSETTINGS(&fs);
}
开发者ID:,项目名称:,代码行数:17,代码来源:


注:本文中的IShellView::GetCurrentInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。