easyx

// 字符串转大文子.cpp : 定义控制台应用程序的入口点。
//
// output 图片.cpp : 定义控制台应用程序的入口点。
//
// "void __cdecl SaveDotWord(char (*)[25])" (? SaveDotWord@@YAXPAY0BJ@D@Z),该符号在函数 _main 中被引用	output 图片	C : \Users\bluecat code\Desktop\弹弹乐\output 图片\output 图片\output 图片.obj	1

#include "stdafx.h"
#include 
#include  
#include  
#include  
#include  
#include 
#include 
#include
#include 
#include 
using namespace std;
#define wide 49 
#define gao 24 
#define high 6 
int yanhua[gao][wide], hang, lie, i, j, temp, pc, flag;
char ch;
/********************函数声明************************/
void DotWord(char(*dot)[50]);
void PrintDotWord(char(*dot)[50]);
void djs();
void printchar();
//void SaveDotWord(char(*dot)[25]);
/*********************主函数*************************/
int main(void)
{
	djs();
	char dot[25][50];

	for (int i = 0; i <5; i++)
	{

		initgraph(640, 440);
		setbkcolor(BLACK);
		cleardevice();
		HWND hwnd = GetHWnd();
		SetWindowText(hwnd, (LPCWSTR)"demo");	//初始化 
		setcolor(BLUE);
		settextstyle(25, 25, _T("宋体"));

		switch (i)
		{
		case 0:
			outtextxy(0, 0, _T("你"));	//修改引号中的字符,得到其它结果 
			break;
		case 1:
			outtextxy(0, 0, _T("好"));	//修改引号中的字符,得到其它结果 
			break;
		case 2:
			outtextxy(0, 0, _T("1"));	//修改引号中的字符,得到其它结果 
			break;
		case 3:
			outtextxy(0, 0, _T("2"));	//修改引号中的字符,得到其它结果 
			break;
		case 4:
			outtextxy(0, 0, _T("3"));	//修改引号中的字符,得到其它结果 
			break;
		default:
			break;
		}
		closegraph();	//显示字符 
		Sleep(1000);
		DotWord(dot);
		PrintDotWord(dot);
		//SaveDotWord(dot);	//扫描并处理 
		//system("cls");//清屏
	}
	initgraph(640, 440);
	setbkcolor(BLACK);
	cleardevice();
	HWND hwnd = GetHWnd();
	SetWindowText(hwnd, (LPCWSTR)"demo");	//初始化 
	setcolor(BLUE);
	settextstyle(80, 40, _T("宋体"));
	outtextxy(0, 0, _T("你好,123!"));	//修改引号中的字符,得到其它结果
	_getch();
	system("cls");
	closegraph();	//显示字符 
					//Sleep(100);
					//_getch();
	DotWord(dot);

	system("pause");
	return 0;
}


//把ASCII可见字符转化为点阵 
void DotWord(char(*dot)[50])
{
	for (int i = 0; i < 25; i++)
		for (int j = 0; j <50; j++)
		{
			RGBtoGRAY(getpixel(j, i)) < 255 ? dot[i][j] = '*' : dot[i][j] = ' ';
		}
}

//向屏幕打印点阵 
void PrintDotWord(char(*dot)[50])
{
	for (int i = 0; i <25; i++)
	{
		for (int j = 0; j < 50; j++)
		{
			printf("%c", dot[i][j]);
		}
		putchar('\n');
	}
}
void djs()
{
	cout << "精彩不容错过……";
	Sleep(1000);
	system("cls");
	void printchar();
	for (temp = 3; temp >= 1; temp--)
	{
		switch (temp)
		{
		case 1:
			for (i = 2; i <= 15; i++)
			{
				for (j = wide / 2; j <= wide / 2 + 1; j++)yanhua[i][j] = 1;
			}break;
		case 2:
			for (i = 2; i <= 15; i++)
			{
				switch (i)
				{
				case 2:case 3:case 8:case 9:case 14:case 15:
					for (j = wide / 2 - 7; j <= wide / 2 + 8; j++)yanhua[i][j] = 1; break;
				case 4:case 5:case 6:case 7:
					for (j = wide / 2 + 7; j <= wide / 2 + 8; j++)yanhua[i][j] = 1; break;
				default:
					for (j = wide / 2 - 7; j <= wide / 2 - 6; j++)yanhua[i][j] = 1; break;
				}
			}break;
		case 3:
			for (i = 2; i <= 15; i++)
			{
				switch (i)
				{
				case 2:case 3:case 8:case 9:case 14:case 15:
					for (j = wide / 2 - 7; j <= wide / 2 + 8; j++)yanhua[i][j] = 1; break;
				default:
					for (j = wide / 2 + 7; j <= wide / 2 + 8; j++)yanhua[i][j] = 1; break;
				}
			}break;
		}
		printchar();
		Sleep(1000);
		for (i = 0; i

 

你可能感兴趣的:(c++)