待辦事項 #38736

DTM_SETFORMATW incorrectly defined in commctrl.h

啟用日期: 2018-11-09 07:28 最後更新: 2018-11-19 06:37

回報者:
負責人:
類型:
狀態:
關閉
元件:
里程碑:
(無)
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
修正
檔案:
Vote
Score: 0
No votes
0.0% (0/0)
0.0% (0/0)

細節

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.

Ticket History (3/7 Histories)

2018-11-09 07:28 Updated by: heisenbug
  • New Ticket "DTM_SETFORMATW incorrectly defined in commctrl.h" created
2018-11-09 07:30 Updated by: heisenbug
  • Details Updated
2018-11-09 08:09 Updated by: keith
  • 元件 Update from OTHER to WSL
  • 負責人 Update from (無) to keith
評語

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.

2018-11-09 08:49 Updated by: heisenbug
評語

You're welcome.

And I understand. If it helps: I have tested the 0x1032 value and can report that it works as intended.

2018-11-19 01:26 Updated by: keith
評語

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?

2018-11-19 01:33 Updated by: heisenbug
評語

Oh that's generous. You can say "reported by Jelle Geerts" if you like! Thanks for asking.

2018-11-19 06:37 Updated by: keith
  • 處理結果 Update from to 修正
  • 狀態 Update from 開啟 to 關閉
評語

Fixed by commit #955a4fc.

Attachment File List

No attachments

編輯

Please login to add comment to this ticket » 登入