Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
InputPwd.cpp
Package: Visual C++视频音频开发实用工程案例精选.rar [view]
Upload User: tuheem
Upload Date: 2007-05-01
Package Size: 21889k
Code Size: 2k
Category:
Multimedia Develop
Development Platform:
Visual C++
- // InputPwd.cpp : implementation file
- //
- #include "stdafx.h"
- #include "play.h"
- #include "InputPwd.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CInputPwd dialog
- CInputPwd::CInputPwd(CWnd* pParent /*=NULL*/)
- : CDialog(CInputPwd::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CInputPwd)
- m_Passwd = _T("");
- //}}AFX_DATA_INIT
- m_count=0;
- }
- void CInputPwd::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CInputPwd)
- DDX_Text(pDX, IDC_INPUTPWD, m_Passwd);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CInputPwd, CDialog)
- //{{AFX_MSG_MAP(CInputPwd)
- ON_BN_CLICKED(IDC_MODIFYPWD, OnModifypwd)
- ON_BN_CLICKED(IDC_SURE, OnSure)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CInputPwd message handlers
- void CInputPwd::OnModifypwd()
- {
- // TODO: Add your control notification handler code here
- CDialog::OnCancel();
- m_Modify=TRUE;
- }
- BOOL CInputPwd::OnInitDialog()
- {
- CDialog::OnInitDialog();
- // TODO: Add extra initialization here
- CWnd* pWnd=GetDlgItem(IDC_INPUTPWD);
- pWnd->SetFocus();
- return FALSE;
- }
- void CInputPwd::OnSure()
- {
- // TODO: Add your control notification handler code here
- m_count++;
- UpdateData(TRUE);
- if((strcmp(m_Passwd,dw_Passwd))!=0 &&m_count<2)
- {
- MessageBox("密码不对,请再输入一遍");
- CWnd* pWnd=GetDlgItem(IDC_INPUTPWD);
- pWnd->SetWindowText("");
- pWnd->SetFocus();
- }
- if((strcmp(m_Passwd,dw_Passwd))!=0&&m_count==2)
- {
- fail=TRUE;
- CDialog::OnCancel();
- }
- if((strcmp(m_Passwd,dw_Passwd))==0)
- CDialog::OnCancel();
- }
- void CInputPwd::OnCancel()
- {
- // TODO: Add extra cleanup here
- fail=TRUE;
- CDialog::OnCancel();
- }