| 141 | } |
| 142 | |
| 143 | void GetAllWindowsByProcessID(DWORD dwProcessID, std::vector<HWND>& vhWnds) { |
| 144 | HWND hCurWnd = nullptr; |
| 145 | do |
| 146 | { |
| 147 | hCurWnd = FindWindowEx(nullptr, hCurWnd, nullptr, nullptr); |
| 148 | if (hCurWnd != nullptr) |
| 149 | { |
| 150 | DWORD processID = 0; |
| 151 | GetWindowThreadProcessId(hCurWnd, &processID); |
| 152 | if (processID == dwProcessID) |
| 153 | { |
| 154 | vhWnds.push_back(hCurWnd); |
| 155 | } |
| 156 | } |
| 157 | } while (hCurWnd != nullptr); |
| 158 | } |
| 159 | |
| 160 | const theme_cfg* LoadThemeConfig() { |
| 161 | static BOOL config_loaded = FALSE; |