From: Paul Gofman pgofman@codeweavers.com
--- dlls/msvfw32/mciwnd.c | 7 ++++++- dlls/msvfw32/tests/mciwnd.c | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/dlls/msvfw32/mciwnd.c b/dlls/msvfw32/mciwnd.c index a3edb9e794f..227dd0ebed6 100644 --- a/dlls/msvfw32/mciwnd.c +++ b/dlls/msvfw32/mciwnd.c @@ -104,6 +104,8 @@ BOOL VFWAPIV MCIWndRegisterClass(void) HWND VFWAPIV MCIWndCreateW(HWND hwndParent, HINSTANCE hInstance, DWORD dwStyle, LPCWSTR szFile) { + HMENU child_id = 0; + TRACE("%p %p %lx %s\n", hwndParent, hInstance, dwStyle, debugstr_w(szFile));
MCIWndRegisterClass(); @@ -118,10 +120,13 @@ HWND VFWAPIV MCIWndCreateW(HWND hwndParent, HINSTANCE hInstance, dwStyle |= WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX; }
+ if (dwStyle & WS_CHILD) + child_id = (HMENU)66; + return CreateWindowExW(0, mciWndClassW, mciWndNameW, dwStyle | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, 0, 0, 300, 0, - hwndParent, 0, hInstance, (LPVOID)szFile); + hwndParent, child_id, hInstance, (LPVOID)szFile); }
/*********************************************************************** diff --git a/dlls/msvfw32/tests/mciwnd.c b/dlls/msvfw32/tests/mciwnd.c index 6131105dd5c..1d9a2204f65 100644 --- a/dlls/msvfw32/tests/mciwnd.c +++ b/dlls/msvfw32/tests/mciwnd.c @@ -355,8 +355,8 @@ static void test_MCIWndCreate(void) window = MCIWndCreateA(tests[i].parent ? parent : NULL, hinst, tests[i].mci_style, invalid_fname); if ((tests[i].mci_style & (WS_POPUP | WS_CHILD)) == (WS_POPUP | WS_CHILD)) { - todo_wine ok(!window, "window creation succeeded.\n"); - todo_wine ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "got %lu.\n", GetLastError()); + ok(!window, "window creation succeeded.\n"); + ok(GetLastError() == ERROR_INVALID_MENU_HANDLE, "got %lu.\n", GetLastError()); } else { @@ -364,7 +364,7 @@ static void test_MCIWndCreate(void)
id = GetDlgCtrlID(window); if (tests[i].parent && !(tests[i].mci_style & WS_POPUP)) - todo_wine ok(id == 66, "got %d.\n", id); + ok(id == 66, "got %d.\n", id); else ok(!id, "got %d.\n", id); pump_messages();