Click to See Complete Forum and Search --> : what does this mean?


sorner
April 14th, 2005, 02:11 PM
CommHostView.cpp(42) : error C2440: 'static_cast' : cannot convert from 'void (__thiscall CCommHostView::* )(WPARAM,LPARAM)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'
None of the functions with this name in scope match the target type

MrViggy
April 14th, 2005, 04:57 PM
Well, C2440 (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/C2440.asp) means that the compiler cannot cast the function pointer whose signature is 'void (__thiscall CCommHostView::* )(WPARAM,LPARAM)' into a function pointer whose signature is 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'. Your function is not returning an LRESULT, and/or 'CCommHostView' is not a CWnd.

Viggy

sorner
April 18th, 2005, 08:03 AM
and how can i fix this? I'm new to VC.NET

Andreas Masur
April 18th, 2005, 08:44 AM
In general by changing the return value of the corresponding message handler from 'void' to 'LRESULT'...if not...please post the corresponding message map entry...