📄 dldlg.cpp
字号:
// dldlg.cpp : implementation file
//
#include "stdafx.h"
#include "HKGL.h"
#include "dldlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// Cdldlg dialog
CString Cdldlg::m_quanxian="0";
Cdldlg::Cdldlg(CWnd* pParent /*=NULL*/)
: CDialog(Cdldlg::IDD, pParent)
{
//{{AFX_DATA_INIT(Cdldlg)
m_name = _T("");
m_mima = _T("");
//}}AFX_DATA_INIT
}
void Cdldlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(Cdldlg)
DDX_Text(pDX, IDC_EDIT1, m_name);
DDX_Text(pDX, IDC_EDIT2, m_mima);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(Cdldlg, CDialog)
//{{AFX_MSG_MAP(Cdldlg)
ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
ON_WM_CTLCOLOR()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Cdldlg message handlers
BOOL Cdldlg::OnInitDialog()
{
CDialog::OnInitDialog();
Cdenglu_Recordset m_dl(&theApp.m_DB );
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void Cdldlg::OnButton2()
{
UpdateData(TRUE);
if(m_dl.IsOpen())m_dl.Close();
m_dl.Open();
m_dl.m_strFilter.Format("[name]='"+m_name+"' and [password]='"+m_mima+"'");
m_dl.Requery();
if(m_dl.IsEOF())
{
m_dl.Close();
MessageBox("密码错误!");
return ;
}
else
{
Cdldlg::m_quanxian=m_dl.m_quanxian ;
EndDialog(1);
}
if(m_dl.IsOpen())m_dl.Close();
// UpdateData(FALSE);
}
void Cdldlg::OnCancel()
{
CDialog::OnCancel();
}
HBRUSH Cdldlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// if (nCtlColor==CTLCOLOR_EDIT )
// pDC->SetTextColor(RGB(0,255,255));
// pDC->SetBkColor(RGB(0,0,120));
// TODO: Return a different brush if the default is not desired
return hbr;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -