easyx一个极为简单的程序(1)
最近我看到一个叫easyx的函数库,我便仔细看了看,作了一个极为简单的程序。
这个程序可以以不同颜色,不同次数,每次增加1/20屏幕分辨率的速度增大画图窗口(看起来也很简单…)。
代码如下:
// 播放初始声音.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//
#include <iostream>
#include<windows.h>
#include<stdio.h>
#include<mmsystem.h>
#include<easyx.h>
#include<cstring>
#include<string.h>
#include <string>
#include "conio.h"
using namespace std;
#define n 1
#pragma comment(lib,"Winmm.lib")
int main()
{
int cx = GetSystemMetrics(SM_CXSCREEN);
int cy = GetSystemMetrics(SM_CYSCREEN);
HWND inf = initgraph(1, 1);
LONG l_WinStyle = GetWindowLong(inf, GWL_STYLE);
SetWindowLong(inf, GWL_STYLE, (l_WinStyle | WS_POPUP | WS_MAXIMIZE) & ~WS_CAPTION & ~WS_THICKFRAME & ~WS_BORDER);
SetWindowPos(inf, HWND_TOP, 0, 0, cx, cy, 0);
setbkcolor(RED);
cleardevice();
mciSendString(L"open 1.mp3", NULL, 0, NULL);
mciSendString(L"play 1.mp3", NULL, 0, NULL);
wchar_t s[10];
InputBox(s, 10, L"请输入此数");
// 将用户输入转换为数字
int r = _wtoi(s);
#define n r</