⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getpwd.cpp

📁 运行debug下的cisoca.exe即可。 由于在vc6.0下开发的
💻 CPP
字号:
// GetPwd.cpp : implementation file
//

#include "stdafx.h"
#include "CisoCA.h"
#include "GetPwd.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CGetPwd dialog


CGetPwd::CGetPwd(CWnd* pParent /*=NULL*/)
	: CDialog(CGetPwd::IDD, pParent)
{
	//{{AFX_DATA_INIT(CGetPwd)
	m_pwd = _T("");
	//}}AFX_DATA_INIT
	strTip = "请输入密码";
}


void CGetPwd::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CGetPwd)
	DDX_Control(pDX, IDOK, m_ok);
	DDX_Control(pDX, IDCANCEL, m_cancel);
	DDX_Text(pDX, IDC_EDIT_PWD, m_pwd);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CGetPwd, CDialog)
	//{{AFX_MSG_MAP(CGetPwd)
	ON_WM_SHOWWINDOW()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CGetPwd message handlers

void CGetPwd::OnOK() 
{
	// TODO: Add extra validation here
	
	CDialog::OnOK();
}

void CGetPwd::OnCancel() 
{
	// TODO: Add extra cleanup here
	
	CDialog::OnCancel();
}

void CGetPwd::OnShowWindow(BOOL bShow, UINT nStatus) 
{
	CDialog::OnShowWindow(bShow, nStatus);
	
	// TODO: Add your message handler code here
	((CStatic*)GetDlgItem(IDC_STATIC_TIP))->SetWindowText(strTip);
	((CEdit*)GetDlgItem(IDC_EDIT_PWD))->SetFocus();
}

BOOL CGetPwd::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	//设置按钮样式

	CString str = "确定";
	m_ok.SetIcon(IDI_BUTTON_OK);
	m_ok.SetTooltipText(&str);
	m_ok.SetBtnCursor(IDC_HAND);
	m_ok.SetActiveFgColor(RGB(255, 255, 255));

	str = "取消";
	m_cancel.SetIcon(IDI_BUTTON_CANCEL);
	m_cancel.SetTooltipText(&str);
	m_cancel.SetBtnCursor(IDC_HAND);
	m_cancel.SetActiveFgColor(RGB(255, 255, 255));

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -