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

📄 aboutdlg.cpp

📁 经典算法全集:DES算法
💻 CPP
字号:
// AboutDlg.cpp : implementation file
//

#include "stdafx.h"
#include "MixedCS.h"
#include "AboutDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
extern  CMixedCSApp         theApp;
static  BOOL bClicked = FALSE;

char *pArrCredit = { "|精灵混合加密系统(MCS) Ver 1.0\t||Copyright (c) 2003|"
        "东北大学信息科学与工程学院|安全与保密小组制作||"
        "BITMAPBADGE^||"    // this is a quoted bitmap resource 
        "组长\r||0200935 王俊川||"
        "成员\r||0200950 原常青|0200980 胡德华|0201005 刘红旗|0200906 高志刚||"
        "BITMAPCITY^||"    // this is a quoted bitmap resource 
        "Window支持类(class CWindow)\r||原常青 刘红旗||"
        "通用库(class CGfL)\r||刘红旗 胡德华||"
        "输入输出文件类(class CFileInOut)\r||高志刚||"
        "DES(class CDes)\r||王俊川 胡德华||"
        "大数算法库(class CBigInt)\r||王俊川 高志刚||"
        "RSA(class CRsa)\r||原常青||"
        "混合密码系统(class CMcs)\r||王俊川||"
        "界面\r||王俊川||"
        "* * * * * * * * *\t|||"
        "BITMAPZHULOU^||"
        "技术支持\r||王俊川||"
        "文档\r||刘红旗||"
        "系统支持\r||王俊川||"
        "管理支持\r||原常青||||"
        "BITMAPBADGENAME^|||||||||||||||"
        };

/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog


CAboutDlg::CAboutDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CAboutDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CAboutDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	CBitmap bmp;
	srand(GetTickCount());
	do{theApp.bk_about=rand()%5;}while(theApp.bk_about==theApp.bk_mainui
		                      ||theApp.bk_about==1||theApp.bk_about==3);
	bmp.LoadBitmap(IDB_BKBITMAP1+theApp.bk_about);
	m_BkBrush = CreatePatternBrush ((HBITMAP)bmp.GetSafeHandle()) ;
	bmp.DeleteObject();

	bitmapIDs[0] = IDB_BKBITMAP2;
	bitmapIDs[1] = IDB_BKBITMAP4;
}

void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CAboutDlg)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
	//{{AFX_MSG_MAP(CAboutDlg)
	ON_WM_CTLCOLOR()
	ON_WM_TIMER()
	ON_WM_DESTROY()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CAboutDlg message handlers
#define  DISPLAY_TIMER_ID		151

BOOL CAboutDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_neuhomepage.SubclassDlgItem(IDC_NEUHOMEPAGE_STATIC,this);
	m_myemail.SubclassDlgItem(IDC_MYEMAIL_STATIC,this);

	m_neuhomepage.SetLink(TRUE)
				 .SetTextColor(RGB(0,0,255))
		         .SetFontUnderline(TRUE)
				 .SetLinkCursor(AfxGetApp()->LoadCursor(IDC_HAND));
	m_myemail.SetLink(TRUE)
		     .SetTextColor(RGB(0,0,255))
		     .SetFontUnderline(TRUE)
		     .SetLinkCursor(AfxGetApp()->LoadCursor(IDC_HAND));
	         
	m_credit.SubclassDlgItem(IDC_DISPLAY_STATIC,this);
	m_credit.SetCredits(pArrCredit,'|');
	m_credit.SetSpeed(DISPLAY_FAST);
	m_credit.SetColor(BACKGROUND_COLOR, RGB(0,0,255));
	m_credit.SetTransparent();
	m_credit.SetBkImage(bitmapIDs[0]);
	m_credit.StartScrolling();
	TimerOn = SetTimer(DISPLAY_TIMER_ID,5000,NULL);
    ASSERT(TimerOn != 0);

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

HBRUSH CAboutDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) 
{
{
	HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);

	// TODO: Change any attributes of the DC here
	if ( (nCtlColor==CTLCOLOR_DLG) || (nCtlColor==CTLCOLOR_STATIC) )
	{
		pDC->SetBkMode (TRANSPARENT);
		if( nCtlColor==CTLCOLOR_STATIC )
			pDC->SetTextColor(RGB(0,0,255));
		hbr = m_BkBrush;
	}
	// TODO: Return a different brush if the default is not desired
	return hbr;
}
}

void CAboutDlg::OnTimer(UINT nIDEvent) 
{
	// TODO: Add your message handler code here and/or call default
	if (nIDEvent != DISPLAY_TIMER_ID)
	{
		CDialog::OnTimer(nIDEvent);
		return;
	}

	static int index = 0;

	index = ++index % 2;
	
	m_credit.SetBkImage(bitmapIDs[index]);
		
	CDialog::OnTimer(nIDEvent);
}

void CAboutDlg::OnDestroy() 
{
	CDialog::OnDestroy();
	
	// TODO: Add your message handler code here
	if(TimerOn)
		ASSERT(KillTimer(DISPLAY_TIMER_ID));
}

⌨️ 快捷键说明

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