MCPcopy Create free account
hub / github.com/apache/arrow / GetText

Method GetText

cpp/src/arrow/flight/sql/odbc/odbc_impl/ui/window.cc:277–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275}
276
277void Window::GetText(std::wstring& text) const {
278 if (!IsEnabled()) {
279 text.clear();
280
281 return;
282 }
283
284 int len = GetWindowTextLength(handle_);
285
286 if (len <= 0) {
287 text.clear();
288
289 return;
290 }
291
292 text.resize(len + 1);
293
294 if (!GetWindowText(handle_, &text[0], len + 1)) text.clear();
295
296 text.resize(len);
297 boost::algorithm::trim(text);
298}
299
300void Window::SetText(const std::wstring& text) const {
301 SNDMSG(handle_, WM_SETTEXT, 0, reinterpret_cast<LPARAM>(text.c_str()));

Callers 2

SaveParametersMethod · 0.80
OnMessageMethod · 0.80

Calls 3

IsEnabledFunction · 0.85
resizeMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected