ON_MESSAGE(WM_LOG_SYSTEM, OnSystemLog) ON_COMMAND_EX_RANGE(IDM_TAKEON_EQUIPMENT, IDM_TAKEON_EQUIPMENT + 8, OnEquipmentTakeon) END_MESSAGE_MAP() error C2440: “static_cast”: 无法从“void (__thiscall CWOLDlg::* )(WPARAM,LPARAM)”转换为“LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)” error C2440: “static_cast”: 无法从“void (__thiscall CWOLDlg::* )(UINT)”转换为“BOOL (__thiscall CCmdTarget::* )(UINT)” 从网上查要改一下定义,把Void转换成LRESULT,可我不知道该改哪,请问大家该哪呢应该改什么样? void CWOLDlg::OnSystemLog(WPARAM wParam,LPARAM lParam) { CString *pLog = (CString *)lParam; COLORREF color = (COLORREF)wParam; AddSysLog(*pLog, color); fprintf(m_pLogFile, "%s\n", *pLog); } void CWOLDlg::OnEquipmentTakeon(UINT nID) { // TODO: Add your command handler code here int Loc; Loc = nID - IDM_TAKEON_EQUIPMENT; m_WOLGame.m_MyHero.TakeOnEquipment(m_nIndex, Loc); } #define ON_MESSAGE(message, memberFxn) \ { message, 0, 0, 0, AfxSig_lwl, \ (AFX_PMSG)(AFX_PMSGW) \ (static_cast< LRESULT (AFX_MSG_CALL CWnd::*)(WPARAM, LPARAM) > \ (memberFxn)) }, #define ON_COMMAND_EX_RANGE(id, idLast, memberFxn) \ { WM_COMMAND, CN_COMMAND, (WORD)id, (WORD)idLast, AfxSigCmd_EX, \ (AFX_PMSG) \ (static_cast< BOOL (AFX_MSG_CALL CCmdTarget::*)(UINT) > \ (memberFxn)) },
为什么升级之后是2005?原来是什么版本
你这个是什么代码,语法都看不懂···