ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • CDocument 파일 입출력
    MFC 2008. 12. 6. 15:44
    BOOL CPractice5_1Doc::OnNewDocument()
    {
        if (!CDocument::OnNewDocument())
            return FALSE;

        // TODO: add reinitialization code here
        // (SDI documents will reuse this document)
    // {
    ...
    // }
        return TRUE;
    }

    BOOL CPractice5_1Doc::OnSaveDocument(LPCTSTR lpszPathName)
    {
        // TODO: Add your specialized code here and/or call the base class
    // {
    ...
    // }   
        return CDocument::OnSaveDocument(lpszPathName);
    }

    BOOL CPractice5_1Doc::OnOpenDocument(LPCTSTR lpszPathName)
    {
        if (!CDocument::OnOpenDocument(lpszPathName))
            return FALSE;
       
        // TODO: Add your specialized creation code here
    // {
    ...
    // }   
        return TRUE;
    }

    void CPractice5_1Doc::Serialize(CArchive& ar)
    {
        if (ar.IsStoring())
        {
            // TODO: add storing code here
    ...
        }
        else
        {
            // TODO: add loading code here
    ...
        }
    }


    참조 사이트:
Designed by Tistory.