分隔条代码
void CSplitter::OnMouseMove(UINT nFlags, CPoint point)
{
if(this->IsDraging)
{
CWnd *parent = this->GetParent();
CRect lRect;
CRect rRect;
CRect rect;
CRect pRect;
parent->GetWindowRect(&pRect);
this->GetWindowRect(&rect);
if ()
{
this->LeftWnd->GetWindowRect(&lRect);
this->RightWnd->GetWindowRect(&rRect);

parent->ScreenToClient(&lRect);
parent->ScreenToClient(&rRect);
parent->ScreenToClient(&rect);
lRect.left += point.x - this->StartX;
rRect.left += point.x - this->StartX;
this->LeftWnd->MoveWindow(&lRect);
this->RightWnd->MoveWindow(&rRect);
SetWindowPos(0,rect.left + (point.x - this->StartX),rect.top,0,0,SWP_NOSIZE|SWP_NOZORDER);
}
}
else
{
CWnd::OnMouseMove(nFlags, point);
}
}


浙公网安备 33010602011771号