CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Location
    Spain
    Posts
    335

    Esc Key, not always close the dialog...

    Hi,

    I have a dialog and I want that before close one window with the "Esc" Key, ask to save some datas, and if the save operation fails, not to close the window.

    Is there an easy way to do this ?, I have thinked about in pretranslate message get the message for ESC_KEY ( what message is ?), and then ask, and if it fails, get out the message.

    Anybody can help me ? Thanks, Bye !
    Braulio


  2. #2
    Guest

    Re: Esc Key, not always close the dialog...

    If you have IDCANCEL button in your dialog then just add event handler BTN_CLICKED for that control.

    And if you don't just add member function
    virtual void OnCancel();
    to your dialog class.




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured