The member function pointer is applied in the message processing function in the MFC, and the members of the derived class is called from the base class. The approximate method is as follows: Class T; class t1; typedef void (t :: * msg_func) (void); Class T {public: t ()} virtual ~ t () {} void test1 (msg_func p) {(this -> * p) ();}};
Class T1 {Public: T1 () {} Virtual ~ T1 () {} void test2 () {cout << "test2";}};
Int main () {
T t. T. Test1 ((msg_func) & t1 :: test2); return 0;
}