【VC开源代码栏目提醒】:以下是网学会员为您推荐的VC开源代码-ConnectDB.cpp,希望本篇文章对您学习有所帮助。
// ConnectDB.cpp : implementation file
//
#include "stdafx.h"
#include "songserver.h"
#include "ConnectDB.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CConnectDB dialog
CConnectDB::CConnectDB(CWnd* pParent /*=NULL*/)
: CDialog(CConnectDB::IDD, pParent)
{
//{{AFX_DATA_INIT(CConnectDB)
m_serverip = _T("127.0.0.1");
m_username = _T("sa");
m_password = _T("");
m_dbname = _T("song");
//}}AFX_DATA_INIT
}
void CConnectDB::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CConnectDB)
DDX_Text(pDX, IDC_Password, m_password);
DDX_Text(pDX, IDC_Username, m_username);
DDX_Text(pDX, IDC_ServerIP, m_serverip);
DDX_Text(pDX, IDC_DBname, m_dbname);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CConnectDB, CDialog)
//{{AFX_MSG_MAP(CConnectDB)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CConnectDB message handlers
void CConnectDB::OnOK()
{
UpdateData();
CDialog::OnOK();
}
CString CConnectDB::GetServerIP()
{
return m_serverip;
}
CString CConnectDB::GetDBName()
{
return m_dbname;
}
CString CConnectDB::GetUsername()
{
return m_username;
}
CString CConnectDB::GetPassword()
{
return m_password;
}
上一篇:
CongraduationDlg.cpp
下一篇:
法律专业开题报告范文