| 56 | int ComboBox::current_index() const { return ComboBox_GetCurSel(m_hwnd); } |
| 57 | |
| 58 | std::wstring ComboBox::current_text() const { |
| 59 | auto length = ComboBox_GetTextLength(m_hwnd); |
| 60 | std::vector<wchar_t> buf(length + 1); |
| 61 | ComboBox_GetText(m_hwnd, buf.data(), static_cast<int>(buf.size())); |
| 62 | return buf.data(); |
| 63 | } |
| 64 | |
| 65 | int ComboBox::current_data() const { return static_cast<int>(ComboBox_GetItemData(m_hwnd, current_index())); } |
| 66 |
no test coverage detected