View 的 WM_LBUTTONDOWN
事件消息。
void CMFCApplication1View::OnLButtonDown(UINT nFlags, CPoint point)
{
CString str;
str.Format(TEXT("x = %d, y = %d"), point.x, point.y);
MessageBox(str);
CView::OnLButtonDown(nFlags, point);
}
View 的 WM_CHAR
事件消息。
void CMFCApplication1View::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
TCHAR ch = (TCHAR)nChar;
CString str;
str.Format(TEXT("%c"), ch);
MessageBox(str);
CView::OnChar(nChar, nRepCnt, nFlags);
}
标签:MFC,测试,point,nFlags,ch,UINT,事件,str,nChar
From: https://www.cnblogs.com/huvjie/p/17985115