In CApplView I create a Login Form.
void CApplView::Login_Entry(CDC *pDC) {
..
if (pUserid == NULL) {
pUserid = new CEdit;
pUserid->Create(WS_CHILD|WS_VISIBLE|WS_BORDER, CRect(x,y1,w,h), this, IDC_USER);
pPasswd = new CEdit;
pPasswd->Create(WS_CHILD|WS_VISIBLE|WS_BORDER, CRect(x,y2,w,h), this, IDC_PASS);
pbLogin = new CButton(); pbLogin->Create("Login",WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON, CRect(x,y3,w,h), this, IDB_LOGIN);
}
}
How do I add code to set the focus on pPasswd when TAB or RETN is entered in pUserid?
Something like...
OnKeyDown (in pUserid)
if ((char == VK_RETURN) || (char == VK_TAB)) {
pPasswd->SetFocus();
}
I cannot figure out how to incorporate the event in the MESSAGE MAP.