我想知道是否有更简单的方法在我的班级中创建虚拟函数,然后是一个宏来调用它们。
virtual int Controller::OnClose(WPARAM wParam, LPARAM lParam, bool& bHandled) { return 0; }
virtual int Controller::OnDestroy(WPARAM wParam, LPARAM lParam, bool& bHandled) { return 0; }
virtual int Controller::OnPaint(WPARAM wParam, LPARAM lParam, bool& bHandled) { return 0; }
case WM_CREATE: lRes = OnCreate(wParam, lParam, bHandled); break;
case WM_DESTROY: lRes = OnDestroy(wParam, lParam, bHandled); break;
case WM_PAINT: lRes = OnPaint(wParam, lParam, bHandled); break;