12.C语言控制窗口

 1 void main()
 2 {
 3     //创建一个窗口编号变量,寻找QQ的窗口
 4     HWND win = FindWindowA("TXGuiFoundation", "QQ");//类名,标题
 5     if (win == NULL)
 6     {
 7         printf("没找到QQ窗口\n");
 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 }

 

posted @ 2017-12-30 16:34  喵小喵~  阅读(254)  评论(0编辑  收藏  举报