Marzk
January 3rd, 2004, 01:25 AM
I have an MFC application written with VC++6.0, I compiled it with .net VC++ 7.0 and I got strange error:
error C2440: 'static_cast' : cannot convert from 'int (__thiscall CSepWin::* )(void)' to 'AFX_PMSG'
This error occurs when I include function that has any return value other than void in the ON_COMMAND statement. So, if function OnNewEditor has void return I do not get this error.
BEGIN_MESSAGE_MAP(CSepWin, CDialog)
// here is the error line
ON_COMMAND(IDM_NEW_EDITOR,OnNewEditor) END_MESSAGE_MAP()
Thankx,
Mark,
error C2440: 'static_cast' : cannot convert from 'int (__thiscall CSepWin::* )(void)' to 'AFX_PMSG'
This error occurs when I include function that has any return value other than void in the ON_COMMAND statement. So, if function OnNewEditor has void return I do not get this error.
BEGIN_MESSAGE_MAP(CSepWin, CDialog)
// here is the error line
ON_COMMAND(IDM_NEW_EDITOR,OnNewEditor) END_MESSAGE_MAP()
Thankx,
Mark,