Here's the declaration. It's an extremely simple class containing only a constructor, a message map and a single message map entry.
class CSplitOverride : public CSplitterWnd
{
DECLARE_DYNAMIC(CSplitOverride)
public:
CSplitOverride() { }
protected:
DECLARE_MESSAGE_MAP()
afx_msg UINT OnNcHitTest(CPoint point);
}
And here's the implementation.
IMPLEMENT_DYNAMIC(CSplitOverride, CSplitterWnd)
BEGIN_MESSAGE_MAP(CSplitOverride, CSplitterWnd)
ON_WM_NCHITTEST()
END_MESSAGE_MAP()
// CSplitOverride message handlers
afx_msg UINT CSplitOverride::OnNcHitTest(CPoint /*point*/)
{
return HTNOWHERE;
}
本文介绍了一个名为CSplitOverride的简单类,该类继承自CSplitterWnd,并重写了OnNcHitTest方法,返回HTNOWHERE以实现特定的窗口交互行为。

被折叠的 条评论
为什么被折叠?



