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

📄 cabaseinfodlg.cpp

📁 可以实现一个简单的CA发放证书更新证书等等功能。
💻 CPP
字号:
// CABaseInfoDlg.cpp : implementation file
//

#include "stdafx.h"
#include "CisoCA.h"
#include "CABaseInfoDlg.h"
#include "CAInitSheet.h"

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

extern  CInfoReport InfoReport;
extern  DWORD dwMoudleID;

/////////////////////////////////////////////////////////////////////////////
// CCABaseInfoDlg dialog
IMPLEMENT_DYNCREATE(CCABaseInfoDlg, CPropertyPage)

CCABaseInfoDlg::CCABaseInfoDlg(CWnd* pParent /*=NULL*/)
: CPropertyPage(CCABaseInfoDlg::IDD)
{
	//{{AFX_DATA_INIT(CCABaseInfoDlg)
	m_CAName = _T("");
	m_CADept = _T("");
	m_CAOrg = _T("");
	m_CACity = _T("");
	m_CAProv = _T("");
	m_CACountry = _T("");
	//}}AFX_DATA_INIT
	pSheet = (CPropertySheet*)pParent;
}


void CCABaseInfoDlg::DoDataExchange(CDataExchange* pDX)
{
	CPropertyPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CCABaseInfoDlg)
	DDX_Text(pDX, IDC_CA_NAME, m_CAName);
	DDX_Text(pDX, IDC_CA_DEPT, m_CADept);
	DDX_Text(pDX, IDC_CA_ORG, m_CAOrg);
	DDX_Text(pDX, IDC_CA_CITY, m_CACity);
	DDX_Text(pDX, IDC_CA_PROV, m_CAProv);
	DDX_Text(pDX, IDC_CA_CN, m_CACountry);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CCABaseInfoDlg, CPropertyPage)
	//{{AFX_MSG_MAP(CCABaseInfoDlg)
	ON_WM_SHOWWINDOW()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCABaseInfoDlg message handlers

BOOL CCABaseInfoDlg::OnCommand(WPARAM wParam, LPARAM lParam) 
{
	// TODO: Add your specialized code here and/or call the base class

	return CPropertyPage::OnCommand(wParam, lParam);
}

BOOL CCABaseInfoDlg::OnApply() 
{
	// TODO: Add your specialized code here and/or call the base class
	
	return CPropertyPage::OnApply();
}

void CCABaseInfoDlg::OnOK() 
{
	// TODO: Add your specialized code here and/or call the base class
	
	CPropertyPage::OnOK();
}

LRESULT CCABaseInfoDlg::OnWizardBack() 
{
	// TODO: Add your specialized code here and/or call the base class
	
	return CPropertyPage::OnWizardBack();
}

LRESULT CCABaseInfoDlg::OnWizardNext() 
{
	// TODO: Add your specialized code here and/or call the base class
	(GetDlgItem(IDC_CA_NAME))->GetWindowText(m_CAName);
	if(m_CAName=="")
	{
		::MessageBox(NULL,"CA名字不能为空!","系统提示",
			MB_OK|MB_ICONEXCLAMATION);
		return -1L;
	}
	(GetDlgItem(IDC_CA_DEPT))->GetWindowText(m_CADept);
	if(m_CADept=="")
	{
		::MessageBox(NULL,"部门字段不能为空!","系统提示",
			MB_OK|MB_ICONEXCLAMATION);
		return -1L;
	}
	(GetDlgItem(IDC_CA_ORG))->GetWindowText(m_CAOrg);
	if(m_CAOrg == "")
	{
		::MessageBox(NULL,"组织字段不能为空!","系统提示",
			MB_OK|MB_ICONEXCLAMATION);
		return -1L;
	}
	(GetDlgItem(IDC_CA_CITY))->GetWindowText(m_CACity);
	if(m_CACity.GetLength()<=0)
	{
		::MessageBox(NULL,"所在城市不能为空!","系统提示",
			MB_OK|MB_ICONEXCLAMATION);
		return -1L;
	}
	(GetDlgItem(IDC_CA_PROV))->GetWindowText(m_CAProv);
	if(m_CAProv.GetLength()<=0)
	{
		::MessageBox(NULL,"所在省份不能为空!","系统提示",
			MB_OK|MB_ICONEXCLAMATION);
		return -1L;
	}
	(GetDlgItem(IDC_CA_CN))->GetWindowText(m_CACountry);
	if(m_CACountry.GetLength()<=0)
	{
		::MessageBox(NULL,"国家名字不能为空!","系统提示",
			MB_OK|MB_ICONEXCLAMATION);
		return -1L;
	}
	return CPropertyPage::OnWizardNext();
}

BOOL CCABaseInfoDlg::OnWizardFinish() 
{
	// TODO: Add your specialized code here and/or call the base class
	
	return CPropertyPage::OnWizardFinish();
}

void CCABaseInfoDlg::OnReset() 
{
	// TODO: Add your specialized code here and/or call the base class
	
	CPropertyPage::OnReset();
}

BOOL CCABaseInfoDlg::OnSetActive() 
{
	// TODO: Add your specialized code here and/or call the base class
	((CCAInitSheet*)pSheet)->SetWizardButtons(PSWIZB_NEXT);
	return CPropertyPage::OnSetActive();
}

void CCABaseInfoDlg::OnShowWindow(BOOL bShow, UINT nStatus) 
{
	CPropertyPage::OnShowWindow(bShow, nStatus);
	
	// TODO: Add your message handler code here
	(GetDlgItem(IDC_CA_CN))->SetWindowText("cn");
}

⌨️ 快捷键说明

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