I got some warnings using clean virtual interfaces for some MFC objects CWndthrough multiple inheritance. I believe this is due to the definition of the methods that need to be implemented for the message map.
warning C4407: cast between different pointer to member representations, compiler may generate incorrect code
This sounds a little more than a warning, more like something that could damage the heap. So, is there any other way to do something similar below, which will not cause dynamic MFC macros to be suppressed more than usual?
class ISomeInterface
{
public:
virtual LRESULT OnSomeRegisteredMessage(WPARAM wp, LPARAM lp) = 0;
};
class CSomeCoolWnd : public CWnd, public ISomeInterface
{
public:
LRESULT OnSomeRegisteredMessage(WPARAM wp, LPARAM lp);
};
BEGIN_MESSAGE_MAP(CSomeCoolWnd , CWnd)
ON_REGISTERED_MESSAGE(WM_USER_DEFINED, &CSomeCoolWnd::OnSomeRegisteredMessage)
END_MESSAGE_MAP()
, , , , . , .