The reason for OnOK was because the OP was trying to find out how it could
be done without catching WM_KEYDOWN.
AliR.
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
The only problem with this code is that it disables the OK key, and will
only work under
circumstances where the <enter> key sends IDOK, which is not true of being
in all
controls.
I'd suggest this is one of the few valid uses of PreTranslateMessage.
joe
On Tue, 13 May 2008 11:10:55 -0500, "AliR \(VC++ MVP\)"
<AliR@online.nospam> wrote:
Look for
void CMyDialog::OnOK()
{
CWnd *pWnd = GetNextDlgTabItem(GetFocus());
if (pWnd)
{
pWnd->SetFocus();
}
}
AliR.
"Landon" <Landon@discussions.microsoft.com> wrote in message
news:C701AC43-5F70-4847-ABC4-55D99F63A69C@microsoft.com...
I've ever seen an application that moves the active control using Tab or
Enter key.
So the application has a few Combo Boxes, CEdit, Checkboxes and to move
from
one control to another, we can use either Tab or Enter key.
How to do that?
I've tried to find it but I still haven't found any.
Thank you very much.
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm