Share via


MFC의 파일

In the Microsoft Foundation Class Library (MFC), class CFile handles normal file I/O operations. This family of articles explains how to open and close files as well as read and write data to those files. It also discusses file status operations. For a description of how to use the object-based serialization features of MFC as an alternative way of reading and writing data in files, see the article Serialization.

참고

When you use MFC CDocument objects, the framework does much of the serialization work for you.In particular, the framework creates and uses the CFile object.You only have to write code in your override of the Serialize member function of class CDocument.

The CFile class provides an interface for general-purpose binary file operations. The CStdioFile and CMemFile classes derived from CFile and the CSharedFile class derived from CMemFile supply more specialized file services.

For more information about alternatives to MFC file handling, see File Handling in the Run-Time Library Reference.

For information about derived CFile classes, see the MFC hierarchy chart.

수행할 작업

Use CFile

Use MFC Serialization (Object Persistence)

참고 항목

참조

CArchive 클래스

CObject 클래스

개념

일반 MFC 항목

기타 리소스

MFC 개념

How Do I: Use the CFile Class?