// TZ1Doc.cpp : implementation of the CTZ1Doc class
//
#include "stdafx.h"
#include "TZ1.h"
#include "TZ1Doc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTZ1Doc
IMPLEMENT_DYNCREATE(CTZ1Doc, CDocument)
BEGIN_MESSAGE_MAP(CTZ1Doc, CDocument)
//{{AFX_MSG_MAP(CTZ1Doc)
ON_COMMAND(ID_FILE_NEW, OnFileNew)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTZ1Doc construction/destruction
CTZ1Doc::CTZ1Doc()
{
// TODO: add one-time construction code here
}
CTZ1Doc::~CTZ1Doc()
{
}
BOOL CTZ1Doc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CTZ1Doc serialization
void CTZ1Doc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
// TODO: add storing code here
}
else
{
// TODO: add loading code here
// CFile *fp = ar.GetFile();
// ar.Read(m_Input, fp->GetLength());
}
}
/////////////////////////////////////////////////////////////////////////////
// CTZ1Doc diagnostics
#ifdef _DEBUG
void CTZ1Doc::AssertValid() const
{
CDocument::AssertValid();
}
void CTZ1Doc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CTZ1Doc commands
void CTZ1Doc::OnFileNew()
{
// TODO: Add your command handler code here
char szFilter[] = "All Files(*.*)|*.*||";
CFileDialog dlg(TRUE, NULL, NULL, OFN_HIDEREADONLY, szFilter);
if(IDOK == dlg.DoModal())
{
CString strPathName = dlg.GetPathName();
CFile fp;
CFileException e;
if(!fp.Open(strPathName, CFile::modeRead, &e)) {
e.ReportError();
return;
}
char str[200];
fp.Read(str, 100);
m_Input += str;
fp.Close();
UpdateAllViews(NULL);
}
}
2013년 1월 14일 월요일
압축유틸 새로압축
피드 구독하기:
댓글 (Atom)

댓글 없음:
댓글 쓰기