前提:已安装easyx
easyx官方网站:https://www.easyx.cn/
多线程方式
环境:Visual C++ 6.0 / Visual Studio 2017
使用vc6的话,要在【工程】-【设置】里把多线程编译打开
exe:https://download.csdn.net/download/weixin_44565660/10959909
#include<graphics.h>
#include<iostream>
#include<conio.h>
#include<string>
#include<time.h>
#include<process.h>
using namespace std;
int bs = 40, w = 12, h = 3;
typedef struct KEY {
int x;
int y;
wchar_t str[2];
}KEY;
KEY keys[26] = {
{
1,1,_T("Q")},{
2,1,_T("W")},{
3,1,_T("E")},
{
4,1,_T("R")},{
5,1,_T("T")},{
6,1,_T("Y")},
{
7,1,_T("U")},{
8,1,_T("I")},{
9,1,_T("O")},
{
10,1,_T("P")},{
1,2,_T("A")},{
2,2,_T("S")},
{
3,2,_T("D")},{
4,2,_T("F")},{
5,2,_T("G")},
{
6,2,_T("H")},{
7,2,_T("J")},{
8,2,_T("K")},
{
9,2,_T("L")},{
1,3,_T("Z")},{
2,3,_T("X")},
{
3,3,_T("C")},{
4