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

📄 odeframe.cpp

📁 DES加密程序
💻 CPP
字号:
// odeFrame.cpp : implementation file
//

#include "stdafx.h"
#include "DESEncrption.h"
#include "odeFrame.h"

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

/////////////////////////////////////////////////////////////////////////////
// CodeFrame dialog


CodeFrame::CodeFrame(CWnd* pParent /*=NULL*/)
	: CDialog(CodeFrame::IDD, pParent)
{
	//{{AFX_DATA_INIT(CodeFrame)
	m_codeWindow = _T("");
	//}}AFX_DATA_INIT
}


void CodeFrame::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CodeFrame)
	DDX_Text(pDX, codeWindow, m_codeWindow);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CodeFrame, CDialog)
	//{{AFX_MSG_MAP(CodeFrame)
	ON_BN_CLICKED(Button1, OnButton1)
	ON_BN_CLICKED(Button2, OnButton2)
	ON_BN_CLICKED(Button3, OnButton3)
	ON_BN_CLICKED(Button4, OnButton4)
	ON_BN_CLICKED(Button5, OnButton5)
	ON_BN_CLICKED(Button6, OnButton6)
	ON_BN_CLICKED(Button7, OnButton7)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CodeFrame message handlers

void CodeFrame::OnButton1() 
{
	CFile inFile;                         //得到文件长度
	inFile.Open("\T1.txt",CFile::modeRead);
	int numOfSource=inFile.GetLength();
	unsigned char temp;
	m_codeWindow="";
	for(int i=0;i<numOfSource;i++)
	{
		inFile.Read(&temp,1);
		m_codeWindow+=temp;
	}
	inFile.Close();
	UpdateData(false);
}

void CodeFrame::OnButton2() 
{
	CFile inFile;                         //得到文件长度
	inFile.Open("\T2.txt",CFile::modeRead);
	int numOfSource=inFile.GetLength();
	unsigned char temp;
	m_codeWindow="";
	for(int i=0;i<numOfSource;i++)
	{
		inFile.Read(&temp,1);
		m_codeWindow+=temp;
	}
	inFile.Close();
	UpdateData(false);
	
}

void CodeFrame::OnButton3() 
{
	CFile inFile;                         //得到文件长度
	inFile.Open("\T3.txt",CFile::modeRead);
	int numOfSource=inFile.GetLength();
	unsigned char temp;
	m_codeWindow="";
	for(int i=0;i<numOfSource;i++)
	{
		inFile.Read(&temp,1);
		m_codeWindow+=temp;
	}
	inFile.Close();
	UpdateData(false);
}

void CodeFrame::OnButton4() 
{
	CFile inFile;                         //得到文件长度
	inFile.Open("\T4.txt",CFile::modeRead);
	int numOfSource=inFile.GetLength();
	unsigned char temp;
	m_codeWindow="";
	for(int i=0;i<numOfSource;i++)
	{
		inFile.Read(&temp,1);
		m_codeWindow+=temp;
	}
	inFile.Close();
	UpdateData(false);
}

void CodeFrame::OnButton5() 
{
	CFile inFile;                         //得到文件长度
	inFile.Open("\T5.txt",CFile::modeRead);
	int numOfSource=inFile.GetLength();
	unsigned char temp;
	m_codeWindow="";
	for(int i=0;i<numOfSource;i++)
	{
		inFile.Read(&temp,1);
		m_codeWindow+=temp;
	}
	inFile.Close();
	UpdateData(false);
}

void CodeFrame::OnButton6() 
{
	CFile inFile;                         //得到文件长度
	inFile.Open("\T6.txt",CFile::modeRead);
	int numOfSource=inFile.GetLength();
	unsigned char temp;
	m_codeWindow="";
	for(int i=0;i<numOfSource;i++)
	{
		inFile.Read(&temp,1);
		m_codeWindow+=temp;
	}
	inFile.Close();
	UpdateData(false);
}

void CodeFrame::OnButton7() 
{
	CFile inFile;                         //得到文件长度
	inFile.Open("\T7.txt",CFile::modeRead);
	int numOfSource=inFile.GetLength();
	unsigned char temp;
	m_codeWindow="";
	for(int i=0;i<numOfSource;i++)
	{
		inFile.Read(&temp,1);
		m_codeWindow+=temp;
	}
	inFile.Close();
	UpdateData(false);
}

⌨️ 快捷键说明

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