简单的调用例子, 适合初学者学习,当然 我也是初学者.
#include <windows.h>
#include <stdio.h>
#include <stdlib.h> #define dim(x) (sizeof()/sizeof(x[0])) int main()
{
system("color 5b");
/* system("mode con cols=60 lines=8");*/
system("title Kill Window");
char sName[] = {};
HWND hWnd = ; puts("====--------------====");
puts("==== QQ 702368956 ====");
puts("====--------------====");
while ()
{
printf("Help You Kill it: ");
gets(sName);
hWnd = FindWindow(NULL, sName);
if (hWnd)
{
SendMessage(hWnd, WM_CLOSE, , );
break;
}
else
{
printf(" 没有找到窗口...\n\n");
continue;
}
}
return ;
}