From: Esme Povirk esme@codeweavers.com
--- dlls/comctl32/button.c | 5 +++++ dlls/comctl32/tests/button.c | 12 ++++++++++++ 2 files changed, 17 insertions(+)
diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index 9e7eaedc383..11a9760e3e2 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -885,6 +885,11 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L InvalidateRect( hWnd, NULL, FALSE ); break;
+ case WM_GETOBJECT: + if ((LONG)lParam == OBJID_QUERYCLASSNAMEIDX) + return 0x10002; + break; + case BM_SETSTYLE: { DWORD new_btn_type; diff --git a/dlls/comctl32/tests/button.c b/dlls/comctl32/tests/button.c index c554ac4e50b..8895c13c0a5 100644 --- a/dlls/comctl32/tests/button.c +++ b/dlls/comctl32/tests/button.c @@ -2445,6 +2445,17 @@ static void test_visual(void) DestroyWindow(parent); }
+static void test_getobject(void) +{ + HWND hwnd; + LONG idx; + + hwnd = create_button(BS_PUSHBUTTON, NULL); + idx = SendMessageA(hwnd, WM_GETOBJECT, 0, OBJID_QUERYCLASSNAMEIDX); + ok(idx == 0x10002, "Expect idx 0x%08x, got 0x%08lx\n", 0x10002, idx); + DestroyWindow(hwnd); +} + START_TEST(button) { BOOL (WINAPI * pIsThemeActive)(VOID); @@ -2482,6 +2493,7 @@ START_TEST(button) test_bcm_get_ideal_size(); test_style(); test_visual(); + test_getobject();
uninit_winevent_hook();
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=148879
Your paranoid android.
=== w10pro64_ja (64 bit report) ===
comctl32: button.c:2107: Test failed: Style: 0x90010c00 expect ideal cx 64 >= 92 and ideal cy 28 >= 48 button.c:2107: Test failed: Style: 0x90010d00 expect ideal cx 64 >= 92 and ideal cy 28 >= 48 button.c:2107: Test failed: Style: 0x90010f00 expect ideal cx 64 >= 92 and ideal cy 28 >= 48 button.c:2107: Test failed: Style: 0x90011100 expect ideal cx 64 >= 92 and ideal cy 28 >= 48 button.c:2111: Test failed: Style: 0x90011800 expect ideal cx 64 >= 48 and ideal cy 28 >= 68 button.c:2107: Test failed: Style: 0x90010e01 expect ideal cx 64 >= 92 and ideal cy 28 >= 48 button.c:2111: Test failed: Style: 0x90011401 expect ideal cx 64 >= 48 and ideal cy 28 >= 68
Dmitry Timoshkov (@dmitry) commented about dlls/comctl32/button.c:
InvalidateRect( hWnd, NULL, FALSE ); break;
- case WM_GETOBJECT:
if ((LONG)lParam == OBJID_QUERYCLASSNAMEIDX)
Is the cast really justified? Does it imply that 64-bit LPARAM could contain anything in upper 32-bits?
On Sat Oct 5 17:50:07 2024 +0000, Dmitry Timoshkov wrote:
Is the cast really justified? Does it imply that 64-bit LPARAM could contain anything in upper 32-bits?
I've had issues with the upper 32 bits being 0's. I can add a test for this if you prefer.
On Sat Oct 5 18:32:51 2024 +0000, Esme Povirk wrote:
I've had issues with the upper 32 bits being 0's. I can add a test for this if you prefer.
A test would at least show how it's implemented in Windows.