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

📄 multiviewsview.cpp

📁 WinCE开发技巧与实例的配套源码
💻 CPP
字号:
// multiviewsView.cpp : implementation of the CMultiviewsView class
//

#include "stdafx.h"
#include "multiviews.h"
#include "MainFrm.h"
#include "multiviewsDoc.h"
#include "multiviewsView.h"

#include "View3.h"
#include "View2.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMultiviewsView

IMPLEMENT_DYNCREATE(CMultiviewsView, CFormView)

BEGIN_MESSAGE_MAP(CMultiviewsView, CFormView)
	//{{AFX_MSG_MAP(CMultiviewsView)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMultiviewsView construction/destruction

CMultiviewsView::CMultiviewsView()
	: CFormView(CMultiviewsView::IDD)
{
	//{{AFX_DATA_INIT(CMultiviewsView)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	// TODO: add construction code here

}

CMultiviewsView::~CMultiviewsView()
{
}

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

BOOL CMultiviewsView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CFormView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CMultiviewsView diagnostics

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

void CMultiviewsView::Dump(CDumpContext& dc) const
{
	CFormView::Dump(dc);
}

CMultiviewsDoc* CMultiviewsView::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMultiviewsDoc)));
	return (CMultiviewsDoc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CMultiviewsView message handlers

void CMultiviewsView::OnButton1() 
{
	::PostMessage(AfxGetMainWnd()->m_hWnd,WM_USER_COMMAND, CMainFrame.View2, 0);	
	
}

void CMultiviewsView::OnButton2() 
{
	::PostMessage(AfxGetMainWnd()->m_hWnd,WM_USER_COMMAND, CMainFrame.View3, 0);	
}

⌨️ 快捷键说明

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