MCPcopy Create free account
hub / github.com/Predelnik/DSpellCheck / current_text

Method current_text

src/common/WinApiControls.cpp:58–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56int ComboBox::current_index() const { return ComboBox_GetCurSel(m_hwnd); }
57
58std::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
65int ComboBox::current_data() const { return static_cast<int>(ComboBox_GetItemData(m_hwnd, current_index())); }
66

Callers 1

Calls 2

dataMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected