LRESULT CWindowWnd::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
{return ::CallWindowProc(m_OldWndProc, m_hWnd, uMsg, wParam, lParam);
}
LRESULT WindowImplBase::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
{lRes = HandleCustomMessage(uMsg, wParam, lParam, bHandled);
if (bHandled) return lRes;
if (m_PaintManager.MessageHandler(uMsg, wParam, lParam, lRes))
return lRes;
return CWindowWnd::HandleMessage(uMsg, wParam, lParam);
}
//CWindowWnd 是父类,WindowImplBase 是子类
class UILIB_API WindowImplBase : public CWindowWnd
如果派生类 如果实现这些虚函数 执行程序如下:HandleMessage --> HandleCustomMessage --> MessageHandler
因而只有实现 HandleCustomMessage 即可