资源简介
自己模仿PopStar游戏规则编写的MFC小程序。程序已经可以正确运行。适合对MFC有基本基础的同学参考学习。

代码片段和文件信息
#include “StdAfx.h“
#include “Popblock.h“
//#include
//#include
//#include
//using namespace std;
//blockHalfWidth and blockHalfHeight determine how large the block looks like
Popblock::Popblock(void)
{
m_visible=0;
m_color=0;
m_centerPoint.SetPoint(00);
m_rowColumn.blockColumn=0;
m_rowColumn.blockRow=0;
}
Popblock::~Popblock(void)
{
}
void Popblock::formGroup()
{
}
void Popblock::drawBlock()
{
}
void Popblock::createBlock(UINT rowUINT columnUINT colorNum) //UINT colorNum
{
m_visible=1;
//UINT tempNum;
//time_t now_time;
//now_time = time(NULL);
//srand(unsigned int(now_time));
//tempNum=(unsigned int)random(1blockColorType+1); //产生随机数
switch(colorNum)
{
case 1: m_color= GREEN; break;
case 2: m_color=RED; break;
case 3: m_color=YELLOW; break;
case 4: m_color=BLUE; break;
case 5: m_color=PURPLE;break;
default: m_color=0x00ffffff; break;
}
m_centerPoint.SetPoint(column*2*blockHalfWidth+blockHalfWidthrow*2*blockHalfHeight+blockHalfHeight);
m_rowColumn.blockColumn=column+1; //calculate the column number of this created block and store in m_rowColumn.blockColumn
m_rowColumn.blockRow=row+1; //calculate the row number of this created block and store in m_rowColumn.blockRow
m_widthHeight.x=blockHalfWidth*2;
m_widthHeight.y=blockHalfHeight*2;
m_leftBottom.x=column*m_widthHeight.x;
m_leftBottom.y=row*m_widthHeight.y;
}
void Popblock::setBlockRowColumn(UINT rowUINT column)
{
m_rowColumn.blockRow=row;
m_rowColumn.blockColumn=column;
}
void Popblock::setBlockCenterPoint(UINT rowUINT column)
{
m_centerPoint.SetPoint(row*2*blockHalfWidth+blockHalfWidthcolumn*2*blockHalfHeight+blockHalfHeight);
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-04-24 10:31 PopStarTrail\
目录 0 2013-04-24 10:31 PopStarTrail\Debug\
文件 71680 2013-03-25 22:21 PopStarTrail\Debug\PopStarTrail.exe
目录 0 2013-04-24 10:30 PopStarTrail\PopStarTrail\
文件 902 2013-03-19 18:02 PopStarTrail\PopStarTrail.sln
文件 68096 2013-03-25 23:26 PopStarTrail\PopStarTrail.suo
文件 212 2013-03-23 21:17 PopStarTrail\PopStarTrail\commonStructure.h
文件 1762 2013-03-25 17:07 PopStarTrail\PopStarTrail\Popblock.cpp
文件 942 2013-03-25 17:07 PopStarTrail\PopStarTrail\Popblock.h
文件 7132 2013-03-23 19:13 PopStarTrail\PopStarTrail\Popgroup.cpp
文件 1173 2013-03-23 19:31 PopStarTrail\PopStarTrail\Popgroup.h
文件 6497 2013-03-25 22:21 PopStarTrail\PopStarTrail\Popmap.cpp
文件 1469 2013-03-25 22:19 PopStarTrail\PopStarTrail\Popmap.h
文件 1842 2013-03-25 22:09 PopStarTrail\PopStarTrail\Popstage.cpp
文件 407 2013-03-25 22:07 PopStarTrail\PopStarTrail\Popstage.h
文件 58732 2013-03-25 22:07 PopStarTrail\PopStarTrail\PopStarTrail.aps
文件 2162 2013-03-19 18:02 PopStarTrail\PopStarTrail\PopStarTrail.cpp
文件 540 2013-03-19 18:02 PopStarTrail\PopStarTrail\PopStarTrail.h
文件 5665 2013-03-25 22:07 PopStarTrail\PopStarTrail\PopStarTrail.rc
文件 6119 2013-03-23 10:18 PopStarTrail\PopStarTrail\PopStarTrail.vcproj
文件 1407 2013-03-25 23:26 PopStarTrail\PopStarTrail\PopStarTrail.vcproj.THEMO.Administrator.user
文件 1407 2013-03-19 20:51 PopStarTrail\PopStarTrail\PopStarTrail.vcproj.themo.themo.user
文件 13923 2013-03-25 22:19 PopStarTrail\PopStarTrail\PopStarTrailDlg.cpp
文件 1022 2013-03-25 22:07 PopStarTrail\PopStarTrail\PopStarTrailDlg.h
文件 4112 2013-03-19 18:02 PopStarTrail\PopStarTrail\ReadMe.txt
目录 0 2013-03-19 18:02 PopStarTrail\PopStarTrail\res\
文件 730 2013-03-25 22:07 PopStarTrail\PopStarTrail\resource.h
文件 21630 2003-07-23 17:52 PopStarTrail\PopStarTrail\res\PopStarTrail.ico
文件 403 2013-03-19 18:02 PopStarTrail\PopStarTrail\res\PopStarTrail.rc2
文件 212 2013-03-19 18:02 PopStarTrail\PopStarTrail\stdafx.cpp
文件 1956 2013-03-19 18:02 PopStarTrail\PopStarTrail\stdafx.h
............此处省略3个文件信息
- 上一篇:C语言编写的万年历,界面友好
- 下一篇:基于VC的网络爬虫程序
相关资源
- 基于mfc的多线程文件传输
- MFC数字钟(基于VC6.0)
- VC++MFC小游戏实例教程(实例)+MFC类库
- ChartCtrl控件库(可在VS2019中使用)
- 商品库存管理系统 C++ MFC
- mfc 调用redis
- MFC视频播放器源码(支持avi/wma/mp3等格
- mfc绘图大全(画直线、矩形、椭圆)
- MFC控件重绘
- hook,捕获所有案件,查找所有窗口,
- (学习)VS2010之MFC入门到精通教程
- 对话框中实现浮动工具栏
- MFC文档_视图_框架_模板结构体系深入
- 简单员工管理系统(适合初学MFC)
- MFC五子棋游戏
- MFC UDP编程
- MFC的异步网络通讯应用程序
- C++MFC模块讲解,黑发程序员课程整理
- 一个简单而强大的基于MFC的web server源
- 基于MFC的VC++仿QQ浏览器源码(雏形)
- MFCaccess.rar
- VC++MFC课程设计的学生成绩管理系统
- MFC 日历控件 万年历 Calendar自绘
- CrystalDiskInfo-HDD/SSD硬盘信息,SMART信息
- MFC自定义界面HUI,高效简单,含详细
- 仿射密码-Affine cipher
- c++MFC车牌自动识别定位,只能定位和
- mfc+sql 酒店客房管理系统
- 基于图割的图像分割OpenCV+MFC实现
- MFC绘制Bezier曲线B样条曲线曲线拟合
评论
共有 条评论