From: Esme Povirk esme@codeweavers.com
--- dlls/comctl32/header.c | 5 +++++ dlls/comctl32/tests/header.c | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c index 354ca615500..810dd030f31 100644 --- a/dlls/comctl32/header.c +++ b/dlls/comctl32/header.c @@ -2219,6 +2219,11 @@ HEADER_WindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) case WM_GETDLGCODE: return DLGC_WANTTAB | DLGC_WANTARROWS;
+ case WM_GETOBJECT: + if ((LONG)lParam == OBJID_QUERYCLASSNAMEIDX) + return 0x10011; + return DefWindowProcW(hwnd, msg, wParam, lParam); + case WM_GETFONT: return HEADER_GetFont (infoPtr);
diff --git a/dlls/comctl32/tests/header.c b/dlls/comctl32/tests/header.c index dff58cef624..0b280a472a7 100644 --- a/dlls/comctl32/tests/header.c +++ b/dlls/comctl32/tests/header.c @@ -605,15 +605,22 @@ static void header_item_getback(HWND hwnd, UINT mask, HDITEMA *item) ok(ret != 0, "Failed to delete item.\n"); }
-static void test_item_auto_format(HWND parent) +static void test_item_auto_format(HWND parent, BOOL is_v6) { static char text[] = "Test"; HDITEMA item; HBITMAP hbm; HWND hwnd; + DWORD objid;
hwnd = create_custom_header_control(parent, FALSE);
+ objid = SendMessageA(hwnd, WM_GETOBJECT, 0, OBJID_QUERYCLASSNAMEIDX); + if (is_v6) + todo_wine ok(objid == 0, "Unexpected objid %lu.\n", objid); + else + ok(objid == 0x10011, "Unexpected objid %lu.\n", objid); + /* Windows implicitly sets some format bits in INSERTITEM */
/* HDF_STRING is automatically set and cleared for no text */ @@ -1905,7 +1912,7 @@ START_TEST(header) return;
test_header_control(); - test_item_auto_format(hHeaderParentWnd); + test_item_auto_format(hHeaderParentWnd, FALSE); test_header_order(); test_hdm_orderarray(); test_customdraw(); @@ -1938,7 +1945,7 @@ START_TEST(header) /* comctl32 version 6 tests start here */ test_hdf_fixedwidth(parent_hwnd); test_hds_nosizing(parent_hwnd); - test_item_auto_format(parent_hwnd); + test_item_auto_format(parent_hwnd, TRUE); test_hdm_layout(parent_hwnd);
uninit_winevent_hook();