cannot convert from 'LRESULT' to 'void'
-
Die Fehler:
RecordSound.cpp c:\Dokumente und Einstellungen\D.Derigs\Desktop\CD\C++\VideoNet_src\RecordSound.cpp(37) : error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall RecordSound::* )(WPARAM,LPARAM)' to 'void (__thiscall CWinThread::* )(WPARAM,LPARAM)' None of the functions with this name in scope match the target type c:\Dokumente und Einstellungen\D.Derigs\Desktop\CD\C++\VideoNet_src\RecordSound.cpp(38) : error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall RecordSound::* )(WPARAM,LPARAM)' to 'void (__thiscall CWinThread::* )(WPARAM,LPARAM)' None of the functions with this name in scope match the target type c:\Dokumente und Einstellungen\D.Derigs\Desktop\CD\C++\VideoNet_src\RecordSound.cpp(39) : error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall RecordSound::* )(WPARAM,LPARAM)' to 'void (__thiscall CWinThread::* )(WPARAM,LPARAM)' None of the functions with this name in scope match the target type c:\Dokumente und Einstellungen\D.Derigs\Desktop\CD\C++\VideoNet_src\RecordSound.cpp(40) : error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall RecordSound::* )(WPARAM,LPARAM)' to 'void (__thiscall CWinThread::* )(WPARAM,LPARAM)' None of the functions with this name in scope match the target type PlaySound.cpp c:\Dokumente und Einstellungen\D.Derigs\Desktop\CD\C++\VideoNet_src\PlaySound.cpp(38) : error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall PlaySound1::* )(WPARAM,LPARAM)' to 'void (__thiscall CWinThread::* )(WPARAM,LPARAM)' None of the functions with this name in scope match the target type c:\Dokumente und Einstellungen\D.Derigs\Desktop\CD\C++\VideoNet_src\PlaySound.cpp(39) : error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall PlaySound1::* )(WPARAM,LPARAM)' to 'void (__thiscall CWinThread::* )(WPARAM,LPARAM)' None of the functions with this name in scope match the target type c:\Dokumente und Einstellungen\D.Derigs\Desktop\CD\C++\VideoNet_src\PlaySound.cpp(40) : error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall PlaySound1::* )(WPARAM,LPARAM)' to 'void (__thiscall CWinThread::* )(WPARAM,LPARAM)' None of the functions with this name in scope match the target type c:\Dokumente und Einstellungen\D.Derigs\Desktop\CD\C++\VideoNet_src\PlaySound.cpp(41) : error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall PlaySound1::* )(WPARAM,LPARAM)' to 'void (__thiscall CWinThread::* )(WPARAM,LPARAM)' None of the functions with this name in scope match the target type c:\Dokumente und Einstellungen\D.Derigs\Desktop\CD\C++\VideoNet_src\PlaySound.cpp(42) : error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall PlaySound1::* )(WPARAM,LPARAM)' to 'void (__thiscall CWinThread::* )(WPARAM,LPARAM)' None of the functions with this name in scope match the target type
Der Code:
BEGIN_MESSAGE_MAP(RecordSound,CWinThread) ON_THREAD_MESSAGE(MM_WIM_DATA, OnSoundData) ON_THREAD_MESSAGE(WM_RECORDSOUND_STARTRECORDING,OnStartRecording) ON_THREAD_MESSAGE(WM_RECORDSOUND_STOPRECORDING,OnStopRecording) ON_THREAD_MESSAGE(WM_RECORDSOUND_ENDTHREAD,OnEndThread) END_MESSAGE_MAP()
und
BEGIN_MESSAGE_MAP(PlaySound1, CWinThread) ON_THREAD_MESSAGE(WM_PLAYSOUND_STARTPLAYING, OnStartPlaying) ON_THREAD_MESSAGE(WM_PLAYSOUND_STOPPLAYING, OnStopPlaying) ON_THREAD_MESSAGE(WM_PLAYSOUND_PLAYBLOCK, OnWriteSoundData) ON_THREAD_MESSAGE(MM_WOM_DONE, OnEndPlaySoundData) ON_THREAD_MESSAGE(WM_PLAYSOUND_ENDTHREAD,OnEndThread) END_MESSAGE_MAP()
Wie kann ich das Problem lösen?
MfG,
D.Derigs
-
Steht doch da:
Deine Funktionen haben den falschen Typ! Du braucht LRESULT als Rückgabewert, nicht void.
-
Stimmt, mein Fehler!
Jetzt gehts