[Bug 41203] mCtrl does not work well

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Dec 29 11:47:10 CST 2016


https://bugs.winehq.org/show_bug.cgi?id=41203

--- Comment #17 from Carlo Bramini <carlo.bramix at libero.it> ---
I think that I found the bug that makes the imgview control crashing.

When the WM_NCCREATE message is sent to the control, the lpszName field of
CREATESTRUCT contains a wrong value.
On WINE, this pointer is set to the resource ID.
On Windows, this pointer is set to a string with first character set to 0xFFFF
and the second character is set to the resource ID.

The mCtrl code of imgview control checks if lpszName is not NULL and test for
the first character:

https://github.com/mity/mctrl/blob/master/mctrl/imgview.c#L290

but since the pointer is set to the resource value rather than a valid pointer,
it crashes. This is the reason.

Evidently, there is a bug here into DIALOG_CreateIndirect:

http://source.winehq.org/git/wine.git/blob/HEAD:/dlls/user32/dialog.c#l610

The code should create the string properly formatted here if it is a resource,
for both the class and the caption.

-- 
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