10、类成员函数指针做为函数参数的“C3867”错误
考察下面的代码,CWzWindowsHook类的构造函数使用一个该类的成员函数指针,这样构造对象时可以选择消息过滤的handler,可以是MouseMsgFilter,也可以是KeyboardMsgFilter:
typedef BOOL (CWzWindowsHook::*FILTERPROC)(WPARAM wParam, LPARAM lParam);
// A hook used in customization sheet to filter keyboard/mouse events
class CWzWindowsHook
{
private:
FILTERPROC m_pFilter;
BOOL MouseMsgFilter(WPARAM wParam, LPARAM lParam);
BOOL KeyboardMsgFilter(WPARAM wParam, LPARAM lParam);
public:
CWzWindow