[Bug 40303] New: Control Data passed in DIALOGEX Resource passes pointer with offset sizeof(WORD)

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Mar 14 09:39:45 CDT 2016


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 at winehq.org
          Reporter: vendor2013 at 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%29.aspx

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;

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list