Hi,
I am working in a porting project (porting from Visual studio 6.0 to VS 2005) i have got the following error.
error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall CServiceMainThread::* )(WPARAM,LPARAM)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'
code in ServiceMainThread.cpp
BEGIN_MESSAGE_MAP(CServiceMainThread, CWinThread)
//{{AFX_MSG_MAP(CServiceMainThread)
//
//}}AFX_MSG_MAP
ON_MESSAGE(WM_THREAD_CLOSE, OnThreadClose) //Venkat <------ Error Line
END_MESSAGE_MAP()
LRESULT CServiceMainThread::OnThreadClose(WPARAM wParam, LPARAM lParam) //Venkat
{
.....
.....
return TRUE;
}
code in ServiceThreadMain.h
public:
virtual ~CServiceMainThread();
BOOL Init(); // 3430A007
//{{AFX_MSG(CServiceMainThread)
//}}AFX_MSG
afx_msg LRESULT OnThreadClose(WPARAM, LPARAM); //Venkat
DECLARE_MESSAGE_MAP()
I have gone through many blogs and made changes like adding the class name in the message pump etc.. but nothing turned my way.. Pls help me to resolve this error.. Thanks in advance...
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).