《深入浅出MFC》中第二章消息影射中不明白的地方,请教。
源代码frame8.03中mfc.epp
BEGIN_MESSAGE_MAP(CView, CWnd)
ON_COMMAND(CViewOfMyID, MyPrint) //这个是自己加入的
ON_COMMAND(CViewid, 0)
END_MESSAGE_MAP()
//在里面自己加了一个virtual函数
void CView::MyPrint(int k)
{
cout<<"\tafditx printfkkkkkkkkkkkkkkkkkkkkkkkkkk\t"<<k<<endl<<endl;
}
编译通过,但不知道怎样才能把MyPrint这函数调用,就像真正的MFC通过消息调用函数一样。