首页 新闻 会员 周边 捐助

升级至vs2005出现了这个error C2440: “static_cast”: 我新手大家帮下忙!

0
悬赏园豆:15 [待解决问题]
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)) },
安美奇的主页 安美奇 | 初学一级 | 园豆:3
提问于:2014-09-11 09:11
< >
分享
所有回答(1)
0

为什么升级之后是2005?原来是什么版本

你这个是什么代码,语法都看不懂···

吴瑞祥 | 园豆:29449 (高人七级) | 2014-09-11 09:33
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册