What is the role of this function is to read the following keyboard keys, for example: enter "x", the screen will pop up a message box "x"
:: CMy01MFCtestView the OnChar void (UINT nChar, UINT nRepCnt, UINT nFlags)
{
// the TODO: this addition message handler code, and / or calling the default value
TCHAR ch = (TCHAR)nChar;
CString str;
str.Format(TEXT("%c"), ch);
MessageBox(str);
CView::OnChar(nChar, nRepCnt, nFlags);
}
This is when the left mouse button in the window when clicked, will pop up a message box displays the coordinate values of the left mouse button click on the window.
The OnLButtonDown CMy01MFCtestView :: void (UINT nFlags, a CPoint Point)
{
// the TODO: this addition message handler code, and / or calling the default value
CString STR;
str.format (the TEXT ( "% D = X, Y =% D" ), point.x, point.y);
MessageBox(str);
CView::OnLButtonDown(nFlags, point);
}