www.pudn.com > aes_encrypt.rar > MyDlg.cpp


// MyDlg.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "AES.h" 
#include "MyDlg.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CMyDlg dialog 
 
 
CMyDlg::CMyDlg(CWnd* pParent /*=NULL*/) 
	: CDialog(CMyDlg::IDD, pParent) 
{ 
	//{{AFX_DATA_INIT(CMyDlg) 
	m_str1 = _T(""); 
	m_str2 = _T(""); 
	m_bIsUseMask = FALSE; 
	//}}AFX_DATA_INIT 
} 
 
 
void CMyDlg::DoDataExchange(CDataExchange* pDX) 
{ 
	CDialog::DoDataExchange(pDX); 
	//{{AFX_DATA_MAP(CMyDlg) 
	DDX_Control(pDX, IDC_EDIT2, m_ctrKey1); 
	DDX_Control(pDX, IDC_EDIT1, m_ctrKey); 
	DDX_Text(pDX, IDC_EDIT1, m_str1); 
	DDX_Text(pDX, IDC_EDIT2, m_str2); 
	DDX_Check(pDX, IDC_CHECK1, m_bIsUseMask); 
	//}}AFX_DATA_MAP 
} 
 
 
BEGIN_MESSAGE_MAP(CMyDlg, CDialog) 
	//{{AFX_MSG_MAP(CMyDlg) 
	ON_BN_CLICKED(IDC_CHECK1, OnCheck1) 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CMyDlg message handlers 
 
void CMyDlg::OnCheck1()  
{ 
	// TODO: Add your control notification handler code here 
	UpdateData(); 
	 
	if (!m_bIsUseMask) { 
		this->m_ctrKey.SetPasswordChar('*'); 
		this->m_ctrKey1.SetPasswordChar('*'); 
	} else { 
		this->m_ctrKey.SetPasswordChar(NULL); 
		this->m_ctrKey1.SetPasswordChar(NULL); 
	} 
	m_bIsUseMask=false; 
	this->Invalidate(); 
	 
}