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

📄 modal_dialog_baseview.cpp

📁 关于使用VC编程的代码
💻 CPP
字号:
// modal_dialog_baseView.cpp : implementation of the CModal_dialog_baseView class
//

#include "stdafx.h"
#include "modal_dialog_base.h"

#include "modal_dialog_baseDoc.h"
#include "modal_dialog_baseView.h"

#include "InputDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CModal_dialog_baseView

IMPLEMENT_DYNCREATE(CModal_dialog_baseView, CView)

BEGIN_MESSAGE_MAP(CModal_dialog_baseView, CView)
	//{{AFX_MSG_MAP(CModal_dialog_baseView)
	ON_WM_LBUTTONDBLCLK()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CModal_dialog_baseView construction/destruction

CModal_dialog_baseView::CModal_dialog_baseView()
{
	// TODO: add construction code here

}

CModal_dialog_baseView::~CModal_dialog_baseView()
{
}

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

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CModal_dialog_baseView drawing

void CModal_dialog_baseView::OnDraw(CDC* pDC)
{
	CModal_dialog_baseDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	// TODO: add draw code for native data here
}

/////////////////////////////////////////////////////////////////////////////
// CModal_dialog_baseView diagnostics

#ifdef _DEBUG
void CModal_dialog_baseView::AssertValid() const
{
	CView::AssertValid();
}

void CModal_dialog_baseView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}

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

/////////////////////////////////////////////////////////////////////////////
// CModal_dialog_baseView message handlers

void CModal_dialog_baseView::OnLButtonDblClk(UINT nFlags, CPoint point) 
{
	CInputDlg dlg;
	if( dlg.DoModal() == IDOK )
	{
		CString strName,strAge,strSex,strBook,strSwim,strNetwork;
		strName = "Your Name is: " + dlg.m_strName;
		strAge.Format("Your Age is: %d", dlg.m_nAge);
		if( dlg.m_nSex == 0 )
		{
			strSex = "Your Sex is Male";
		}
		else
		{
			strSex = "Your Sex is Female";
		}
		if( dlg.m_bBook == TRUE )
		{
			strBook = "You like book";
		}
		if( dlg.m_bSwim == TRUE )
		{
			strSwim = "You like swimming";
		}
		if( dlg.m_bNetWork == TRUE )
		{
			strNetwork = "You like network";
		}
		AfxMessageBox( strName + "\n" + strAge + "\n" + strSex + "\n" + strBook + "\n" + strSwim + "\n" + strNetwork + "\n" );
	}
	
	CView::OnLButtonDblClk(nFlags, point);
}

⌨️ 快捷键说明

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