以下是部分代码
// CBounceview.cpp
……
LRESULT OnDelegatedCmdMsg(WPARAM,LPARAM Iparam)
{
COnCmdMsg *pOnCmdMsg=(COnCmdMsg *)Iparam;
return CWnd::OnCmdMsg(pOnCmdMsg->m_nID,pOnCmdMsg->m_nCode,pOnCmdMsg->m_pExtra,pOnCmdMsg-
>m_pHandlerInfo);//此处有错误,详见错误信息,其中declaration of 'OnCmdMsg' 为
//virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
}
LRESULT OnPrepareToClose(WPARAM mParam=0,LPARAM IParam=0)
{
DestroyWindow();//此处有错误,详见错误信息
return 0;
}
……
// CBounceFrame.cpp
BOOL CBounceFrame::Creat(LPCTSTR szTitle,LONG style,const RECT& rect,CMDIFrameWnd* pParent)
{
if(menu.m_hMenu==NULL)
menu.LoadMenu(IDR_BOUNCETYPE);
m_hMenuShared=menu.m_hMenu;
if(!CMDIChildWnd::Create(NULL,szTitle,style,rect,pParent))
return FALSE;
CBounceThread *pBounceThread=new CBounceThread(m_hWnd);//此处有错误,详见错误信息,其中
//declaration of 'new':void* PASCAL operator new(size_t nSize, LPCSTR lpszFileName, int nLine)
pBounceThread->CreateThread();
return TRUE;
}
……
错误信息:
……
C:\Documents and Settings\Administrator\桌面\MyProjects\MThread\BounceFrame.cpp(47) : warning C4291:
'void *__stdcall CObject::operator new(unsigned int,const char *,int)' : no matching operator delete
found; memory will not be freed if initializati
on throws an exception
g:\软件\vc文件\vc6cn\vc98\mfc\include\afx.h(683) : see declaration of 'new'
BounceThread.cpp
C:\Documents and Settings\Administrator\桌面\MyProjects\MThread\BounceThread.cpp(18) : warning
C4291: 'void *__stdcall CObject::operator new(unsigned int,const char *,int)' : no matching operator
delete found; memory will not be freed if initializat
ion throws an exception
g:\软件\vc文件\vc6cn\vc98\mfc\include\afx.h(683) : see declaration of 'new'
Bounceview.cpp
C:\Documents and Settings\Administrator\桌面\MyProjects\MThread\Bounceview.cpp(187) : error C2352:
'CCmdTarget::OnCmdMsg' : illegal call of non-static member function
g:\软件\vc文件\vc6cn\vc98\mfc\include\afxwin.h(1595) : see declaration of 'OnCmdMsg'
C:\Documents and Settings\Administrator\桌面\MyProjects\MThread\Bounceview.cpp(192) : error C2660:
'DestroyWindow' : function does not take 0 parameters
执行 cl.exe 时出错.
Creating browse info file...
MThread.exe - 1 error(s), 0 warning(s)
知道原因的请帮我改正,谢谢阅读!,多谢赐教!