| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1397 人关注过本帖
标题:该程序在VS2005中运行为什么会出现以下错误?(红字是错误)。
只看楼主 加入收藏
kxfei5555w
Rank: 1
等 级:新手上路
帖 子:23
专家分:5
注 册:2010-9-27
结帖率:100%
收藏
已结贴  问题点数:10 回复次数:4 
该程序在VS2005中运行为什么会出现以下错误?(红字是错误)。
BEGIN_MESSAGE_MAP(CRecordHWndDlg, CDialog)
    //{{AFX_MSG_MAP(CRecordHWndDlg)
    ON_WM_SYSCOMMAND()
    ON_WM_PAINT()
    ON_WM_QUERYDRAGICON()
    ON_BN_CLICKED(IDC_REC_START, OnRecStart)
    ON_BN_CLICKED(IDC_REC_STOP, OnRecStop)
    ON_MESSAGE(MM_WIM_OPEN,OnMM_WIM_OPEN)
    ON_MESSAGE(MM_WIM_DATA,OnMM_WIM_DATA)
    ON_MESSAGE(MM_WIM_CLOSE,OnMM_WIM_CLOSE)
    ON_MESSAGE(MM_WOM_OPEN,OnMM_WOM_OPEN)
    ON_MESSAGE(MM_WOM_DONE,OnMM_WOM_DONE)
    ON_MESSAGE(MM_WOM_CLOSE,OnMM_WOM_CLOSE)
    ON_WM_DESTROY()
    ON_BN_CLICKED(IDC_PLAY_START, OnPlayStart)
    ON_BN_CLICKED(IDC_PLAY_PAUSE, OnPlayPause)
    ON_BN_CLICKED(IDC_PLAY_STOP, OnPlayStop)
    ON_WM_TIMER()
    //}}AFX_MSG_MAP
END_MESSAGE_MAP()
1>f:\vs下载的程序\13297912基于api录音机程序\recordhwnd\recordhwnddlg.cpp(97) : error C2440: 'static_cast' : cannot convert from 'void (__thiscall CRecordHWndDlg::* )(UINT,LONG)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'
1>        None of the functions with this name in scope match the target type
1>f:\vs下载的程序\13297912基于api录音机程序\recordhwnd\recordhwnddlg.cpp(98) : error C2440: 'static_cast' : cannot convert from 'void (__thiscall CRecordHWndDlg::* )(UINT,LONG)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'
1>        None of the functions with this name in scope match the target type
1>f:\vs下载的程序\13297912基于api录音机程序\recordhwnd\recordhwnddlg.cpp(99) : error C2440: 'static_cast' : cannot convert from 'void (__thiscall CRecordHWndDlg::* )(UINT,LONG)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'
1>        None of the functions with this name in scope match the target type
1>f:\vs下载的程序\13297912基于api录音机程序\recordhwnd\recordhwnddlg.cpp(100) : error C2440: 'static_cast' : cannot convert from 'void (__thiscall CRecordHWndDlg::* )(UINT,LONG)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'
1>        None of the functions with this name in scope match the target type
1>f:\vs下载的程序\13297912基于api录音机程序\recordhwnd\recordhwnddlg.cpp(101) : error C2440: 'static_cast' : cannot convert from 'void (__thiscall CRecordHWndDlg::* )(UINT,LONG)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'
1>        None of the functions with this name in scope match the target type
1>f:\vs下载的程序\13297912基于api录音机程序\recordhwnd\recordhwnddlg.cpp(102) : error C2440: 'static_cast' : cannot convert from 'void (__thiscall CRecordHWndDlg::* )(UINT,LONG)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'
1>        None of the functions with this name in scope match the target type
1>Build log was saved at "file://f:\VS下载的程序\13297912基于API录音机程序\RecordHWnd\Debug\BuildLog.htm"
搜索更多相关主题的帖子: 运行 
2010-10-16 15:15
cnfarer
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:179
帖 子:3330
专家分:21157
注 册:2010-1-19
收藏
得分:5 
这似乎是不同版本程序之间的问题!

★★★★★为人民服务★★★★★
2010-10-16 21:21
沼泽
Rank: 4
等 级:业余侠客
威 望:8
帖 子:291
专家分:228
注 册:2008-9-15
收藏
得分:5 
根据错误提示,是你的函数格式与标准不相同
2010-10-16 22:49
kxfei5555w
Rank: 1
等 级:新手上路
帖 子:23
专家分:5
注 册:2010-9-27
收藏
得分:0 
回复 2楼 cnfarer
的确,这原来是用Windowsapi做的,我在VS2005下运行的,能给点修改的方法不?
2010-10-17 18:53
wynemo
Rank: 2
等 级:论坛游民
帖 子:12
专家分:42
注 册:2010-7-17
收藏
得分:0 
void (__thiscall CRecordHWndDlg::* )(UINT,LONG) 是现在程序的形式,你改为LRESULT (__thiscall CRecordHWndDlg::* )(WPARAM,LPARAM) 形式的,相应的有返回值,搞个return 0,参数值自己试着修改下
2010-10-21 14:17
快速回复:该程序在VS2005中运行为什么会出现以下错误?(红字是错误)。
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012200 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved