资源简介
使用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个文件信息
相关资源
- C++获取计算机的CPU ID,硬盘序列号等
- C++头文件转delphi工具 + 源码
- 国际象棋的qt源代码
- C++中头文件与源文件的作用详解
- C++多线程网络编程Socket
- VC++ 多线程文件读写操作
- 利用C++哈希表的方法实现电话号码查
- 移木块游戏,可以自编自玩,vc6.0编写
- C++纯文字DOS超小RPG游戏
- VC++MFC小游戏实例教程(实例)+MFC类库
- 连铸温度场计算程序(C++)
- 6自由度机器人运动学正反解C++程序
- Em算法(使用C++编写)
- libstdc++-4.4.7-4.el6.i686.rpm
- VC++实现CMD命令执行与获得返回信息
- 白话C++(全)
- C++标准库第1、2
- 大数类c++大数类
- C++语言编写串口调试助手
- c++素数筛选法
- C++ mqtt 用法
- 商品库存管理系统 C++ MFC
- c++ 多功能计算器
- C++17 In Detail
- 嵌入式QtC++编程课件
- 颜色识别形状识别STM103嵌入式代码
- c++ 邮件多附件群发
- c++ 透明代理(hookproxy)
- mfc 调用redis
- FTP客户端源码(c++)
川公网安备 51152502000135号
评论
共有 条评论