productdlg.cpp
来自「一个很好的VC++ 用ODBC编的」· C++ 代码 · 共 72 行
CPP
72 行
// ProductDlg.cpp : implementation file
//
#include "stdafx.h"
#include "ODBCDemo2.h"
#include "ProductDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CProductDlg dialog
CProductDlg::CProductDlg(CWnd* pParent /*=NULL*/)
: CDialog(CProductDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CProductDlg)
m_strProductID = _T("");
m_strProductCode = _T("");
m_strProductName = _T("");
m_strProductPrice = _T("");
m_strProductType = _T("");
m_strProductDate = _T("");
m_strProductDesc = _T("");
//}}AFX_DATA_INIT
}
void CProductDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CProductDlg)
DDX_Text(pDX, IDC_PRODUCT_ID, m_strProductID);
DDX_Text(pDX, IDC_PRODUCT_CODE, m_strProductCode);
DDX_Text(pDX, IDC_PRODUCT_NAME, m_strProductName);
DDX_Text(pDX, IDC_PRODUCT_PRICE, m_strProductPrice);
DDX_Text(pDX, IDC_PRODUCT_TYPE, m_strProductType);
DDX_Text(pDX, IDC_PRODUCT_DATE, m_strProductDate);
DDX_Text(pDX, IDC_PRODUCT_DESC, m_strProductDesc);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CProductDlg, CDialog)
//{{AFX_MSG_MAP(CProductDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CProductDlg message handlers
BOOL CProductDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
GetDlgItem(IDC_PRODUCT_ID)->EnableWindow(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CProductDlg::OnOK()
{
// TODO: Add extra validation here
CDialog::OnOK();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?