简单c语言调戏qq

#include
#include
#include
#include
#include
void go1(void *p)
{
	time_t tms;
	srand((unsigned int)time(&tms));


	HWND win = FindWindowA("TXGuiFoundation", "QQ");
	if (win == NULL)
	{
		printf("QQ失踪了");
	}
	while (1)
	{
		for (int i = 0; i < 1920; i = i + 10)
		{
			SetWindowPos(win, NULL, i, 0, 100, 200, 0);
			int j = rand() % 30 + 10;


			Sleep(50);


			//向右移动
		}
		for (int i = 1920; i >0; i = i - 10)
		{
			SetWindowPos(win, NULL, i, 0, 100, 200, 0);
			//int j = rand() % 30 + 10;
			Sleep(50);//向左移动


		}




	}
	while (1)
	{
		POINT  ptb = { 370, 550 };


		LPPOINT xy=&ptb;
		xy->x = 0;
		xy->y = 0;
		GetCursorPos(xy);//获取当前你的位置
		SetWindowPos(win, NULL,xy->x + 50, xy->y + 50,400,400,0);
	}




}
void go2(void *p)
{
	time_t tms;
	srand((unsigned int)time(&tms));


	HWND win = FindWindowA("XLUEFrameHostWnd", "迅雷极速版");
	if (win == NULL)
	{
		printf("腾讯失踪了");
	}
	while (1)
	{
		for (int i = 0; i <1080; i = i + 10)
		{
			SetWindowPos(win, NULL, 0, i, 100, 200, 0);
			//	int j = rand() % 30 + 10;
			Sleep(50);//向下移动


		}


		for (int i = 1080; i >0; i = i - 10)
		{
			SetWindowPos(win, NULL, 0, i, 100, 200, 0);
			//int j = rand() % 30 + 10;
			Sleep(50);//向上移动


		}
	}


}
int main()
{
	HWND win = FindWindowA("TXGuiFoundation", "QQ");
  /*	while (1)
	{   
		for (int i = 0; i < 1200; i = i + 10)
		{
			SetWindowPos(win, NULL, i, 0, 400, 400, 0);
			Sleep(10);
		}
		for (int i = 0; i < 700; i = i + 10)
		{
			SetWindowPos(win, NULL, 1200, i, 400,400,0);
			Sleep(10);
		}
		for (int i = 1200; i>0; i = i - 10)
		{
			SetWindowPos(win, NULL, i, 500,  400, 400, 0);
			Sleep(10);
		}
		for (int i = 500; i >0; i = i - 10)
		{
			SetWindowPos(win, NULL, 0, i, 600, 500, 0);
			//int j = rand() % 30 + 10;
			Sleep(10);//向上移动


		} */
		POINT  ptb = { 370, 550 };


		LPPOINT xy = &ptb;//设置位置变量
		xy->x = 0;
		xy->y = 0;
		GetCursorPos(xy);//获取当前你的位置
		SetWindowPos(win, NULL, xy->x + 50, xy->y + 50, 400, 400, 0);
	}
	//_beginthread(go1, 0, NULL);
	//_beginthread(go2, 0, NULL);




	system("pause");
















	return 0;
}

你可能感兴趣的:(简单c语言调戏qq)