connectinfo.cpp
来自「实现ADO连接SQL SERVER 2000数据库」· C++ 代码 · 共 71 行
CPP
71 行
// ConnectInfo.cpp : implementation file
//
#include "stdafx.h"
#include "ADO.h"
#include "ConnectInfo.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CConnectInfo dialog
CConnectInfo::CConnectInfo(CWnd* pParent /*=NULL*/)
: CDialog(CConnectInfo::IDD, pParent)
{
//{{AFX_DATA_INIT(CConnectInfo)
m_server = _T("");
m_uid = _T("");
m_pwd = _T("");
m_database = _T("");
//}}AFX_DATA_INIT
}
void CConnectInfo::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CConnectInfo)
DDX_Text(pDX, IDC_EDIT1, m_server);
DDX_Text(pDX, IDC_EDIT2, m_uid);
DDX_Text(pDX, IDC_EDIT3, m_pwd);
DDX_Text(pDX, IDC_EDIT4, m_database);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CConnectInfo, CDialog)
//{{AFX_MSG_MAP(CConnectInfo)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CConnectInfo message handlers
void CConnectInfo::OnOK()
{
// TODO: Add extra validation here
m_server="";
m_uid ="";
m_pwd ="";
m_database="";
CDialog::OnOK();
}
BOOL CConnectInfo::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?