I'am trying to add some additional processing on each key press in dialog based MFC application. The piece of code is:
class CTestkeyDlg : public CDialog
{
<...>
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
void CTestkeyDlg::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
char out_str[2];
out_str[0]=nChar;
out_str[1]=0;
MessageBox(out_str);
CWnd::OnChar(nChar, nRepCnt, nFlags);
}
The control never comes to CTestkeyDlg::OnChar().
class CTestkeyDlg : public CDialog
{
<...>
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
void CTestkeyDlg::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
char out_str[2];
out_str[0]=nChar;
out_str[1]=0;
MessageBox(out_str);
CWnd::OnChar(nChar, nRepCnt, nFlags);
}
The control never comes to CTestkeyDlg::OnChar().