Oct 31, 2001 #1 TheCrappyProgrammer Programmer Joined Sep 17, 2001 Messages 41 Location US How would I disable the escape key? I don't wan't users to be able to exit my program by doing that.
Nov 2, 2001 #2 crux Programmer Joined Nov 29, 2000 Messages 13 Location NL This problem only occurs in Dialog Based Projects, or in dialogs. You can overwrite the OnCancel() function: void CYourDlg::OnCancel() { } then change the id of the cancel-button and add to this button the original OnCancel: void CYourDlg::OnCancel() { CDialog::OnCancel(); } In non-dialog-based projects you can alter resource Accelerator IDR_MAINFRAME Upvote 0 Downvote
This problem only occurs in Dialog Based Projects, or in dialogs. You can overwrite the OnCancel() function: void CYourDlg::OnCancel() { } then change the id of the cancel-button and add to this button the original OnCancel: void CYourDlg::OnCancel() { CDialog::OnCancel(); } In non-dialog-based projects you can alter resource Accelerator IDR_MAINFRAME
Nov 3, 2001 Thread starter #3 TheCrappyProgrammer Programmer Joined Sep 17, 2001 Messages 41 Location US Thanks! It worked! But now the Enter key also exits my application. How would I fix that? Upvote 0 Downvote