18,356
社区成员
发帖
与我相关
我的任务
分享
int Enumeratecount=0;
BOOL CALLBACK EnumWindowsProc(HWND hwnd,LPARAM lParam )
{
if(Enumeratecount<0)
{::MessageBox(NULL,0,0,0);}//为什么Enumeratecount的值小于了0?照理说它不小于才对但是它还是运行了,这是怎么回事?
Enumeratecount--;
if (hwnd == NULL)
{
return FALSE;
}
else
{
return true;
}
if(Enumeratecount==0)
{return FALSE; }
}
VOID CALLBACK TimerProc
(
HWND hwnd, // handle of window for timer messages
UINT uMsg, // WM_TIMER message
UINT idEvent, // timer identifier
DWORD dwTime // current system time
)
{
Enumeratecount=20;
EnumWindows(EnumWindowsProc,NULL);
}