bool __fastcall TWallFrm::ActiveDesktop(void)
{
/*檢測是否啟動了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;
}/*以上代碼在c++ Builder5/Win98 SE下編譯通過*/