Sign in to follow this  

Did the user clicked OK?

This topic is 4599 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there a way to see which button the user clicked within the OnDestroy() function of that same dialog? If not where else can I see it, besides the return value of that dialog?

Share this post


Link to post
Share on other sites
You can override the OnOK() and OnCancel() member functions, or you can create your own buttons and make them do your exit code, then destroy the window yourself...

Share this post


Link to post
Share on other sites
If you're using MFC you're better of implementing handlers for the buttons.
If not, all the button clicks are routed through WM_COMMAND.

You cannot tell from OnDestroy/WM_DESTROY, which button led to the closing of the dialog. Dialogs can be destroyed without pushing a button as well.

Share this post


Link to post
Share on other sites

This topic is 4599 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this