Hello
I'm a Delphi programmer and changed to the visual c++ language. I have problems with the OnKeyDown routine.
When I execute the program in debug mode I see that the routine isn't executed. The compiler does not show an error or warning. I made a new MFC project with the application wizard. Can please somebody tell me why the routine isn't called when I press a button?
void CTestDlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
switch(nChar)
{
case VK_RETURN:
SetWindowText("You pressed Enter");
break;
default:
SetWindowText("Whatever");
}
CDialog::OnKeyDown(nChar, nRepCnt, nFlags);
}
Kind regards,
Frank.
I'm a Delphi programmer and changed to the visual c++ language. I have problems with the OnKeyDown routine.
When I execute the program in debug mode I see that the routine isn't executed. The compiler does not show an error or warning. I made a new MFC project with the application wizard. Can please somebody tell me why the routine isn't called when I press a button?
void CTestDlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
switch(nChar)
{
case VK_RETURN:
SetWindowText("You pressed Enter");
break;
default:
SetWindowText("Whatever");
}
CDialog::OnKeyDown(nChar, nRepCnt, nFlags);
}
Kind regards,
Frank.