资源简介
使用c++开发的非常小巧别致的俄罗斯方块
代码片段和文件信息
// tetris_0_0_1.cpp : Defines the entry point for the application.
//
#include “stdafx.h“
#include “tetris_0_0_1.h“
#include “sdk_game_controller.h“
#define MAX_LOADSTRING 100
// Global Variables:
HINSTANCE hInst; // current instance
TCHAR sztitle[MAX_LOADSTRING]; // The title bar text
TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name
// Forward declarations of functions included in this code module:
ATOM MyRegisterClass(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE int);
LRESULT CALLBACK WndProc(HWND UINT WPARAM LPARAM);
INT_PTR CALLBACK About(HWND UINT WPARAM LPARAM);
// 窗口初始化宽度
#define WINDOW_INIT_WIDTH 550
// 窗口初始化高度
#define WINDOW_INIT_HEIGHT 600
int APIENTRY _tWinMain(_In_ HINSTANCE hInstance
_In_opt_ HINSTANCE hPrevInstance
_In_ LPTSTR lpCmdLine
_In_ int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
// TODO: Place code here.
MSG msg;
HACCEL hAccelTable;
// Initialize global strings
LoadString(hInstance IDS_APP_title sztitle MAX_LOADSTRING);
LoadString(hInstance IDC_TETRIS_0_0_1 szWindowClass MAX_LOADSTRING);
MyRegisterClass(hInstance);
// Perform application initialization:
if (!InitInstance (hInstance nCmdShow))
{
return FALSE;
}
hAccelTable = LoadAccelerators(hInstance MAKEINTRESOURCE(IDC_TETRIS_0_0_1));
// Main message loop:
while (GetMessage(&msg NULL 0 0))
{
if (!TranslateAccelerator(msg.hwnd hAccelTable &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return (int) msg.wParam;
}
//
// FUNCTION: MyRegisterClass()
//
// PURPOSE: Registers the window class.
//
ATOM MyRegisterClass(HINSTANCE hInstance)
{
WNDCLASSEX wcex;
wcex.cbSize = sizeof(WNDCLASSEX);
wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = WndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = hInstance;
wcex.hIcon = LoadIcon(hInstance MAKEINTRESOURCE(IDI_TETRIS_0_0_1));
wcex.hCursor = LoadCursor(NULL IDC_ARROW);
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
//wcex.lpszMenuName = MAKEINTRESOURCE(IDC_TETRIS_0_0_1);
wcex.lpszMenuName = nullptr;
wcex.lpszClassName = szWindowClass;
wcex.hIconSm = LoadIcon(wcex.hInstance MAKEINTRESOURCE(IDI_SMALL));
return RegisterClassEx(&wcex);
}
//
// FUNCTION: InitInstance(HINSTANCE int)
//
// PURPOSE: Saves instance handle and creates main window
//
// COMMENTS:
//
// In this function we save the instance handle in a global variable and
// create and display the main program window.
//
BOOL InitInstance(HINSTANCE hInstance int nCmdShow)
{
HWND hWnd;
hInst = hInstance; // Store instance handle in our global variable
hWnd = CreateWindow(szWindowClass sztitle WS_OVERLAPPEDWINDOW
CW_USEDEFAULT 0 WINDOW_INIT
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 52690944 2016-05-30 12:09 tetris\ipch\tetris_0_0_1-8284cfc4\tetris_0_0_1-c65e4b55.ipch
文件 23040 2016-05-30 20:24 tetris\Release\tetris_0_0_1.exe
文件 982 2016-05-22 19:33 tetris\tetris.sln
..A..H. 49152 2016-05-30 20:40 tetris\tetris.v12.suo
文件 6860 2016-05-30 19:54 tetris\tetris_0_0_1\app.cpp
文件 1271 2016-05-23 11:28 tetris\tetris_0_0_1\child_region.cpp
文件 1652 2016-05-30 19:18 tetris\tetris_0_0_1\child_region.h
文件 303847 2016-05-30 20:37 tetris\tetris_0_0_1\doc\俄罗斯方块.chm
文件 27346 2016-05-11 07:38 tetris\tetris_0_0_1\doxygen\customdoxygen.css
文件 303847 2016-05-30 20:37 tetris\tetris_0_0_1\doxygen\doc\html\index.chm
文件 37793 2016-05-30 20:26 tetris\tetris_0_0_1\doxygen\doc\html\tetris_show01.PNG
文件 18102 2016-05-30 20:27 tetris\tetris_0_0_1\doxygen\doc\html\tetris_show02.PNG
文件 18957 2016-05-30 20:28 tetris\tetris_0_0_1\doxygen\doc\html\tetris_show03.PNG
文件 1796 2016-05-30 20:39 tetris\tetris_0_0_1\doxygen\DoxygenFile.cfg
文件 737 2016-05-11 07:45 tetris\tetris_0_0_1\doxygen\footer.html
文件 1186 2016-05-17 06:48 tetris\tetris_0_0_1\doxygen\header.html
文件 251 2016-05-30 20:33 tetris\tetris_0_0_1\doxygen\index.h
文件 6089 2016-05-17 06:40 tetris\tetris_0_0_1\doxygen\layout.xm
文件 15207 2016-05-11 08:11 tetris\tetris_0_0_1\doxygen\mydoxygen.png
文件 788 2016-05-30 20:34 tetris\tetris_0_0_1\game_controller.h
文件 3191 2016-05-30 19:54 tetris\tetris_0_0_1\game_panel.cpp
文件 2216 2016-05-30 20:08 tetris\tetris_0_0_1\game_panel.h
文件 4590 2016-05-30 19:55 tetris\tetris_0_0_1\left_game_region.cpp
文件 2460 2016-05-30 19:54 tetris\tetris_0_0_1\left_game_region.h
文件 2633 2016-05-22 19:33 tetris\tetris_0_0_1\ReadMe.txt
文件 755 2016-05-22 19:33 tetris\tetris_0_0_1\Resource.h
文件 2910 2016-05-30 17:53 tetris\tetris_0_0_1\right_info_region.cpp
文件 1772 2016-05-30 19:28 tetris\tetris_0_0_1\right_info_region.h
文件 1142 2016-05-30 19:54 tetris\tetris_0_0_1\sdk_game_controller.cpp
文件 779 2016-05-30 20:36 tetris\tetris_0_0_1\sdk_game_controller.h
............此处省略29个文件信息
相关资源
- Numerical Recipes 3rd英文版,有C++、Fort
- Sahni著《数据结构算法与应用——C+
- C++编程惯用法——高级程序员常用方
- ACIS--CAD开发类库4
- 郑丽的C++学生用书
- 用C++使用SDL库编写的俄罗斯方块游戏
- 简单画图软件c++
- 拓扑排序与关键路径(C++版)
- 21天学通 C++第8版 超清版完整带书签
- libstdc++.so.6.0.21
- C++获取电脑CPU序列号及硬盘序列号
- 软件工程选课系统含代码,执行文件
- 计算机网络课程设计之Ping程序含C++原
- 基于c++和winsocket的局域网聊天源代码
- 穿线法识别数码管数字c++
- 数据结构 图的最小生成树 C++描述 使
- 模拟字典小程序c++实现
- 足球俱乐部管理系统——北邮c++2课程
- QT小项目-电子词典
- c++高校工资管理系统
- C++ 双缓存机制播放音频流(PCM裸流)
- Effective Modern C++英文版及中文翻译
- ldra c++ testbed 安装文档1
- 音频解码实现C++音频解码实现C++
- vc++&sql sever实现超市管理系统
- c++辅助源码.rar
- 利用c语言实现FFT运算
- C++ Concurrency in Action (2nd) 无水印
- Diab C/C++ Compiler for PowerPC
- Internet选项设置-C++
评论
共有 条评论