📄 mapxsampdoc.cpp
字号:
// mapxsampDoc.cpp : implementation of the CMapxSampleDoc class
//
/*
* This sample application and corresponding sample code is provided
* for example purposes only. It has not undergone rigorous testing
* and as such should not be shipped as part of a final application
* without extensive testing on the part of the organization releasing
* the end-user product.
*/
#include "stdafx.h"
#include "mapxsamp.h"
#include "mapxsampDoc.h"
#include "mapxsampView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMapxSampleDoc
IMPLEMENT_DYNCREATE(CMapxSampleDoc, CDocument)
BEGIN_MESSAGE_MAP(CMapxSampleDoc, CDocument)
//{{AFX_MSG_MAP(CMapxSampleDoc)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
BEGIN_DISPATCH_MAP(CMapxSampleDoc, CDocument)
//{{AFX_DISPATCH_MAP(CMapxSampleDoc)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_DISPATCH_MAP
END_DISPATCH_MAP()
// Note: we add support for IID_IMapxsa to support typesafe binding
// from VBA. This IID must match the GUID that is attached to the
// dispinterface in the .ODL file.
// {007BCAC2-0644-11D0-8796-00AA00B7EF73}
static const IID IID_IMapxsa =
{ 0x7bcac2, 0x644, 0x11d0, { 0x87, 0x96, 0x0, 0xaa, 0x0, 0xb7, 0xef, 0x73 } };
BEGIN_INTERFACE_MAP(CMapxSampleDoc, CDocument)
INTERFACE_PART(CMapxSampleDoc, IID_IMapxsa, Dispatch)
END_INTERFACE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMapxSampleDoc construction/destruction
CMapxSampleDoc::CMapxSampleDoc()
{
// TODO: add one-time construction code here
EnableAutomation();
AfxOleLockApp();
}
CMapxSampleDoc::~CMapxSampleDoc()
{
AfxOleUnlockApp();
}
BOOL CMapxSampleDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
return TRUE;
}
void CMapxSampleDoc::NotifyPaletteChanged(CWnd* pFocusWnd)
{
// For each View
POSITION pos = GetFirstViewPosition();
while (pos != NULL) {
CMapxSampleView* pView = (CMapxSampleView*)GetNextView(pos);
if (pView != NULL) {
pView->NotifyPaletteChanged(pFocusWnd);
}
}
}
/////////////////////////////////////////////////////////////////////////////
// CMapxSampleDoc serialization
void CMapxSampleDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
// TODO: add storing code here
}
else
{
// TODO: add loading code here
}
}
/////////////////////////////////////////////////////////////////////////////
// CMapxSampleDoc diagnostics
#ifdef _DEBUG
void CMapxSampleDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CMapxSampleDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CMapxSampleDoc commands
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -