KH
Junior Member level 1
onkeydown() in cdialog + vc6.0
I wrote a simple dialog based program using MFC wizard to detect any key press, but the program is not responding to any key pressed. What is missing ?
Below is the message handle codes, the empty function is created using ClassWizard
void CTestingDlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
MessageBox("Key pressed", "Error", MB_ICONERROR | MB_OK);
CDialog::OnKeyDown(nChar, nRepCnt, nFlags);
}
Thanks.
I wrote a simple dialog based program using MFC wizard to detect any key press, but the program is not responding to any key pressed. What is missing ?
Below is the message handle codes, the empty function is created using ClassWizard
void CTestingDlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
MessageBox("Key pressed", "Error", MB_ICONERROR | MB_OK);
CDialog::OnKeyDown(nChar, nRepCnt, nFlags);
}
Thanks.