Skip to content

The definition value of DTM_SETFORMATW is incorrect. - #22712

Merged
thewilsonator merged 2 commits into
dlang:masterfrom
Rayerd:Branch_commctrl.d
Sep 5, 2026
Merged

The definition value of DTM_SETFORMATW is incorrect.#22712
thewilsonator merged 2 commits into
dlang:masterfrom
Rayerd:Branch_commctrl.d

Conversation

@Rayerd

@Rayerd Rayerd commented Mar 8, 2026

Copy link
Copy Markdown
Contributor

The definition value of DTM_SETFORMATW is incorrect.

core.sys.windows.commctrl.d
image

Windows Kits 10.0.26100.0
image

@dlang-bot

Copy link
Copy Markdown

Thanks for your pull request and interest in making D better, @Rayerd! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#22712"

@thewilsonator thewilsonator left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

DTM_SETMCFONT = 0x1009,
DTM_GETMCFONT = 0x100a,
DTM_SETFORMATW = 0x1050
DTM_SETFORMATW = 0x1032

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the original is defined as DTM_FIRST + 50 just write that so that it is a direct translation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there code in druntime that generates core.sys.windows.* from MinGW? Also, is that MinGW code in this repository?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC the mingw headers were converted to D more or less manually. Ancient mingw versions contain this bug, but also were formatted like this, while newer (fixed) versions use expressions similar to the SDK. So I think using the old style should be ok.

@Rayerd

Rayerd commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

I am trying to add the required test for this PR, but I am having trouble with the repository structure.

When I clone both my fork (Rayerd/dmd) and the upstream dlang/dmd repository, the test/ directory does not appear at all. I also noticed that .gitmodules is missing, so the submodules (druntime, phobos, tools, testsuite) are not initialized.

I tried the following:

  • git submodule update --init --recursive
  • Cloning via HTTPS instead of SSH
  • Cloning upstream directly (https://github.com/dlang/dmd.git)
  • Manually cloning dmd-testsuite (but the URL in .gitmodules seems outdated or incorrect)

However, none of these resulted in a test/ directory appearing in the cloned repository.

Because of this, I cannot add the required test for this PR.
Could someone please tell me the correct way to obtain a full dmd repository including all submodules (especially the test/ directory)?
Or is there something wrong with the current .gitmodules configuration?

Any help would be greatly appreciated.

@rainers

rainers commented Sep 5, 2026

Copy link
Copy Markdown
Member

Or is there something wrong with the current .gitmodules configuration?

I suspect you are using some wrapper repositiory, maybe dlangvs? I suspect this has bit-rotten, haven't tried it in a while.

The dmd repository does not have any submodules, but expects phobos to sit in the same directory as dmd. Tests are in compiler/test and druntime/test, but as long as there is no actual comparison to some reference header files implemented, there is no point in verifying this single definition.

Please rebase instead of merging master, though.

@thewilsonator
thewilsonator merged commit 92abed6 into dlang:master Sep 5, 2026
42 of 43 checks passed
@Rayerd
Rayerd deleted the Branch_commctrl.d branch September 6, 2026 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants