⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mydefaultview.cpp

📁 一款国产的8051模拟器(全部源代码) 本软件是一款8051模拟器
💻 CPP
字号:
// MyDefaultView.cpp : implementation file
//

#include "stdafx.h"
#include "MDIDemo.h"
#include "MyDefaultView.h"
#include "UIRES.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// MyDefaultView

IMPLEMENT_DYNCREATE(MyDefaultView, CFormView)

MyDefaultView::MyDefaultView()
	: CFormView(MyDefaultView::IDD)
{
	//{{AFX_DATA_INIT(MyDefaultView)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	
}

MyDefaultView::~MyDefaultView()
{
}

void MyDefaultView::DoDataExchange(CDataExchange* pDX)
{
	CFormView::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(MyDefaultView)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(MyDefaultView, CFormView)
	//{{AFX_MSG_MAP(MyDefaultView)
	ON_WM_RBUTTONDOWN()
	ON_WM_CREATE()
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	ON_WM_DESTROY()
	//}}AFX_MSG_MAP
	ON_COMMAND_RANGE(IDC_Child_View1,IDC_Child_View9,OnWzdCommandRange)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// MyDefaultView diagnostics

#ifdef _DEBUG
void MyDefaultView::AssertValid() const
{
	CFormView::AssertValid();
}

void MyDefaultView::Dump(CDumpContext& dc) const
{
	CFormView::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// MyDefaultView message handlers
WndManager * WndMagpoint[256];
void MyDefaultView::OnRButtonDown(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default
	CPoint pt;
	GetCursorPos(&pt);
	RBDOWN.TrackPopupMenu(TPM_RIGHTBUTTON, pt.x, pt.y, this);
	CFormView::OnRButtonDown(nFlags, point);
}
void MyDefaultView::OnWzdCommandRange(UINT uid)
{
	WndMag.WndCommand(uid);

	//AfxMessageBox("deview");
}

int MyDefaultView::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CFormView::OnCreate(lpCreateStruct) == -1)
		return -1;
	this->GetParentFrame()->SetActiveView(this);//哈哈,这里真的好难实现,不好找的问题,创建时要他活动
	// TODO: Add your specialized creation code here
	WndMag.RBDOWN=&RBDOWN;
	WndMag.RBDCLK=&RBDCLK;
	WndMag.SetpView((UINT)this);
	WndMag.init();
	return 0;
}

void MyDefaultView::OnButton1() 
{
	AfxMessageBox("button1");// TODO: Add your control notification handler code here
	
}

void MyDefaultView::OnDestroy() 
{
	CFormView::OnDestroy();
	//AfxMessageBox("");
	if(WndMag.pdevicepan!=NULL)
	{
		WndMag.pdevicepan->SendMessage(WM_CLOSE,0,0);
	}
	// TODO: Add your message handler code here
	
}

⌨️ 快捷键说明

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