Hi Guys,
I'm hoping someone can help me. I'm upgrading a VC5 application to VC2005, I have one compilation error that I'm unable to resolve. I've spent a fair amount of time on this, I get the basic idea of what is causing the error, but I'm at a loss on how to resolve it as I'm still pretty new to C++.
The error is;
error C2440: 'static_cast' : cannot convert from 'void (__thiscall CSearchPedsDlg::* )(void)' to 'void (__thiscall CCmdTarget::* )(NMHDR *,LRESULT *)'
The offending code is the ON_NOTIFY lines;
BEGIN_MESSAGE_MAP(CSearchPedsDlg, CDialog)
ON_BN_CLICKED(IDC_ADD1, OnAdd1)
ON_BN_CLICKED(IDC_ADD2, OnAdd2)
ON_BN_CLICKED(IDC_DEL1, OnDel1)
ON_BN_CLICKED(IDC_DEL2, OnDel2)
ON_BN_CLICKED(IDC_PRINT, OnPrint)
ON_BN_CLICKED(IDC_SELECT, OnSelect)
ON_BN_CLICKED(IDC_LIST1, OnList1)
ON_BN_CLICKED(IDC_LIST2, OnList2)
ON_BN_CLICKED(IDC_DELALL1, OnDelall1)
ON_BN_CLICKED(IDC_DELALL2, OnDelall2)
ON_BN_CLICKED(IDC_SEARCHALL, OnSearchall)
ON_BN_CLICKED(IDC_DESCENDOF, OnDescendof)
ON_NOTIFY(NM_DBLCLK, IDC_SEARCHFOR, OnAdd1)
ON_NOTIFY(NM_RETURN, IDC_SEARCHFOR, OnAdd1)
ON_NOTIFY(NM_DBLCLK, IDC_SEARCHLIST, OnAdd2)
ON_NOTIFY(NM_RETURN, IDC_SEARCHLIST, OnAdd2)
ON_BN_CLICKED(IDC_CLEAR, OnClear)
END_MESSAGE_MAP()
The code compiles in VC5, but not VC2005.
Can someone please point me in the right direction?
Thanks in advance
Tim