📄 sessiondlg.cpp
字号:
// SessionDlg.cpp : implementation file
//
#include "stdafx.h"
#include "GasStation.h"
#include "SessionDlg.h"
#include "HelpDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSessionDlg dialog
CSessionDlg::CSessionDlg(CWnd* pParent /*=NULL*/)
: CDialog(CSessionDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CSessionDlg)
m_strDatabase = _T("GasStation");
m_strPassword = _T("");
m_strServer = _T("127.0.0.1");
m_strUsername = _T("sa");
//}}AFX_DATA_INIT
memset(m_lpDatabase, 0, 256);
memset(m_lpPassword, 0, 256);
memset(m_lpServer, 0, 256);
memset(m_lpUsername, 0, 256);
}
void CSessionDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSessionDlg)
DDX_Text(pDX, IDC_EDIT_DATABASE, m_strDatabase);
DDX_Text(pDX, IDC_EDIT_PASSWORD, m_strPassword);
DDX_Text(pDX, IDC_EDIT_SERVER, m_strServer);
DDX_Text(pDX, IDC_EDIT_USERNAME, m_strUsername);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSessionDlg, CDialog)
//{{AFX_MSG_MAP(CSessionDlg)
ON_EN_CHANGE(IDC_EDIT_DATABASE, OnChangeEditDatabase)
ON_BN_CLICKED(IDHELP, OnHelp)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSessionDlg message handlers
void CSessionDlg::OnOK()
{
// TODO: Add extra validation here
UpdateData();
GET_BUFFER(m_lpUsername, m_strUsername);
GET_BUFFER(m_lpPassword, m_strPassword);
GET_BUFFER(m_lpServer, m_strServer);
GET_BUFFER(m_lpDatabase, m_strDatabase);
CDialog::OnOK();
}
void CSessionDlg::OnHelp()
{
// TODO: Add your control notification handler code here
CHelpDlg help;
help.DoModal();
}
void CSessionDlg::OnChangeEditDatabase()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -