| 263 | } |
| 264 | |
| 265 | void Window::AddTab(const std::wstring& name, int index) { |
| 266 | TCITEM tab_control_item; |
| 267 | tab_control_item.mask = TCIF_TEXT | TCIF_IMAGE; |
| 268 | tab_control_item.iImage = -1; |
| 269 | tab_control_item.pszText = const_cast<wchar_t*>(name.c_str()); |
| 270 | if (TabCtrl_InsertItem(handle_, index, &tab_control_item) == -1) { |
| 271 | std::stringstream buf; |
| 272 | buf << "Can not add tab, error code: " << GetLastError(); |
| 273 | throw DriverException(buf.str()); |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | void Window::GetText(std::wstring& text) const { |
| 278 | if (!IsEnabled()) { |
no test coverage detected