|
does this make any sense?
(vehicle is an example)
void CVehicleFileView::OnDraw(CDC*
pDC){
CVehicleFileDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
ifstream vFile;
char vLine[100];
int yPos = 10;
vFile.open("vehicle.txt", ios::in);
if(!vFile)
return;
while(!vFile.eof()){
vFile.getline(vLine, 100); //read each line of text
pDC->TextOut(100, yPos, vLine);
yPos += 25;
}
vFile.close();
}
|