Skip to content

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

Merged
Court72 merged 1 commit into
MicrosoftDocs:mainfrom
JoshHarmon:patch-1
Feb 7, 2025
Merged

Correct return value of CTaskDialog::OnHelp()#5176
Court72 merged 1 commit into
MicrosoftDocs:mainfrom
JoshHarmon:patch-1

Conversation

@JoshHarmon

Copy link
Copy Markdown
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.
@prmerger-automator

Copy link
Copy Markdown
Contributor

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

@learn-build-service-prod

Copy link
Copy Markdown
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
Copy Markdown
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."

@TylerMSFT TylerMSFT left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Collaborator

#sign-off

@Court72
Court72 merged commit f7460aa into MicrosoftDocs:main Feb 7, 2025
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