below i'm trying to copy all the contents in a CRichEditCtrl into a data array. but GetLine() returns nothing. though GetLineCount() returns the correct number of text lines.
please, any help.

Code:
CRichEditCtrl& crec =  GetRichEditCtrl();//get the CRichEditCtrl object associated with this CRichEditView object
	int linen = crec.GetLineCount();//get CRichEditCtrl's line count
	LPSTR data[MAX_PATH];
	//fill the data array with the contents of the CRichEditCtrl
	for(int i=0; i<linen; i++)
	{
		int charn = crec.GetLine(i,data[i]);
	}