Hello all,
How do I go about adding a message handler i.e ON_MESSAGE(...etc) without the class wizard as in VC++6 Thanks in advance.
Hello all,
How do I go about adding a message handler i.e ON_MESSAGE(...etc) without the class wizard as in VC++6 Thanks in advance.
Class wizard
SanthaMind
I still get the following errors in my Begin Message Map for the parent Dialog.
: error C2440: 'static_cast' : cannot convert from 'void (__thiscall CPDUTSDlg::* )(WPARAM,LPARAM)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'
None of the functions with this name in scope match the target type
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
Please let me know if more information is needed.
Izhido_
Thanks,
I don't think I would have ever got this one.
sl0140
El Pato
That's due to a breaking change in VC++ 2005. See my blog entry on this, which also gives a workaround/
http://blog.voidnish.com/ p=91
Troy Lundin
Beside that Nishant already said.
ON_MESSAGE macro is generally used to map user-defined message handlers.
The handler function prototype is
afx_msg LRESULT memberFxn(WPARAM, LPARAM);Here is an example: