不懂啊,请斑竹给个详细介绍,
void CControlBar::OnLButtonDown(UINT nFlags, CPoint pt)
{
// only start dragging if clicked in "void" space
if (m_pDockBar != NULL && OnToolHitTest(pt, NULL) == -1)
{
// start the drag
ASSERT(m_pDockContext != NULL);
ClientToScreen(&pt);
m_pDockContext->StartDrag(pt);
}
else
{
CWnd::OnLButtonDown(nFlags, pt);
}
}
void CControlBar::OnLButtonDblClk(UINT nFlags, CPoint pt)
{
// only toggle docking if clicked in "void" space
if (m_pDockBar != NULL && OnToolHitTest(pt, NULL) == -1)
{
// start the drag
ASSERT(m_pDockContext != NULL);
m_pDockContext->ToggleDocking();
}
else
{
CWnd::OnLButtonDblClk(nFlags, pt);
}
}
..........................
..........................
if ((GetStyle() & WS_VISIBLE) &&
(m_pDockBar == NULL || (m_pDockBar->GetStyle() & WS_VISIBLE)))
{
CFrameWnd* pTarget = (CFrameWnd*)GetOwner();
if (pTarget == NULL || !pTarget->IsFrameWnd())
pTarget = GetParentFrame();
if (pTarget != NULL)
OnUpdateCmdUI(pTarget, (BOOL)wParam);
}
return 0L;
}
以上是pDocBar的语句,请看看那里出问题了,谢谢