OnMessage Error

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.
 
J

Jeff Partch

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top