检测勾当桌面是否激活
bool __fastcall TWallFrm::ActiveDesktop(void)
/*以上代码在c++ Builder5/Win98 SE下编译通过*/
{
/*检测是否启动了Active Desktop
是则返回true,不然返回false*/
HWND hwnd;
hwnd=FindWindow("Progman",NULL);
hwnd= FindWindowEx(hwnd,NULL,"SHELLDLL_DefView",NULL);
hwnd=FindWindowEx(hwnd,NULL,"Internet Explorer_Server",NULL);
if (hwnd>0)
return true;
else
return false;
}