Nikolay Sivov : shell32: Add IShellFolderView::SetRedraw implementation.

Alexandre Julliard julliard at winehq.org
Mon Mar 22 11:12:05 CDT 2010


Module: wine
Branch: master
Commit: 9958b80e9d900a116bdb357eb50da2eca5bb5a47
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9958b80e9d900a116bdb357eb50da2eca5bb5a47

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Mon Mar 22 03:04:49 2010 +0300

shell32: Add IShellFolderView::SetRedraw implementation.

---

 dlls/shell32/shlview.c       |   12 ++++++++----
 dlls/shell32/tests/shlview.c |    4 ++++
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c
index 4852fed..e60a765 100644
--- a/dlls/shell32/shlview.c
+++ b/dlls/shell32/shlview.c
@@ -644,6 +644,7 @@ static INT CALLBACK fill_list( LPVOID ptr, LPVOID arg )
 
 static HRESULT ShellView_FillList(IShellViewImpl *This)
 {
+    IShellFolderView *folderview = (IShellFolderView*)&This->lpvtblShellFolderView;
     LPENUMIDLIST pEnumIDList;
     LPITEMIDLIST pidl;
     DWORD fetched;
@@ -676,9 +677,9 @@ static HRESULT ShellView_FillList(IShellViewImpl *This)
     /* sort the array */
     DPA_Sort(hdpa, ShellView_CompareItems, (LPARAM)This->pSFParent);
 
-    SendMessageW(This->hWndList, WM_SETREDRAW, FALSE, 0);
+    IShellFolderView_SetRedraw(folderview, FALSE);
     DPA_DestroyCallback(hdpa, fill_list, This);
-    SendMessageW(This->hWndList, WM_SETREDRAW, TRUE, 0);
+    IShellFolderView_SetRedraw(folderview, TRUE);
 
     IEnumIDList_Release(pEnumIDList);
 
@@ -3041,8 +3042,11 @@ static HRESULT WINAPI IShellFolderView_fnSetRedraw(
     BOOL redraw)
 {
     IShellViewImpl *This = impl_from_IShellFolderView(iface);
-    FIXME("(%p)->(%d) stub\n", This, redraw);
-    return E_NOTIMPL;
+    TRACE("(%p)->(%d)\n", This, redraw);
+
+    SendMessageW(This->hWndList, WM_SETREDRAW, redraw, 0);
+
+    return S_OK;
 }
 
 static HRESULT WINAPI IShellFolderView_fnGetSelectedCount(
diff --git a/dlls/shell32/tests/shlview.c b/dlls/shell32/tests/shlview.c
index 077c491..6f08f18 100644
--- a/dlls/shell32/tests/shlview.c
+++ b/dlls/shell32/tests/shlview.c
@@ -568,6 +568,10 @@ static void test_IShellFolderView(void)
     hr = IShellFolderView_MoveIcons(folderview, NULL);
     ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr);
 
+    /* ::SetRedraw without list created */
+    hr = IShellFolderView_SetRedraw(folderview, TRUE);
+    ok(hr == S_OK, "got (0x%08x)\n", hr);
+
     IShellFolderView_Release(folderview);
 
     IShellView_Release(view);




More information about the wine-cvs mailing list