class CLockSplitterWnd : public CSplitterWnd;
//. . .
BEGIN_MESSAGE_MAP(CLockSplitterWnd, CSplitterWnd)
ON_WM_LBUTTONDOWN()
ON_WM_SETCURSOR()
ON_WM_MOUSEMOVE()
END_MESSAGE_MAP()
//. . .
void CLockSplitterWnd::OnLButtonDown(UINT nFlags, CPoint point)
{
if(m_bLocked)
CWnd::OnLButtonDown(nFlags, point);
else
CSplitterWnd::OnLButtonDown(nFlags, point);
}
BOOL CLockSplitterWnd::OnSetCursor(CWnd* pWnd,
UINT nHitTest, UINT message)
{
if(m_bLocked)
return CWnd::OnSetCursor(pWnd, nHitTest, message);
else
return CSplitterWnd::OnSetCursor(pWnd, nHitTest, message);
}
void CLockSplitterWnd::OnMouseMove(UINT nFlags, CPoint point)
{
if(m_bLocked)
CWnd::OnMouseMove(nFlags, point);
else
CSplitterWnd::OnMouseMove(nFlags, point);
}