It's best not to mess with expected behavior, which is Enter triggers the OK button. If you really want to, you could override PreTranslateMessage in your dialog and watch for the VK_RETURN in a WM_KEYDOWN message, or set up an accelerator.Quote:
Originally posted by nugroho2
Guys, thanks. I am just trying to revive the wild cards in the old DOS commands. I like it very much. Please see my code attached.
I am a newbie in Visual C++ and have not had much idea of the complicated nature of the details. It seems that the event of the PRESS ENTER key in an Edit box is captured in OnOK. When I press TAB, all is OK and the apps work alright.
OnCommand and OnUpdateEdit1 are better choices than OnKillFocusEdit1 as the files will be displayed immediately. I have just to figure out the way to handle the PRESS ENTER KEY in the Edit box, to shift the focus to other control when ENTER is pressed. Any idea ?
