SetWindowPos用起来没有反应,上代码,求大神看看
#include <stdio.h>#include <stdlib.h>
#include <Windows.h>
void openqq()
{
ShellExecuteA(0, "open", "\"C:\\Program Files (x86)\\Tencent\\QQ\\Bin\\QQScLauncher.exe\"",0,0,1);
}
void closeqq()
{
system("taskkill /f /im QQ.exe");
}
void moveqq()
{
HWND win = FindWindowA("TXGuiFoundation", "QQ");
if (win = NULL)
{
MessageBoxA(0, "没有找到QQ存在", "系统提示", 0);
}
int i = 0;
while(i<1366)
{
SetWindowPos(win, NULL, 2*i, i, 200, 200, 0);
i += 20;
}
}
void main()
{
closeqq();
Sleep(2000);
openqq();
Sleep(5000);
moveqq();
}