求个最简单的VC++俄罗斯方块程序代码

来源:百度知道 编辑:UC知道 时间:2024/05/27 02:24:29
小弟是初学者想求个最简单的
最好用上下面的2个文件
colorConsole.cpp
#include "colorConsole.h"
HANDLE initiate()
{
HANDLE hOutput;
hOutput = GetStdHandle(STD_OUTPUT_HANDLE);
return hOutput;
}
BOOL textout(HANDLE hOutput,int x,int y,WORD wColors[],int nColors,LPTSTR lpszString)
{
DWORD cWritten;
BOOL fSuccess;
COORD coord;

coord.X = x; // start at first cell
coord.Y = y; // of first row
fSuccess = WriteConsoleOutputCharacter(
hOutput, // screen buffer handle
lpszString, // pointer to source string
lstrlen(lpszString), // length of string
coord, // first cell to write to
&cWritten); // actual number written
if (! fSuccess)
cout<<"error:WriteConsoleOutputCharacter"<<endl;

俄罗斯方块源码,希望能帮助到你:

http://www.cctry.com/viewthread.php?tid=303&highlight=%B6%ED%C2%DE%CB%B9

VC驿站 - www.CcTry.CoM
C、C++、VC++ 编程学习 免费课程 精品电子书 精品源码 下载 期待您的加入!