CopyToMatrix
Copy a rectangle portion of the matrix object to one matrix.
BOOL CopyToMatrix(MatrixObject &mo, RECT* pRect, BOOL bUndo = FALSE)
return TRUE if the rectangle was copied to matrix else FALSE
EX1
//Copy a rectangle portion of the matrix object to a new matrix. void MatrixObject_CopyToMatrix_EX1() { MatrixPage mp = Project.MatrixPages(0); if(!mp) return; MatrixObject mo(mp.GetName(), 0); int nNumRows = mo.GetNumRows(); int nNumCols = mo.GetNumCols(); RECT rect;//construct a rectangle object. rect.left = 0; rect.top = 0; rect.right = nNumCols / 2; rect.bottom = nNumRows / 2; MatrixPage mpResult; mpResult.Create("origin"); MatrixObject moResult(mpResult.GetName(), 0); if( mo.CopyToMatrix(moResult, &rect) ) printf("Copied to another matrix object"); }
MatrixObject::CopyToClipboard
origin.h