本文整理汇总了C++中IShellView::UIActivate方法的典型用法代码示例。如果您正苦于以下问题:C++ IShellView::UIActivate方法的具体用法?C++ IShellView::UIActivate怎么用?C++ IShellView::UIActivate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IShellView
的用法示例。
在下文中一共展示了IShellView::UIActivate方法的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);
}
示例2: PyCom_BuildPyException
// @pymethod |PyIShellView|UIActivate|Description of UIActivate.
PyObject *PyIShellView::UIActivate(PyObject *self, PyObject *args)
{
IShellView *pISV = GetI(self);
if ( pISV == NULL )
return NULL;
// @pyparm int|uState||Description for uState
UINT uState;
if ( !PyArg_ParseTuple(args, "i:UIActivate", &uState) )
return NULL;
HRESULT hr;
PY_INTERFACE_PRECALL;
hr = pISV->UIActivate( uState );
PY_INTERFACE_POSTCALL;
if ( FAILED(hr) )
return PyCom_BuildPyException(hr, pISV, IID_IShellView );
Py_INCREF(Py_None);
return Py_None;
}
示例3: 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);
}