clouds.cpp

来自「MFC窗口程序设计源代码。相信大家看得懂。」· C++ 代码 · 共 54 行

CPP
54
字号
/****************************************************************/
/*																*/
/*  CloudsCtrl.cpp												*/
/*																*/
/*  Implementation of the CCloudsCtrl class.					*/
/*	Attempt to simulate clouds using MFC 						*/
/*																*/
/*  DO NOT REMOVE THE ORGINAL CREDITS/COPYRIGHTS!!!				*/
/*																*/
/*  Programmed by Pablo van der Meer							*/
/*  Copyright Pablo Software Solutions 2003						*/
/*  This code is stolen from: http://www.pablovandermeer.nl		*/
/*																*/
/*  Last updated: December 15, 2003								*/
/*																*/
/****************************************************************/


#include "stdafx.h"
#include "Clouds.h"
#include <math.h>

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


CCloudsCtrl::CCloudsCtrl()
{
	// protected bitmaps to restore the memory DC's
	m_pOldBitmap = NULL;

	m_pCloudPlasma1 = NULL;
	m_pCloudPlasma2 = NULL;
	m_pCloudPlasma3 = NULL;

	m_nDensity = 8;

	m_bInterActive = FALSE;
	m_nSpeed = 2;
	
	m_ptDirection = m_ptMove = CPoint(m_nSpeed, 1);
	m_ptOffset1 = m_ptOffset2 = m_ptOffset3 = CPoint(0,0);

	m_pPixels = NULL;
	m_nSizeOfBits = 0;
	m_hBitmap = NULL;

	m_strCredits = "\tCCloudsCtrl\n\n"
				   "\rProgrammed by:\n"
				   "Pablo van der Meer\n\n"
				   "Copyright 

⌨️ 快捷键说明

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