| 48 | } |
| 49 | |
| 50 | HWND WindowUtilities::GetChildWindow(HWND parent_window_handle, |
| 51 | std::wstring window_class) { |
| 52 | std::vector<wchar_t> class_name_buffer(window_class.size() + 1); |
| 53 | HWND hwndtmp = GetWindow(parent_window_handle, GW_CHILD); |
| 54 | while (hwndtmp != NULL) { |
| 55 | ::GetClassName(hwndtmp, |
| 56 | &class_name_buffer[0], |
| 57 | static_cast<int>(class_name_buffer.size())); |
| 58 | std::wstring actual_class = &class_name_buffer[0]; |
| 59 | if (window_class == actual_class) { |
| 60 | return hwndtmp; |
| 61 | } |
| 62 | hwndtmp = GetWindow(hwndtmp, GW_HWNDNEXT); |
| 63 | } |
| 64 | return NULL; |
| 65 | } |
| 66 | |
| 67 | std::string WindowUtilities::GetWindowCaption(HWND window_handle) { |
| 68 | std::wstring window_caption = L""; |
nothing calls this directly
no test coverage detected