跳到正文

个人记录

1

CuBalloon约 2 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2026年6月8日
篇幅
约 2 分钟
获赞
1

版本

  1. v1当前
C++
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
char s[1005][1005];
POINT p;
int main(){

	HWND hwnd=GetForegroundWindow();
	ShowWindow(hwnd,SW_SHOWMAXIMIZED);
	for(int i=1;i<=50;i++){
		for(int j=1;j<=130;j++){
			if(i==11&&j==52) printf("#");
			else if(i==11&&j==106) printf("#");
			else if(i==40&&j==52) printf("#");
			else if(i==40&&j==106) printf("#");
			else if((i==11||i==40)&&(52<j&&j<106)) printf("-");
			else if((j==52||j==106)&&(11<i&&i<40)) printf("|");
			else printf(" ");
		}
		printf("\n");
	}	
//	return 0;
//	printf("退出:Alt+f4\n");
	p={1500,1000};
	while(1){
		POINT q;
		GetCursorPos(&q);
		if((1000<=q.x&&q.x<=2000&&500<=q.y&&q.y<=1500)) p=q;
//		printf("%d %d\n",p.x,p.y);
		SetCursorPos(p.x,p.y);
		Sleep(5);
	}
	
	return 0;
}
//11 40
//52 106
原文