shell32: Forward to CreateViewWindow3().

This commit is contained in:
Nikolay Sivov 2015-04-29 21:30:50 +03:00 committed by Alexandre Julliard
parent e91dac5153
commit 06b60cc4d0
1 changed files with 57 additions and 70 deletions

View File

@ -1912,25 +1912,13 @@ static HRESULT WINAPI IShellView_fnRefresh(IShellView3 *iface)
return S_OK; return S_OK;
} }
static HRESULT WINAPI IShellView_fnCreateViewWindow(IShellView3 *iface, IShellView *lpPrevView, static HRESULT WINAPI IShellView_fnCreateViewWindow(IShellView3 *iface, IShellView *prev_view,
LPCFOLDERSETTINGS lpfs, IShellBrowser *psb, RECT *prcView, HWND *phWnd) const FOLDERSETTINGS *settings, IShellBrowser *owner, RECT *rect, HWND *hWnd)
{ {
HRESULT hr; IShellViewImpl *This = impl_from_IShellView3(iface);
SV2CVW2_PARAMS view_params; TRACE("(%p)->(%p %p %p %p %p)\n", This, prev_view, settings, owner, rect, hWnd);
view_params.cbSize = sizeof(view_params); return IShellView3_CreateViewWindow3(iface, owner, prev_view, SV3CVW3_DEFAULT,
view_params.psvPrev = lpPrevView; settings->fFlags, settings->fFlags, settings->ViewMode, NULL, rect, hWnd);
view_params.pfs = lpfs;
view_params.psbOwner = psb;
view_params.prcView = prcView;
view_params.pvid = NULL;
view_params.hwndView = 0;
TRACE("(%p) Forwarding to CreateViewWindow2\n", iface);
hr = IShellView3_CreateViewWindow2(iface, &view_params);
*phWnd = view_params.hwndView;
return hr;
} }
static HRESULT WINAPI IShellView_fnDestroyViewWindow(IShellView3 *iface) static HRESULT WINAPI IShellView_fnDestroyViewWindow(IShellView3 *iface)
@ -2039,6 +2027,31 @@ static HRESULT WINAPI IShellView2_fnGetView(IShellView3 *iface, SHELLVIEWID *vie
} }
static HRESULT WINAPI IShellView2_fnCreateViewWindow2(IShellView3 *iface, SV2CVW2_PARAMS *view_params) static HRESULT WINAPI IShellView2_fnCreateViewWindow2(IShellView3 *iface, SV2CVW2_PARAMS *view_params)
{
IShellViewImpl *This = impl_from_IShellView3(iface);
TRACE("(%p)->(%p)\n", This, view_params);
return IShellView3_CreateViewWindow3(iface, view_params->psbOwner, view_params->psvPrev,
SV3CVW3_DEFAULT, view_params->pfs->fFlags, view_params->pfs->fFlags,
view_params->pfs->ViewMode, view_params->pvid, view_params->prcView, &view_params->hwndView);
}
static HRESULT WINAPI IShellView2_fnHandleRename(IShellView3 *iface, LPCITEMIDLIST new_pidl)
{
FIXME("(%p)->(new_pidl %p) stub!\n", iface, new_pidl);
return E_NOTIMPL;
}
static HRESULT WINAPI IShellView2_fnSelectAndPositionItem(IShellView3 *iface, LPCITEMIDLIST item,
UINT flags, POINT *point)
{
IShellViewImpl *This = impl_from_IShellView3(iface);
TRACE("(%p)->(item %p, flags %#x, point %p)\n", This, item, flags, point);
return IFolderView2_SelectAndPositionItems(&This->IFolderView2_iface, 1, &item, point, flags);
}
static HRESULT WINAPI IShellView3_fnCreateViewWindow3(IShellView3 *iface, IShellBrowser *owner,
IShellView *prev_view, SV3CVW3_FLAGS view_flags, FOLDERFLAGS mask, FOLDERFLAGS flags,
FOLDERVIEWMODE mode, const SHELLVIEWID *view_id, const RECT *rect, HWND *hwnd)
{ {
IShellViewImpl *This = impl_from_IShellView3(iface); IShellViewImpl *This = impl_from_IShellView3(iface);
INITCOMMONCONTROLSEX icex; INITCOMMONCONTROLSEX icex;
@ -2046,46 +2059,44 @@ static HRESULT WINAPI IShellView2_fnCreateViewWindow2(IShellView3 *iface, SV2CVW
HRESULT hr; HRESULT hr;
HWND wnd; HWND wnd;
icex.dwSize = sizeof( icex ); TRACE("(%p)->(%p %p 0x%08x 0x%08x 0x%08x %d %s %s %p)\n", This, owner, prev_view, view_flags,
mask, flags, mode, debugstr_guid(view_id), wine_dbgstr_rect(rect), hwnd);
icex.dwSize = sizeof(icex);
icex.dwICC = ICC_LISTVIEW_CLASSES; icex.dwICC = ICC_LISTVIEW_CLASSES;
InitCommonControlsEx( &icex ); InitCommonControlsEx(&icex);
TRACE("(%p)->(view_params %p)\n", iface, view_params); *hwnd = NULL;
if (view_params->cbSize != sizeof(*view_params)) if (!owner)
{ return E_UNEXPECTED;
FIXME("Got unexpected cbSize %#x\n", view_params->cbSize);
return E_FAIL;
}
TRACE("-- psvPrev %p, pfs %p, psbOwner %p, prcView %p\n", if (view_flags != SV3CVW3_DEFAULT)
view_params->psvPrev, view_params->pfs, view_params->psbOwner, view_params->prcView); FIXME("unsupported view flags 0x%08x\n", view_flags);
TRACE("-- vmode %#x, flags %#x, view %s\n", view_params->pfs->ViewMode, view_params->pfs->fFlags, wine_dbgstr_rect(view_params->prcView));
if (!view_params->psbOwner) return E_UNEXPECTED;
/* Set up the member variables */ /* Set up the member variables */
This->pShellBrowser = view_params->psbOwner; This->pShellBrowser = owner;
This->FolderSettings = *view_params->pfs; This->FolderSettings.ViewMode = mode;
This->FolderSettings.fFlags = mask & flags;
if (view_params->pvid) if (view_id)
{ {
if (IsEqualGUID(view_params->pvid, &VID_LargeIcons)) if (IsEqualGUID(view_id, &VID_LargeIcons))
This->FolderSettings.ViewMode = FVM_ICON; This->FolderSettings.ViewMode = FVM_ICON;
else if (IsEqualGUID(view_params->pvid, &VID_SmallIcons)) else if (IsEqualGUID(view_id, &VID_SmallIcons))
This->FolderSettings.ViewMode = FVM_SMALLICON; This->FolderSettings.ViewMode = FVM_SMALLICON;
else if (IsEqualGUID(view_params->pvid, &VID_List)) else if (IsEqualGUID(view_id, &VID_List))
This->FolderSettings.ViewMode = FVM_LIST; This->FolderSettings.ViewMode = FVM_LIST;
else if (IsEqualGUID(view_params->pvid, &VID_Details)) else if (IsEqualGUID(view_id, &VID_Details))
This->FolderSettings.ViewMode = FVM_DETAILS; This->FolderSettings.ViewMode = FVM_DETAILS;
else if (IsEqualGUID(view_params->pvid, &VID_Thumbnails)) else if (IsEqualGUID(view_id, &VID_Thumbnails))
This->FolderSettings.ViewMode = FVM_THUMBNAIL; This->FolderSettings.ViewMode = FVM_THUMBNAIL;
else if (IsEqualGUID(view_params->pvid, &VID_Tile)) else if (IsEqualGUID(view_id, &VID_Tile))
This->FolderSettings.ViewMode = FVM_TILE; This->FolderSettings.ViewMode = FVM_TILE;
else if (IsEqualGUID(view_params->pvid, &VID_ThumbStrip)) else if (IsEqualGUID(view_id, &VID_ThumbStrip))
This->FolderSettings.ViewMode = FVM_THUMBSTRIP; This->FolderSettings.ViewMode = FVM_THUMBSTRIP;
else else
FIXME("Ignoring unrecognized VID %s\n", debugstr_guid(view_params->pvid)); FIXME("Ignoring unrecognized VID %s\n", debugstr_guid(view_id));
} }
/* Get our parent window */ /* Get our parent window */
@ -2116,9 +2127,9 @@ static HRESULT WINAPI IShellView2_fnCreateViewWindow2(IShellView3 *iface, SV2CVW
} }
wnd = CreateWindowExW(0, SV_CLASS_NAME, NULL, WS_CHILD | WS_TABSTOP, wnd = CreateWindowExW(0, SV_CLASS_NAME, NULL, WS_CHILD | WS_TABSTOP,
view_params->prcView->left, view_params->prcView->top, rect->left, rect->top,
view_params->prcView->right - view_params->prcView->left, rect->right - rect->left,
view_params->prcView->bottom - view_params->prcView->top, rect->bottom - rect->top,
This->hWndParent, 0, shell32_hInstance, This); This->hWndParent, 0, shell32_hInstance, This);
CheckToolbar(This); CheckToolbar(This);
@ -2132,35 +2143,11 @@ static HRESULT WINAPI IShellView2_fnCreateViewWindow2(IShellView3 *iface, SV2CVW
SetWindowPos(wnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); SetWindowPos(wnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
UpdateWindow(wnd); UpdateWindow(wnd);
view_params->hwndView = wnd; *hwnd = wnd;
return S_OK; return S_OK;
} }
static HRESULT WINAPI IShellView2_fnHandleRename(IShellView3 *iface, LPCITEMIDLIST new_pidl)
{
FIXME("(%p)->(new_pidl %p) stub!\n", iface, new_pidl);
return E_NOTIMPL;
}
static HRESULT WINAPI IShellView2_fnSelectAndPositionItem(IShellView3 *iface, LPCITEMIDLIST item,
UINT flags, POINT *point)
{
IShellViewImpl *This = impl_from_IShellView3(iface);
TRACE("(%p)->(item %p, flags %#x, point %p)\n", This, item, flags, point);
return IFolderView2_SelectAndPositionItems(&This->IFolderView2_iface, 1, &item, point, flags);
}
static HRESULT WINAPI IShellView3_fnCreateViewWindow3(IShellView3 *iface, IShellBrowser *owner,
IShellView *prev_view, SV3CVW3_FLAGS view_flags, FOLDERFLAGS mask, FOLDERFLAGS flags,
FOLDERVIEWMODE mode, const SHELLVIEWID *view_id, const RECT *rect, HWND *hwnd)
{
IShellViewImpl *This = impl_from_IShellView3(iface);
FIXME("(%p)->(%p %p 0x%08x 0x%08x 0x%08x %d %s %s %p): stub\n", This, owner, prev_view, view_flags,
mask, flags, mode, debugstr_guid(view_id), wine_dbgstr_rect(rect), hwnd);
return E_NOTIMPL;
}
static const IShellView3Vtbl shellviewvtbl = static const IShellView3Vtbl shellviewvtbl =
{ {
IShellView_fnQueryInterface, IShellView_fnQueryInterface,