0
已解决
杨骐宇
中级光能
中级光能
这是一个全新的cmd,源码:
#include<bits/stdc++.h>
#include<iostream>
#include<conio.h>
#include<cstdio>
#include<iomanip>
#include<cmath>
#include<windows.h>
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
using namespace std;
void Slowsay(string s) {
for (int i = 0; s[i]; i++) {
cout<<s[i];
Sleep(40);
}
}
void Line(string str) {
int i,l,w;
w=120;
l=str.length();
for(i=0;i<(w-l)/2;i++)
cout << " ";
}
void mcout(string str){
Line(str);
Slowsay(str);
}
string s;
void zhiling1(){
cout<<"YOS xy-system [版本 1.001]\n(c) YOS-XY Corporation。保留所有权利。\n\n";
while(1){
char a[100005];
string as;
cout<<"XY-C:\\Users\\XY>";
getline(cin,as);
if(as=="return 0"||as=="RETURN 0"){
break;
}
strcpy(a, as.c_str());
system(a);
}
}
void hello(){
system("color 0f");
Slowsay("XY XY-system [版本 1.001]\n(c) XY-SYSTEM Corporation。保留所有权利。\n");
Slowsay("|\n|\n");
Slowsay("| 按下左键:常规cmd指令(windows所有指令通用!,输入return 0退出)\n");
Slowsay("|\n| 按下右键,打开礼包兑换码界面\n");
}
int main(){
HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE);
DWORD mode;
GetConsoleMode(hStdin, &mode);
mode &= ~ENABLE_QUICK_EDIT_MODE; //移除快速编辑模式
mode &= ~ENABLE_INSERT_MODE; //移除插入模式
mode &= ~ENABLE_MOUSE_INPUT;
SetConsoleMode(hStdin, mode);
hello();
while(1){
if(KEY_DOWN(VK_LBUTTON)){
system("cls");
zhiling1();
system("cls");
cout<<"\n下次再见!!!";
Sleep(2000);
HWND hwnd=GetForegroundWindow();
ShowWindow(hwnd,SW_HIDE);
return 0;
}
if(KEY_DOWN(VK_RBUTTON)){
system("cls");
Slowsay("输入兑换码:");
cin>>s;
if(s=="xy-is-not-1-years-old-yet-it-is-on-2022"){
cout<<"欢迎尊贵的开发者!!!\n";
cout<<"您可以解开所有以后的XY压缩包密码!!,密码是:xYxYxY666\n";
cout<<"按任意键继续...";
getch();
}else{
hello();
}
}
}
return 0;
}