#include<windows.h>
#include <string.h>
#include <stdio.h>
BOOL CALLBACK lpEnumFunc(HWND hwnd, LPARAM lParam)
{
char str[100];
char *qqlogin="QQLoginMessageWnd";
::GetWindowText(hwnd,str,sizeof(str));
int s=::GetClassName(hwnd,str,100);
if(strchr(str, *qqlogin)!=0){
printf("QQ Login Window!");
}
return 1;
}
int WINAPI WinMain(
HINSTANCE hInstance, // handle to current instance
HINSTANCE hPrevInstance, // handle to previous instance
LPSTR lpCmdLine, // pointer to command line
int nCmdShow // show state of window
)
{
EnumWindows(lpEnumFunc,NULL);
}
#include <string.h>
#include <stdio.h>
BOOL CALLBACK lpEnumFunc(HWND hwnd, LPARAM lParam)
{
char str[100];
char *qqlogin="QQLoginMessageWnd";
::GetWindowText(hwnd,str,sizeof(str));
int s=::GetClassName(hwnd,str,100);
if(strchr(str, *qqlogin)!=0){
printf("QQ Login Window!");
}
return 1;
}
int WINAPI WinMain(
HINSTANCE hInstance, // handle to current instance
HINSTANCE hPrevInstance, // handle to previous instance
LPSTR lpCmdLine, // pointer to command line
int nCmdShow // show state of window
)
{
EnumWindows(lpEnumFunc,NULL);
}