overloaded member function 'void (unsigned int)' not found in
我在demoView.h中如下定义:
lass CDemoView : public CView
{
protected: // create from serialization only
afx_msg void OnTimer(UINT_PTR nIDEvent);
CDemoView();
DECLARE_DYNCREATE(CDemoView)
...
.....
然后在demoView.cpp中:
IMPLEMENT_DYNCREATE(CDemoView, CView)
BEGIN_MESSAGE_MAP(CDemoView, CView)
//{{AFX_MSG_MAP(CDemoView)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
// Standard printing commands
ON_WM_TIMER()
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()
...
...
void CDemoView::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
pBackDC->PatBlt(0,0,winx, winy, PATCOPY);
//画坐标轴及刻度
DrawCoordinate(pBackDC ,BLACKPEN, MainWindowLeft,MainWindowBottom - MAINHEIGHT, MainWindowLeft + MAINWIDTH, MainWindowBottom);
//标出x坐标刻度值
WriteCoordinateX(pBackDC, BLACKPEN, MainWindowLeft,MainWindowLeft + MAINWIDTH, MainWindowBottom);
...
...
红色部分是错误代码,错误提示为:error C2511: 'OnTimer' : overloaded member function 'void (unsigned int)' not found in 'CDemoView'
f:\lcd驱动开发\图形编程\demo\demoview.h(13) : see declaration of 'CDemoView'
啥原因呢?高手指点下。。