fast-yolo4/fast/FastMainDoc.cpp

138 lines
2.4 KiB
C++
Raw Permalink Normal View History

2024-09-25 09:43:03 +08:00
// MFCApplication6Doc.cpp : CFastMainDoc <20><><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>
//
#include "stdafx.h"
// SHARED_HANDLERS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɸѡ<C9B8><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// ATL <20><>Ŀ<EFBFBD>н<EFBFBD><D0BD>ж<EFBFBD><D0B6><EFBFBD><E5A3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD>
#ifndef SHARED_HANDLERS
#include "Fast.h"
#endif
#include "FastMainDoc.h"
#include <propkey.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CFastMainDoc
IMPLEMENT_DYNCREATE(CFastMainDoc, CDocument)
BEGIN_MESSAGE_MAP(CFastMainDoc, CDocument)
END_MESSAGE_MAP()
// CFastMainDoc <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>
CFastMainDoc::CFastMainDoc()
{
// TODO: <20>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>Թ<EFBFBD><D4B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
}
CFastMainDoc::~CFastMainDoc()
{
}
BOOL CFastMainDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
// TODO: <20>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>³<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// (SDI <20>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ø<EFBFBD><C3B8>ĵ<EFBFBD>)
return TRUE;
}
// CFastMainDoc <20><><EFBFBD>л<EFBFBD>
void CFastMainDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
// TODO: <20>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD>Ӵ洢<D3B4><E6B4A2><EFBFBD><EFBFBD>
}
else
{
// TODO: <20>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD>Ӽ<EFBFBD><D3BC>ش<EFBFBD><D8B4><EFBFBD>
}
}
#ifdef SHARED_HANDLERS
// <20><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>֧<EFBFBD><D6A7>
void CFastMainDoc::OnDrawThumbnail(CDC& dc, LPRECT lprcBounds)
{
// <20>޸Ĵ˴<C4B4><CBB4><EFBFBD><EFBFBD>Ի<EFBFBD><D4BB><EFBFBD><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>
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);
}
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>
void CFastMainDoc::InitializeSearchContent()
{
CString strSearchContent;
// <20><><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݡ<EFBFBD>
// <20><><EFBFBD>ݲ<EFBFBD><DDB2><EFBFBD>Ӧ<EFBFBD>ɡ<EFBFBD>;<3B><><EFBFBD>ָ<EFBFBD>
// <20><><EFBFBD><EFBFBD>: strSearchContent = _T("point;rectangle;circle;ole object;")<29><>
SetSearchContent(strSearchContent);
}
void CFastMainDoc::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
// CFastMainDoc <20><><EFBFBD><EFBFBD>
#ifdef _DEBUG
void CFastMainDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CFastMainDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
// CFastMainDoc <20><><EFBFBD><EFBFBD>