枚举所有窗口做事
#include <functional>
int DoWork(const std::function<int(HWND, void*)>& cb, void* pv)
{
for (HWND hWnd = ::GetWindow(::GetDesktopWindow(), GW_CHILD); (hWnd != NULL); hWnd = ::GetNextWindow(hWnd, GW_HWNDNEXT))if (cb != nullptr)cb(hWnd, pv);
return(0);
}