On 7/17/2010 19:08, David Hedberg wrote:
> static HRESULT WINAPI IFView_SetCurrentViewMode(IFolderView *iface, UINT mode)
> {
> - IShellViewImpl *This = impl_from_IFolderView(iface);
> - FIXME("(%p)->(%u), stub\n", This, mode);
> - return E_NOTIMPL;
> + IShellViewImpl *This = impl_from_IFolderView(iface);
> + RECT rc;
> + TRACE("(%p)->(%u), stub\n", This, mode);
> +
> + if((mode< FVM_FIRST || mode> FVM_LAST)&&
> + (mode != FVM_AUTO))
> + return E_INVALIDARG;
> +
> + /* Destroy the previous listview */
> + ShellView_DestroyView(This);
> +
> + /* Change the viewmode */
> + This->FolderSettings.ViewMode = mode;
> +
> + /* Create a new listview */
> + ShellView_CreateView(This);
> +
> + /* Size the new listview properly. */
> + GetClientRect(This->hWnd,&rc);
> + MoveWindow(This->hWndList, 0, 0, rc.right, rc.bottom, TRUE);
> +
> + return S_OK;
> }
Why do you think you should destroy Listview here? It's not obvious at
all. I think it's only about changing style.