Reply To heisenbug
I suspect that DTM_SETFORMATW accidentally became 0x1050 in the MinGW header, because of a mental hex addition error.
I've no idea who specified that original definition, nor how they deduced the value -- Microsoft don't document it, other than as the definition in their header file -- but I suspect that you are probably correct.
Thanks for reporting the issue, and thanks for not pushing the Microsoft header file in my face, because I will never look at it directly; I can accept your hint as to how Microsoft may define it, and so correct it for the next WSL release.
You're welcome.
And I understand. If it helps: I have tested the 0x1032 value and can report that it works as intended.
Reply To heisenbug
You're welcome. And I understand. If it helps: I have tested the 0x1032 value and can report that it works as intended.
Thanks for that. I've prepared the obvious patch; how would you like me to attribute it, in the ChangeLog?
Oh that's generous. You can say "reported by Jelle Geerts" if you like! Thanks for asking.
Fixed by commit #955a4fc.
Problem: MinGW's w32api header commctrl.h incorrectly defines DTM_SETFORMATW as 0x1050.
The official MSVC++ WinAPI headers define DTM_SETFORMATW as 0x1032, via the expression DTM_FIRST + 50, where DTM_FIRST is 0x1000. This of course translates to the correct value of 0x1032.
I suspect that DTM_SETFORMATW accidentally became 0x1050 in the MinGW header, because of a mental hex addition error.