BOOL CALLBACK HideAllWin(HWND hwnd,LPARAM pParam)
{
HWND phWnd = (HWND)pParam; // 指定窗口的句柄
if( NULL==hwnd ){ return FALSE;}
if( ::IsWindow(hwnd) )
{
// 对控件进行操作
ShowWindow(hwnd, SW_HIDE);
}
return TRUE;
}
使用API EnumChildWindows:
::EnumChildWindows(hwnd, HideAllWin, (LPARAM)hwnd);