https://bugs.winehq.org/show_bug.cgi?id=40301
Bug ID: 40301 Summary: Wrong DTM_GETRANGE message result Product: Wine Version: 1.8.1 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: comctl32 Assignee: wine-bugs@winehq.org Reporter: vz-wine@zeitlins.org Distribution: ---
Looking at http://source.winehq.org/source/dlls/comctl32/datetime.c#1575 you can see this line:
return ret ? ret : 1; /* bug emulation */
I'm not sure which bug does it mean and the commit which added it (see https://github.com/wine-mirror/wine/commit/63fe9d449#diff-60ef36c9d147674ec5...) doesn't go into the details, but this behaviour seems to buggy as it returns GDTR_MIN, implying that the minimum bound of the range is set, even when it is not the case.
Currently this results in asserts when creating wxDatePickerCtrl from wxWidgets with WINE (while it works correctly under native Windows) and while I'll work around this in wxWidgets itself, I think this is still a bug in WINE and could result in problems in the other applications as well and should be fixed in it.
The fix, of course, is trivial: just "return ret" (or avoid the temporary variable and fold the return with the previous line).