Rebase against acb879c9d2feae69e8b5b1ede28523a29aef1b89

This commit is contained in:
Alistair Leslie-Hughes
2018-07-12 10:17:14 +10:00
parent 292a0e67f4
commit fd81bd7755
8 changed files with 17 additions and 1166 deletions

View File

@ -1,53 +0,0 @@
From fe4f06bfdb1a53e0be15aca8f1f8f897f7fef632 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 27 Feb 2015 17:46:11 +0100
Subject: browseui: Implement IProgressDialog::SetAnimation.
---
dlls/browseui/progressdlg.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/dlls/browseui/progressdlg.c b/dlls/browseui/progressdlg.c
index 598197b..a14fa17 100644
--- a/dlls/browseui/progressdlg.c
+++ b/dlls/browseui/progressdlg.c
@@ -175,6 +175,7 @@ static INT_PTR CALLBACK dialog_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
case WM_INITDIALOG:
{
struct create_params *params = (struct create_params *)lParam;
+ LONG_PTR style;
/* Note: until we set the hEvent, the object is protected by
* the critical section held by StartProgress */
@@ -191,6 +192,10 @@ static INT_PTR CALLBACK dialog_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
if (This->dwFlags & PROGDLG_NOMINIMIZE)
SetWindowLongW(hwnd, GWL_STYLE, GetWindowLongW(hwnd, GWL_STYLE) & (~WS_MINIMIZEBOX));
+ style = GetWindowLongPtrW(GetDlgItem(hwnd, IDC_ANIMATION), GWL_STYLE);
+ style |= ACS_AUTOPLAY | ACS_TRANSPARENT;
+ SetWindowLongPtrW(GetDlgItem(hwnd, IDC_ANIMATION), GWL_STYLE, style);
+
update_dialog(This, 0xffffffff);
This->dwUpdate = 0;
This->isCancelled = FALSE;
@@ -396,7 +401,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, %d)\n", iface, hInstance, uiResourceId);
+
+ if (uiResourceId & ~0xFFFF)
+ return S_OK;
+
+ if (!SendDlgItemMessageW(This->hwnd, IDC_ANIMATION, ACM_OPENW, (WPARAM)hInstance, uiResourceId))
+ WARN("Failed to load animation\n");
+
return S_OK;
}
--
2.3.0