Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to override CWnd handler function? 1

Status
Not open for further replies.

mingis

Programmer
Jan 23, 2002
475
0
0
LT
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().
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top