1 void main() 2 { 3 //创建一个窗口编号变量,寻找QQ的窗口 4 HWND win = FindWindowA("TXGuiFoundation", "QQ");//类名,标题 5 if (win == NULL) 6 { 7 printf("没找到QQ窗口 "); 8 } 9 /*ShowWindow(win, SW_HIDE); 10 Sleep(3000); 11 ShowWindow(win, SW_SHOW);*/ 12 13 for (int i = 0; i < 1000; i++) 14 { 15 SetWindowPos(win, NULL, i, i, 700, 500, 0);//设置位置及大小 16 Sleep(50); 17 } 18 19 20 system("pause"); 21 }