EasyX中更改控制檯窗口信息

#include <iostream>
#include <graphics.h>
#include <string>
#include "resource.h"
using namespace std;

int main()
{
	initgraph(800, 600);
	SetWindowText(GetHWnd(), L"沙漠駱駝");//SetConsleTitle
	/*LoadIcon(hIn,)*/
	IMAGE bk;
	loadimage(&bk, L"沙漠駱駝.jpg",800,600);
	putimage(0, 0, &bk);

	setbkmode(TRANSPARENT);
	settextcolor(RGB(0,0,100));
	
	int ch = textheight('什');
	int h = 140;
	outtextxy(260, h, L"什麼鬼魅傳說");
	outtextxy(260, h + 1 * (ch + 5), L"什麼魑魅魍魎妖魔");
	outtextxy(260, h + 2 * (ch + 5), L"只有那鷺鷹在幽幽的高歌");
	outtextxy(260, h + 3 * (ch + 5), L"漫天黃沙掠過");
	outtextxy(260, h + 4 * (ch + 5), L"走遍每個角落");
	outtextxy(260, h + 5 * (ch + 5), L"行走在無盡的蒼茫星河");
	outtextxy(260, h + 6 * (ch + 5), L"白天黑夜交錯");
	outtextxy(260, h + 7 * (ch + 5), L"如此妖嬈婀娜");
	outtextxy(260, h + 8 * (ch + 5), L"蹉跎着歲月又蹉跎了自我");

	system("pause");
	closegraph();
}

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章