ompassdlg.cpp
来自「VC++一些代码,自己制作,可以实现密码登录,有画圆等功能.」· C++ 代码 · 共 82 行
CPP
82 行
// ompassDlg.cpp : implementation file
//
#include "stdafx.h"
#include "RJ030619.h"
#include "ompassDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CompassDlg dialog
CompassDlg::CompassDlg(CWnd* pParent /*=NULL*/)
: CDialog(CompassDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CompassDlg)
m_strUserName = _T("");
m_strPassWord = _T("");
m_strShowpass = _T("");
//}}AFX_DATA_INIT
}
void CompassDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CompassDlg)
DDX_Control(pDX, IDC_CHECK_show, m_ButtonCheck);
DDX_Text(pDX, IDC_EDIT_name, m_strUserName);
DDX_Text(pDX, IDC_EDIT_pass, m_strPassWord);
DDX_Text(pDX, IDC_EDIT_showpass, m_strShowpass);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CompassDlg, CDialog)
//{{AFX_MSG_MAP(CompassDlg)
ON_BN_CLICKED(IDC_CHECK_show, OnCHECKshow)
ON_EN_CHANGE(IDC_EDIT_pass, OnChangeEDITpass)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CompassDlg message handlers
void CompassDlg::OnCHECKshow()
{
// TODO: Add your control notification handler code here
if(m_ButtonCheck.GetCheck())
{
UpdateData();
m_strShowpass=m_strPassWord;
UpdateData(FALSE);
}
else
{
m_strShowpass=" ";
UpdateData(FALSE);
}
}
void CompassDlg::OnChangeEDITpass()
{
// 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.
if(m_ButtonCheck.GetCheck())
{
UpdateData();
m_strShowpass=m_strPassWord;
UpdateData(FALSE);
}
// TODO: Add your control notification handler code here
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?