https://bugs.winehq.org/show_bug.cgi?id=40303
Bug ID: 40303 Summary: Control Data passed in DIALOGEX Resource passes pointer with offset sizeof(WORD) Product: Wine Version: 1.9.5 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: user32 Assignee: wine-bugs@winehq.org Reporter: vendor2013@herdsoft.com Distribution: ---
Created attachment 53942 --> https://bugs.winehq.org/attachment.cgi?id=53942 Sourcecode for a test program
When DIALOGEX Resources contain Custom data like in:
DEFPUSHBUTTON "OK", IDOK, 148, 6, 50, 14 { 1, 2, 3, 4, 5 }
The pointer passed in WM_CREATE is two bytes higher than in windows. In Windows (Tested with Vista an Windows 7 64-Bit) it Points to the Number of Words, in Wine it points to the first data byte.
Microsoft Specs for this stuff are here:
https://msdn.microsoft.com/de-de/library/windows/desktop/ms645389%28v=vs.85%...
Attached file dialogtest.zip is sourcecode for a test program with a simple custom control that displays the passed control data.
Bug is in Version 1.6.2 (Debian Jessie) and 1.9.5 (Last Download).
My suggestion for a patch:
--- wine-1.6.2.orig/dlls/user32/dialog.c +++ wine-1.6.2/dlls/user32/dialog.c @@ -234,7 +234,8 @@ static const WORD *DIALOG_GetControl32( TRACE("\n"); TRACE(" END\n" ); } - info->data = p + 1; + info->data = p; p += GET_WORD(p) / sizeof(WORD); } else info->data = NULL;
https://bugs.winehq.org/show_bug.cgi?id=40303
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |STAGED CC| |dmitry@baikal.ru, | |erich.e.hoover@wine-staging | |.com, michael@fds-team.de, | |sebastian@fds-team.de Ever confirmed|0 |1 Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/user32-lpCreat | |eParams
https://bugs.winehq.org/show_bug.cgi?id=40303
--- Comment #1 from Dmitry Timoshkov dmitry@baikal.ru --- Many thanks for the nice bug report!
The patch fixing this issue has been committed to the staging tree.
https://bugs.winehq.org/show_bug.cgi?id=40303
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Staged patchset|https://github.com/wine-com |https://github.com/wine-sta |pholio/wine-staging/tree/ma |ging/wine-staging/tree/mast |ster/patches/user32-lpCreat |er/patches/user32-lpCreateP |eParams |arams CC| |nerv@dawncrow.de
https://bugs.winehq.org/show_bug.cgi?id=40303
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|STAGED |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |5277aa8f64ae614c75fb32e3db1 | |35a49f3f83b3a
--- Comment #2 from Dmitry Timoshkov dmitry@baikal.ru --- Commited as 5277aa8f64ae614c75fb32e3db135a49f3f83b3a.
Once again thanks for the nice bug report.
https://bugs.winehq.org/show_bug.cgi?id=40303
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.18.
https://bugs.winehq.org/show_bug.cgi?id=40303
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |3.0.x
https://bugs.winehq.org/show_bug.cgi?id=40303
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|3.0.x |---
--- Comment #4 from Michael Stefaniuc mstefani@winehq.org --- Removing the 3.0.x milestone from bug fixes included in 3.0.5.