In my MFC application, the whole application is a modal dialog box and on the press of enter key I want to change focus from one control to the other ..in short I want to sinulate the tab key with enter key ....
my application is only this dialog box and in dialog boxes, enter should close them but in my application enter should meen the confirmation of the user input so I am planning to simulate enter through tab.
on the default button's click event I am
this gives me a very strange behaviour, i.e. after the focus has been shifted to the next control, I cannot select text or set the mouse cursor on the edit control which has lost the focus until I press a tab key..
//these two are edit controls from which I want to remove focus
//this is a button control on which I want o set the focus