ON_REGISTERED_MESSAGE(MsgUpdateCounters, OnUpdateCounters)
ON_REGISTERED_MESSAGE(MsgDataReady, OnDataReady)这2条出的错误,为什么?
请指教

解决方案 »

  1.   

    错误 1 error C2440: “static_cast”: 无法从“int (__thiscall CHKVisionDlg::* )(UINT,INT)”转换为“LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)” d:\sysdemosource\demodlg.cpp 141
    错误 2 error C2440: “static_cast”: 无法从“int (__thiscall CHKVisionDlg::* )(UINT,INT)”转换为“LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)” d:\sysdemosource\demodlg.cpp 142
      

  2.   

    将 OnUpdateCounters 的定义改为
    afx_msg LRESULT OnUpdateCounters(WPARAM wParam, LPARAM lParma);OnDataReady 修改同上
      

  3.   

    ON_REGISTERED_MESSAGE(MsgUpdateCounters, OnUpdateCounters)
    ON_REGISTERED_MESSAGE(MsgDataReady, OnDataReady)
    这个是你手动加进来的吗??
      

  4.   

    这个我觉得是你自己手动添加的~~~
    那么要在头文件中将:
    OnUpdateCounters
    afx_msg LRESULT OnBtnstringdigest(WPARAM wParam, LPARAM lParma);
    不要是自己添加的LRESULT OnBtnstringdigest(WPARAM wParam, LPARAM lParma);~~~
      

  5.   

    可我重定义不了啊 是调的dll里的
      

  6.   

    错误 15 error C2440: “static_cast”: 无法从“LRESULT (__thiscall CHKVisionDlg::* )(UINT,INT)”转换为“LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)” d:\SysDemoSource\DemoDlg.cpp 141
    错误 16 error C2440: “static_cast”: 无法从“LRESULT (__thiscall CHKVisionDlg::* )(UINT,INT)”转换为“LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)” d:\SysDemoSource\DemoDlg.cpp 142
      

  7.   


    static const UINT MsgUpdateCounters = ::RegisterWindowMessage(UPDATE_COUNTERS);
    static const UINT MsgDataReady = ::RegisterWindowMessage(DATA_READY);