[PATCH v2] browseui: Implement IProgressDialog::SetAnimation.

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Mon Jul 9 03:47:34 CDT 2018


From: Michael Müller <michael at fds-team.de>

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
 dlls/browseui/browseui.rc   |  2 +-
 dlls/browseui/progressdlg.c | 11 ++++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/dlls/browseui/browseui.rc b/dlls/browseui/browseui.rc
index 833b139413..4c612e93e3 100644
--- a/dlls/browseui/browseui.rc
+++ b/dlls/browseui/browseui.rc
@@ -32,7 +32,7 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CLIPCHILDREN | WS_C
 CAPTION ""
 FONT 8, "MS Shell Dlg"
 {
-    CONTROL "", IDC_ANIMATION, ANIMATE_CLASSA, 0, 12, 10, 236, 25 /* TODO: style */
+    CONTROL "", IDC_ANIMATION, ANIMATE_CLASSA, ACS_TRANSPARENT | ACS_AUTOPLAY, 12, 10, 236, 25
     LTEXT "", IDC_TEXT_LINE, 7, 45, 250, 10, SS_LEFT|SS_NOPREFIX
     LTEXT "", IDC_TEXT_LINE + 1, 7, 55, 250, 10, SS_LEFT|SS_NOPREFIX
     CONTROL "", IDC_PROGRESS_BAR, PROGRESS_CLASSA, WS_BORDER, 7, 65, 190, 8
diff --git a/dlls/browseui/progressdlg.c b/dlls/browseui/progressdlg.c
index 09c1996a59..2de60e434e 100644
--- a/dlls/browseui/progressdlg.c
+++ b/dlls/browseui/progressdlg.c
@@ -403,7 +403,16 @@ static HRESULT WINAPI ProgressDialog_SetTitle(IProgressDialog *iface, LPCWSTR pw
 
 static HRESULT WINAPI ProgressDialog_SetAnimation(IProgressDialog *iface, HINSTANCE hInstance, UINT uiResourceId)
 {
-    FIXME("(%p, %p, %d) - stub\n", iface, hInstance, uiResourceId);
+    ProgressDialog *This = impl_from_IProgressDialog(iface);
+
+    TRACE("(%p, %p, #%x)\n", iface, hInstance, uiResourceId);
+
+    if (IS_INTRESOURCE(uiResourceId))
+    {
+        if (!SendDlgItemMessageW(This->hwnd, IDC_ANIMATION, ACM_OPENW, (WPARAM)hInstance, uiResourceId))
+            WARN("Failed to load animation\n");
+    }
+
     return S_OK;
 }
 
-- 
2.18.0



More information about the wine-devel mailing list