shell32: Implement Set/GetCurrentViewMode in the default shellview.

David Hedberg david.hedberg at gmail.com
Sat Jul 17 10:45:30 CDT 2010


On Sat, Jul 17, 2010 at 5:30 PM, Nikolay Sivov <nsivov at codeweavers.com> wrote:
>  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.
>
>

Seems I've managed to miss LVM_SETVIEW, I'll try again.



More information about the wine-devel mailing list