OnMessage Error

  • Thread starter Thread starter meipv
  • Start date Start date
M

meipv

I have an MFC application. I am getting this error when I attempt to
compile: error C2440: static cast: cannot convert from
'void(_thiscall(CNameDlg::*)(WPARAM, LPARAM) to LRESULT(_thiscall
CWnd::*)(WPARAM,LPARAM)'.

This is basically where the error occurs.
BEGIN_MESSAGE_MAP(CNameDlg, CDialog)
ON_MESSAGE(LJ_MESSAGE, OnProcess)
END_MESSAGE_MAP

Anyone's help would be greatly appreciated.
 
meipv said:
I have an MFC application. I am getting this error when I attempt to
compile: error C2440: static cast: cannot convert from
'void(_thiscall(CNameDlg::*)(WPARAM, LPARAM) to LRESULT(_thiscall
CWnd::*)(WPARAM,LPARAM)'.

This is basically where the error occurs.
BEGIN_MESSAGE_MAP(CNameDlg, CDialog)
ON_MESSAGE(LJ_MESSAGE, OnProcess)
END_MESSAGE_MAP

Anyone's help would be greatly appreciated.

Change the handler function to match the expected prototype...

LRESULT CNameDialog::OnProcess(WPARAM wParam, LPARAM lParam)
 
Back
Top