Skip to content

Correct return value of CTaskDialog::OnHelp() #5176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

JoshHarmon
Copy link
Contributor

It returns S_FALSE, not S_OK, according to afxtaskdialog.cpp in 14.42.34433.
image

In testing, returning S_OK from an overridden implementation to match the described "default" implementation may result in another window (e.g., a main frame window) also presenting help.

It returns `S_FALSE`, not `S_OK`, according to `afxtaskdialog.cpp` in 14.42.34433.

In testing, returning `S_OK` from an overridden implementation may result in another window (e.g., a main frame window) also presenting help.
Copy link
Contributor

@JoshHarmon : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Copy link
Contributor

Learn Build status updates of commit 629fc83:

✅ Validation status: passed

File Status Preview URL Details
docs/mfc/reference/ctaskdialog-class.md ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

@JoshHarmon
Copy link
Contributor Author

I should note that the fact there is a behavior change based on return value suggests to me that the page for TDN_HELP also is likely to contain bogus claims, such the claim that "The return value is ignored."

Copy link
Collaborator

@TylerMSFT TylerMSFT left a comment

Choose a reason for hiding this comment

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

@JoshHarmon, thank you for this fix. I verify the same.
I'll notify the owner of the other doc.
As an aside, my verification process included looking at another topic about the CTaskDialog, which I was able to substantially update. So, your good turn had good knock-on effects.

@TylerMSFT
Copy link
Collaborator

#sign-off

@Court72 Court72 merged commit f7460aa into MicrosoftDocs:main Feb 7, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants