void CGDISampleView::MoveSelectedObject(CPoint point) { CRect *ptrRect; ptrRect = pDoc-GetLine(m_nLineSel); //Xóa đường cũ (ptrRect-TopLeft()); (ptrRect-BottomRight()); //Tịnh tiến đến vị trí mới int dx, dy; dx = + ; dy = + ; ptrRect-top = ptrRect-top + dy; ptrRect-left = ptrRect-left + dx; ptrRect-bottom = ptrRect-bottom + dy; ptrRect-right = ptrRect-right + dx; //Vẽ đường mới (ptrRect-TopLeft()); (ptrRect-BottomRight()); m_ptStartSel = point; .