|
// ENRITDoc.cpp : CENRITDoc Ŭ������ ����
|
//
|
|
#include "stdafx.h"
|
// SHARED_HANDLERS�� �̸� ����, ����� �� �� �˻� ���� ó���⸦ �����ϴ� ATL ������Ʈ���� ������ �� ������
|
// �ش� ������Ʈ�� ���� �ڵ带 �����ϵ��� �� �ݴϴ�.
|
#ifndef SHARED_HANDLERS
|
#include "ENRIT.h"
|
#endif
|
|
#include "ENRITDoc.h"
|
|
#include <propkey.h>
|
|
#ifdef _DEBUG
|
#define new DEBUG_NEW
|
#endif
|
|
// CENRITDoc
|
|
IMPLEMENT_DYNCREATE(CENRITDoc, CDocument)
|
|
BEGIN_MESSAGE_MAP(CENRITDoc, CDocument)
|
END_MESSAGE_MAP()
|
|
|
// CENRITDoc ����/�Ҹ�
|
|
CENRITDoc::CENRITDoc()
|
{
|
// TODO: ��� ��ȸ�� ���� �ڵ带 �߰��մϴ�.
|
|
}
|
|
CENRITDoc::~CENRITDoc()
|
{
|
}
|
|
BOOL CENRITDoc::OnNewDocument()
|
{
|
if (!CDocument::OnNewDocument())
|
return FALSE;
|
|
// TODO: ��� ���ʱ�ȭ �ڵ带 �߰��մϴ�.
|
// SDI ������ �� ������ �ٽ� ����մϴ�.
|
|
return TRUE;
|
}
|
|
|
|
|
// CENRITDoc serialization
|
|
void CENRITDoc::Serialize(CArchive& ar)
|
{
|
if (ar.IsStoring())
|
{
|
// TODO: ��� ���� �ڵ带 �߰��մϴ�.
|
}
|
else
|
{
|
// TODO: ��� �ε� �ڵ带 �߰��մϴ�.
|
}
|
}
|
|
#ifdef SHARED_HANDLERS
|
|
// ����� ���� �����մϴ�.
|
void CENRITDoc::OnDrawThumbnail(CDC& dc, LPRECT lprcBounds)
|
{
|
// ������ ������ ������ �� �ڵ带 �����Ͻʽÿ�.
|
dc.FillSolidRect(lprcBounds, RGB(255, 255, 255));
|
|
CString strText = _T("TODO: implement thumbnail drawing here");
|
LOGFONT lf;
|
|
CFont* pDefaultGUIFont = CFont::FromHandle((HFONT) GetStockObject(DEFAULT_GUI_FONT));
|
pDefaultGUIFont->GetLogFont(&lf);
|
lf.lfHeight = 36;
|
|
CFont fontDraw;
|
fontDraw.CreateFontIndirect(&lf);
|
|
CFont* pOldFont = dc.SelectObject(&fontDraw);
|
dc.DrawText(strText, lprcBounds, DT_CENTER | DT_WORDBREAK);
|
dc.SelectObject(pOldFont);
|
}
|
|
// �˻� ó���⸦ �����մϴ�.
|
void CENRITDoc::InitializeSearchContent()
|
{
|
CString strSearchContent;
|
// ������ �����Ϳ��� �˻� �������� �����մϴ�.
|
// ������ �κ��� ";"�� ���еǾ�� �մϴ�.
|
|
// ��: strSearchContent = _T("point;rectangle;circle;ole object;");
|
SetSearchContent(strSearchContent);
|
}
|
|
void CENRITDoc::SetSearchContent(const CString& value)
|
{
|
if (value.IsEmpty())
|
{
|
RemoveChunk(PKEY_Search_Contents.fmtid, PKEY_Search_Contents.pid);
|
}
|
else
|
{
|
CMFCFilterChunkValueImpl *pChunk = NULL;
|
ATLTRY(pChunk = new CMFCFilterChunkValueImpl);
|
if (pChunk != NULL)
|
{
|
pChunk->SetTextValue(PKEY_Search_Contents, value, CHUNK_TEXT);
|
SetChunkValue(pChunk);
|
}
|
}
|
}
|
|
#endif // SHARED_HANDLERS
|
|
// CENRITDoc ����
|
|
#ifdef _DEBUG
|
void CENRITDoc::AssertValid() const
|
{
|
CDocument::AssertValid();
|
}
|
|
void CENRITDoc::Dump(CDumpContext& dc) const
|
{
|
CDocument::Dump(dc);
|
}
|
#endif //_DEBUG
|
|
|
// CENRITDoc ���
|