www.pudn.com > GMAIL.rar > SetConn.cpp
// SetConn.cpp : implementation file
//
#include "stdafx.h"
#include "GMAIL.h"
#include "SetConn.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSetConnection dialog
CSetConnection::CSetConnection(CWnd* pParent /*=NULL*/)
: CDialog(CSetConnection::IDD, pParent)
{
//{{AFX_DATA_INIT(CSetConnection)
m_Conn = _T("Driver={sql server};server=servername;database=dbname;uid=sa;pwd=pass;");
//}}AFX_DATA_INIT
}
void CSetConnection::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSetConnection)
DDX_Text(pDX, IDC_EDITCONN, m_Conn);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSetConnection, CDialog)
//{{AFX_MSG_MAP(CSetConnection)
ON_BN_CLICKED(IDC_BUTTONSETCONN, OnButtonsetconn)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSetConnection message handlers
void CSetConnection::OnButtonsetconn()
{
// TODO: Add your control notification handler code here
UpdateData();
MessageBox(m_Conn);
}