https://bugs.winehq.org/show_bug.cgi?id=41203
--- Comment #17 from Carlo Bramini carlo.bramix@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.