Jump to content
  • Advertisement
Sign in to follow this  
da_cobra

Did the user clicked OK?

This topic is 4903 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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!