Jump to content
  • Advertisement
Sign in to follow this  
da_cobra

Did the user clicked OK?

This topic is 4757 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!