getname.cpp
来自「这是一个小数据库图书管理系统对初学者有帮助参考一个吧」· C++ 代码 · 共 63 行
CPP
63 行
// Getname.cpp : implementation file
//
#include "stdafx.h"
#include "DBBooks.h"
#include "Getname.h"
//#include "DBBooksView.h"
//#include "DBBooksDoc.h"
//#include "DBBooksset.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// Getname dialog
Getname::Getname(CWnd* pParent /*=NULL*/)
: CDialog(Getname::IDD, pParent)
{
//{{AFX_DATA_INIT(Getname)
m_name = _T("");
//}}AFX_DATA_INIT
}
void Getname::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(Getname)
DDX_Text(pDX, IDC_EDSNAME, m_name);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(Getname, CDialog)
//{{AFX_MSG_MAP(Getname)
ON_BN_CLICKED(IDC_BTSOK, OnBtsok)
ON_BN_CLICKED(IDC_BTSCANCEL, OnBtscancel)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Getname message handlers
void Getname::OnBtsok()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE); //把各控件的值映射到其对应的变量中
m_name.TrimLeft();m_name.TrimRight();
if(m_name=="") MessageBox("必须输入书名!","提示",MB_OK+MB_ICONEXCLAMATION);
else OnOK();
}
void Getname::OnBtscancel()
{
// TODO: Add your control notification handler code here
OnCancel();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?