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

📄 mysecondview.cpp

📁 wince 下的MID窗口演示程序
💻 CPP
字号:
// MySecondView.cpp : implementation file
//
#include "stdafx.h"
#include "resource.h"
#include "MySecondView.h"
#include "MainFrm.h"
#include "SelViewDemoDoc.h"
#include "SelViewDemoView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMySecondView

IMPLEMENT_DYNCREATE(CMySecondView, CFormView)

CMySecondView::CMySecondView()
	: CFormView(CMySecondView::IDD)
{
	//{{AFX_DATA_INIT(CMySecondView)
	m_selection = -1;
	//}}AFX_DATA_INIT
}

CMySecondView::~CMySecondView()
{
}

void CMySecondView::DoDataExchange(CDataExchange* pDX)
{
	CFormView::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CMySecondView)
	DDX_Radio(pDX, IDC_RADIO1, m_selection);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CMySecondView, CFormView)
	//{{AFX_MSG_MAP(CMySecondView)
	ON_BN_CLICKED(IDOK, OnNextView)
	ON_BN_CLICKED(IDCANCEL, OnPreviousView)
	ON_WM_SIZE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMySecondView diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CMySecondView message handlers


void CMySecondView::OnNextView() 
{
	// TODO: Add your control notification handler code here
	
}

void CMySecondView::OnPreviousView() 
{
 	UpdateData();
 	CMainFrame* pMFrame = (CMainFrame*)GetParentFrame();
 	pMFrame->OnSelectPrevView(m_selection == 0 ? AIT_HIDE_WINDOW : AIT_DESTROY_WINDOW);
	
}

void CMySecondView::OnSize(UINT nType, int cx, int cy) 
{
	CFormView::OnSize(nType, cx, cy);
	
	SCROLLINFO si;
	memset(&si, 0, sizeof(si));
	si.cbSize	= sizeof(si);
	si.fMask	= SIF_ALL;
	si.nMin 	= 0;
	si.nMax 	= 100;
	si.nPos 	= 0;
	si.nPage	= 200;
	SetScrollInfo(SB_VERT, &si, FALSE);
	SetScrollInfo(SB_HORZ, &si, FALSE);
	
}

⌨️ 快捷键说明

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