[Editor Note: In this FAQ, Dean is telling a guy how to handle WM_CHKTBLTOGGLE, which is some message that dude is trying to handle. The guy was doing it a wrong way before, I've left that in for educational reasons.]
Use ON_MESSAGE:
In your class definition:
afx_msg LRESULT OnChkTblToggle(WPARAM wParam, LPARAM lParam);
In your message map:
In your code:
You told MFC that your function is:
That's what the signature AfxSig_vwp means... and definitely not what you want.
ON_MESSAGE and ON_REGISTERED_MESSAGE are intended to allow you to extend the message handlers to your own custom message handlers. Please don't rely on specific AfxSig_* values or on the message map structure -- it may change without notice.
Dean McCrory, mfc-l, 8/19/95