http://bugs.winehq.org/show_bug.cgi?id=24952
Summary: dlls/user32/button.c handles incorrectly unknown button types Product: Wine Version: 1.3.6 Platform: x86 OS/Version: All Status: UNCONFIRMED Severity: normal Priority: P2 Component: user32 AssignedTo: wine-bugs@winehq.org ReportedBy: mity@morous.org
Created an attachment (id=31597) --> (http://bugs.winehq.org/attachment.cgi?id=31597) code demonstrating the difference
When an unknown/unsupported button type is specified (e.g. BS_SPLITBUTTON or BS_DEFSPLITBUTTON), creation of button control fails in Wine.
In contrary on Windows it suceeds (even though the created control then behaves incorrectly) whenever BS_[DEF]SPLITBUTON is not supported. Tested on Windows 2000, Windows XP, Windows 7 (with program without manifest, so comctl32 6.0 was NOT used).
The behavior difference in effect prevents mCtrl split button emulation from working (see http://sourceforge.net/projects/mctrl/). The MCTRL.DLL provides a split button as a subclass of standard BUTTON window class.
When needed (i.e. COMCTL32 < 6.0), the split buttons are handled by the code in MCTRL.DLL implementation. This works perfectly on Windows, but not within Wine for the reason described above.
The behavior difference can be tested with the attached code: On Windows the two buttons are created successfully (even they misbehave), on Wine the two CreateWindow calls fail.
Obviously the reason is the test:
if (btn_type >= MAX_BTN_TYPE) return -1; /* abort */
in dlls/couser32/button.c:260.
There are probably also other related problems (e.g. in BM_SETSTYLE) etc.