From: Esme Povirk esme@codeweavers.com
--- dlls/comctl32/progress.c | 5 +++++ dlls/comctl32/tests/progress.c | 4 ++++ 2 files changed, 9 insertions(+)
diff --git a/dlls/comctl32/progress.c b/dlls/comctl32/progress.c index aae2d8f8660..9c4a0c3e3a0 100644 --- a/dlls/comctl32/progress.c +++ b/dlls/comctl32/progress.c @@ -614,6 +614,11 @@ static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message, case WM_SETFONT: return (LRESULT)PROGRESS_SetFont(infoPtr, (HFONT)wParam, (BOOL)lParam);
+ case WM_GETOBJECT: + if ((LONG)lParam == OBJID_QUERYCLASSNAMEIDX) + return 0x1000d; + return DefWindowProcW( hwnd, message, wParam, lParam ); + case WM_PRINTCLIENT: case WM_PAINT: return PROGRESS_Paint (infoPtr, (HDC)wParam); diff --git a/dlls/comctl32/tests/progress.c b/dlls/comctl32/tests/progress.c index f228ac84d2e..77517a194b3 100644 --- a/dlls/comctl32/tests/progress.c +++ b/dlls/comctl32/tests/progress.c @@ -269,9 +269,13 @@ static void test_setcolors(void) { HWND progress; COLORREF clr; + DWORD idx;
progress = create_progress(PBS_SMOOTH);
+ idx = SendMessageA(progress, WM_GETOBJECT, 0, OBJID_QUERYCLASSNAMEIDX); + ok(idx == 0x1000d, "Got index 0x%08lx\n", idx); + clr = SendMessageA(progress, PBM_SETBARCOLOR, 0, 0); ok(clr == CLR_DEFAULT, "got %lx\n", clr);