?? wndseparateview.cpp
字號:
// WndSeparateView.cpp : implementation of the CWndSeparateView class
//
#include "stdafx.h"
#include "WndSeparate.h"
#include "WndSeparateDoc.h"
#include "WndSeparateView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CWndSeparateView
IMPLEMENT_DYNCREATE(CWndSeparateView, CView)
BEGIN_MESSAGE_MAP(CWndSeparateView, CView)
//{{AFX_MSG_MAP(CWndSeparateView)
ON_WM_CREATE()
ON_WM_SIZE()
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CWndSeparateView construction/destruction
CWndSeparateView::CWndSeparateView()
{
// TODO: add construction code here
}
CWndSeparateView::~CWndSeparateView()
{
}
BOOL CWndSeparateView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CWndSeparateView drawing
void CWndSeparateView::OnDraw(CDC* pDC)
{
CWndSeparateDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CWndSeparateView printing
BOOL CWndSeparateView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CWndSeparateView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CWndSeparateView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CWndSeparateView diagnostics
#ifdef _DEBUG
void CWndSeparateView::AssertValid() const
{
CView::AssertValid();
}
void CWndSeparateView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CWndSeparateDoc* CWndSeparateView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CWndSeparateDoc)));
return (CWndSeparateDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CWndSeparateView message handlers
int CWndSeparateView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CView::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
m_SplitterWnd.CreateStatic(this,1,2);
m_SplitterWnd.CreateView(0,0,RUNTIME_CLASS(CTOCVIEW),CSize(200,0),NULL);
m_SplitterWnd.CreateView(0,1,RUNTIME_CLASS(CMAPVIEW),CSize(0,0),NULL);
return 0;
}
void CWndSeparateView::OnSize(UINT nType, int cx, int cy)
{
CView::OnSize(nType, cx, cy);
// TODO: Add your message handler code here
m_SplitterWnd.MoveWindow(CRect(0,0,cx,cy));
}
void CWndSeparateView::OnInitialUpdate()
{
CView::OnInitialUpdate();
// TODO: Add your specialized code here and/or call the base class
CTOCVIEW * pTOC=(CTOCVIEW *)m_SplitterWnd.GetPane(0,0);
CMAPVIEW * pMAP=(CMAPVIEW *)m_SplitterWnd.GetPane(0,1);
pTOC->m_TOCControl.SetBuddyControl(pMAP->m_MapControl.GetObject());
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -