cuserview.cpp

来自「这是一个程序的一般架构方法」· C++ 代码 · 共 56 行

CPP
56
字号
//-- {CycleCode: 194} file [0..213]
//-- {AddDecl: 195} module.includes preserve=yes [0..110]
//## begin module.includes preserve=yes
// Copyright (C) 1991 - 1999 Rational Software Corporation

#include "stdafx.h"


//## end module.includes preserve=yes
//-- {StartSubRegion: 196} region.inlineAnnotation [111..213]
BEGIN_MESSAGE_MAP(CUserView, CWnd)
	//{{AFX_MSG_MAP(CUserView)
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP() 

//系统内部的消息映射
USER_BEGIN_MESSAGE_MAP(CUserView)

USER_END_MESSAGE_MAP

void CUserView::CreateWnd(CWnd *pParent, DWORD dwStyle, DWORD ExStyle)
{
	CreateEx ( ExStyle , "CUserView" , "FW-Map" , dwStyle 
		, 0,0,0,0,pParent->m_hWnd,NULL);
}

void CUserView::init( CElementManager * pElementManager \
		  , CCMDManager * pCMDManager \
		  , CMessageManager * pMessageManager \
		  )
{
	m_pElementManager = pElementManager;
	m_pCMDManager = pCMDManager;
	m_pMessageManager = pMessageManager;
	if (m_pCMDManager)
	{
		m_pCMDManager->AddCmdOperation(VIEW_REDRAW , e_ViewCMD);
		m_pCMDManager->AddCmdOperation(VIEW_OUT , e_ViewCMD);
		m_pCMDManager->AddCmdOperation(VIEW_IN , e_ViewCMD);
		m_pCMDManager->AddCmdOperation(VIEW_WINDOW , e_ViewCMD);
		m_pCMDManager->AddCmdOperation(VIEW_FIT , e_ViewCMD);
		m_pCMDManager->AddCmdOperation(VIEW_UNDO , e_OnceCMD);
		m_pCMDManager->AddCmdOperation(VIEW_REDO , e_OnceCMD);
	}
}

void CUserView::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
//	for( int i = m_pElementManager->)
	// TODO: Add your message handler code here
	
	// Do not call CWnd::OnPaint() for painting messages
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?