O
Ommund
Hi
I have an MFC application originally developed in VC++ 6.0. The port to VC++
2003 went fine except for a few message handlers:
In the .h file
afx_msg void OnPingFailed( WPARAM wParam, LPARAM lParam);
In the .cpp file
..cpp fil (event map)
ON_THREAD_MESSAGE(ID_AXIS_PING_FAILED, OnPingFailed)
og
void CDbServer3Dlg::OnPingFailed( WPARAM wParam, LPARAM lParam)
{
// Do nothing, but provide some trace for debugging
int iServerIndex = static_cast<int>(wParam);
...
return;
}
The application is a simple dialogue based application where CDbServer3Dlg
is derived from CDialog.
I get the following error messages when the code is compiled in VC++ 2003
d:\AutroOS\Product\Server\DB_Server\src\DbServer3Dlg.cpp(118) : error
C2440: 'static_cast' : cannot convert from 'void (__thiscall
CDbServer3Dlg::* )(WPARAM,LPARAM)' to 'void (__thiscall CWinThread::*
)(WPARAM,LPARAM)'
None of the functions with this name in scope match the target type
in task list:
d:\AutroOS\Product\Server\DB_Server\src\DbServer3Dlg.cpp(118): error C2440:
'static_cast' : cannot convert from 'void (__thiscall CDbServer3Dlg::*
)(WPARAM,LPARAM)' to 'void (__thiscall CWinThread::* )(WPARAM,LPARAM)'
Does anyone know what the problem might be?
Regards
Ommund
I have an MFC application originally developed in VC++ 6.0. The port to VC++
2003 went fine except for a few message handlers:
In the .h file
afx_msg void OnPingFailed( WPARAM wParam, LPARAM lParam);
In the .cpp file
..cpp fil (event map)
ON_THREAD_MESSAGE(ID_AXIS_PING_FAILED, OnPingFailed)
og
void CDbServer3Dlg::OnPingFailed( WPARAM wParam, LPARAM lParam)
{
// Do nothing, but provide some trace for debugging
int iServerIndex = static_cast<int>(wParam);
...
return;
}
The application is a simple dialogue based application where CDbServer3Dlg
is derived from CDialog.
I get the following error messages when the code is compiled in VC++ 2003
d:\AutroOS\Product\Server\DB_Server\src\DbServer3Dlg.cpp(118) : error
C2440: 'static_cast' : cannot convert from 'void (__thiscall
CDbServer3Dlg::* )(WPARAM,LPARAM)' to 'void (__thiscall CWinThread::*
)(WPARAM,LPARAM)'
None of the functions with this name in scope match the target type
in task list:
d:\AutroOS\Product\Server\DB_Server\src\DbServer3Dlg.cpp(118): error C2440:
'static_cast' : cannot convert from 'void (__thiscall CDbServer3Dlg::*
)(WPARAM,LPARAM)' to 'void (__thiscall CWinThread::* )(WPARAM,LPARAM)'
Does anyone know what the problem might be?
Regards
Ommund