One way I solved that problem is for CMyEdit to reflect the WM_KEYDOWN to its parent (the CDialog derived class that contains the edit control) Here is the code snippet. Use ClassWizard to create both event handlers.
void CMyEdit::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
::PostMessage(GetParent()->m_hWnd, WM_KEYDOWN,nChar,0);
CEdit::OnKeyDown(nChar, nRepCnt, nFlags);
}
void CTestDlgDlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// TODO: Add your message handler code here and/or call default
CDialog::OnKeyDown(nChar, nRepCnt, nFlags);
}