# windows: Fix incorrect button ID setting for TaskDialog \(\#25391\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/10053e2566c6c3312e2312088e40b757daeab189)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 10053e2566c6c3312e2312088e40b757daeab189

Requested commit: 10053e2566c6c3312e2312088e40b757daeab189

Commit: 10053e2566c6c3312e2312088e40b757daeab189

Tree: 1456798f4758be529d4540ca628d37ab0bbed16d

Author: 张小白

Committer: GitHub

## Message

```
windows: Fix incorrect button ID setting for TaskDialog (#25391)

Closes #22821

It turns out that on Windows, the `Cancel` button should **always** have
a button ID of `2`. Even if the button label is something like "Don't
Cancel", when the user presses the `Esc` key, Windows will still report
that the button with ID `2` was pressed.

Release Notes:

- N/A
```

## Parents

- [7a55da58d96e94fd7725d703290c68b7db7377ce](https://git.cafe/gitcafe/zed/commit/7a55da58d96e94fd7725d703290c68b7db7377ce?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/10053e2566c6c3312e2312088e40b757daeab189?format=markdown)
