Mitch Wittneben
May 13th, 1999, 12:37 PM
I have a MDI app that uses quite a few modal dialog boxes. Unfortunately pressing return closes the dialog. Is there a way to force make the enter key act as a tab on the dialog(s) of my choosing.
thanks in advance.
mitch
hi!
U can handle the PreTranslateMessage() funtion in your CDialog derived class. In that function check for WM_KEYDOWN and also check the wParam for the 'Enter' key code. If that is so, do not make a call to CDialog::PreTranslateMessage(). Instead call whatever handler u want to carry out some special handling and then return TRUE from the PreTranslateMessage() function.
HTH