I am trying to create a Visual Studio 6.0 MFC project in Visual Studio 2010. The compiler gives me an error:
error C2440: 'static_cast': cannot be converted from 'void (__thiscall ProgressDialog :: *) (void)' to 'LRESULT (__thiscall CWnd :: *) (WPARAM, LPARAM)'// --------------------------------- // Message mapBEGIN_MESSAGE_MAP (ProgressDialog, CDialog) ON_BN_CLICKED (IDC_CANCEL, OnCancelClicked) ON_MESSAGE (MSG_FINISHED, OnFinished) END_MESSAGE_MAP ()
error C2440: 'static_cast': cannot be converted from 'void (__thiscall ProgressDialog :: *) (void)' to 'LRESULT (__thiscall CWnd :: *) (WPARAM, LPARAM)'
// --------------------------------- // Message map
BEGIN_MESSAGE_MAP (ProgressDialog, CDialog) ON_BN_CLICKED (IDC_CANCEL, OnCancelClicked) ON_MESSAGE (MSG_FINISHED, OnFinished) END_MESSAGE_MAP ()
Any suggestions -?
Pedro
ON_MESSAGE ON_MESSAGE_VOID. ON_MESSAGE LRESULT WPARAM LPARAM. , OnFinished() - , void. , ON_MESSAGE_VOID.
:
++ Q A - Microsoft Systems Journal 1999 .
MFC7.0 , :
ON_MESSAGEafx_msg LRESULT (CWnd::*)(WPARAM, LPARAM)
ON_MESSAGE
afx_msg LRESULT (CWnd::*)(WPARAM, LPARAM)
ProgressDialog::OnFinished LRESULT.
ProgressDialog::OnFinished
LRESULT