|
// EdgeInspector_AppDoc.cpp : CEdgeInspector_AppDoc Ŭ·¡½ºÀÇ ±¸Çö
|
//
|
|
#include "stdafx.h"
|
// SHARED_HANDLERS´Â ¹Ì¸® º¸±â, Ãà¼ÒÆÇ ±×¸² ¹× °Ë»ö ÇÊÅÍ Ã³¸®±â¸¦ ±¸ÇöÇÏ´Â ATL ÇÁ·ÎÁ§Æ®¿¡¼ Á¤ÀÇÇÒ ¼ö ÀÖÀ¸¸ç
|
// ÇØ´ç ÇÁ·ÎÁ§Æ®¿Í ¹®¼ Äڵ带 °øÀ¯Çϵµ·Ï ÇØ ÁÝ´Ï´Ù.
|
#ifndef SHARED_HANDLERS
|
#include "EdgeInspector_App.h"
|
#endif
|
|
#include "EdgeInspector_AppDoc.h"
|
|
#include <propkey.h>
|
|
#ifdef _DEBUG
|
#define new DEBUG_NEW
|
#endif
|
|
// CEdgeInspector_AppDoc
|
|
IMPLEMENT_DYNCREATE(CEdgeInspector_AppDoc, CDocument)
|
|
BEGIN_MESSAGE_MAP(CEdgeInspector_AppDoc, CDocument)
|
END_MESSAGE_MAP()
|
|
|
// CEdgeInspector_AppDoc »ý¼º/¼Ò¸ê
|
|
CEdgeInspector_AppDoc::CEdgeInspector_AppDoc()
|
{
|
// TODO: ¿©±â¿¡ ÀÏȸ¼º »ý¼º Äڵ带 Ãß°¡ÇÕ´Ï´Ù.
|
|
}
|
|
CEdgeInspector_AppDoc::~CEdgeInspector_AppDoc()
|
{
|
}
|
|
BOOL CEdgeInspector_AppDoc::OnNewDocument()
|
{
|
if (!CDocument::OnNewDocument())
|
return FALSE;
|
|
// TODO: ¿©±â¿¡ ÀçÃʱâÈ Äڵ带 Ãß°¡ÇÕ´Ï´Ù.
|
// SDI ¹®¼´Â ÀÌ ¹®¼¸¦ ´Ù½Ã »ç¿ëÇÕ´Ï´Ù.
|
|
return TRUE;
|
}
|
|
|
|
|
// CEdgeInspector_AppDoc serialization
|
|
void CEdgeInspector_AppDoc::Serialize(CArchive& ar)
|
{
|
if (ar.IsStoring())
|
{
|
// TODO: ¿©±â¿¡ ÀúÀå Äڵ带 Ãß°¡ÇÕ´Ï´Ù.
|
}
|
else
|
{
|
// TODO: ¿©±â¿¡ ·Îµù Äڵ带 Ãß°¡ÇÕ´Ï´Ù.
|
}
|
}
|
|
#ifdef SHARED_HANDLERS
|
|
// Ãà¼ÒÆÇ ±×¸²À» Áö¿øÇÕ´Ï´Ù.
|
void CEdgeInspector_AppDoc::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 CEdgeInspector_AppDoc::InitializeSearchContent()
|
{
|
CString strSearchContent;
|
// ¹®¼ÀÇ µ¥ÀÌÅÍ¿¡¼ °Ë»ö ÄÜÅÙÃ÷¸¦ ¼³Á¤ÇÕ´Ï´Ù.
|
// ÄÜÅÙÃ÷ ºÎºÐÀº ";"·Î ±¸ºÐµÇ¾î¾ß ÇÕ´Ï´Ù.
|
|
// ¿¹: strSearchContent = _T("point;rectangle;circle;ole object;");
|
SetSearchContent(strSearchContent);
|
}
|
|
void CEdgeInspector_AppDoc::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
|
|
// CEdgeInspector_AppDoc Áø´Ü
|
|
#ifdef _DEBUG
|
void CEdgeInspector_AppDoc::AssertValid() const
|
{
|
CDocument::AssertValid();
|
}
|
|
void CEdgeInspector_AppDoc::Dump(CDumpContext& dc) const
|
{
|
CDocument::Dump(dc);
|
}
|
#endif //_DEBUG
|
|
|
// CEdgeInspector_AppDoc ¸í·É
|