MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / ControlGetEdit

Method ControlGetEdit

source/script_gui.cpp:1850–1865  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1848
1849
1850ResultType GuiType::ControlGetEdit(ResultToken &aResultToken, GuiControlType &aControl)
1851// Only called by Edit.Value, so aTranslateEOL == true is implied.
1852{
1853 if (!ControlGetWindowText(aResultToken, aControl))
1854 return FAIL;
1855 if (GetWindowLong(aControl.hwnd, GWL_STYLE) & ES_MULTILINE) // For consistency with ControlSetEdit().
1856 {
1857 // Auto-translate CRLF to LF for better compatibility with other script commands.
1858 // Since edit controls tend to have many hard returns in them, use SCS_SENSITIVE to
1859 // enhance performance. This performance gain is extreme when the control contains
1860 // thousands of CRLFs:
1861 StrReplace(aResultToken.marker, _T("\r\n"), _T("\n"), SCS_SENSITIVE
1862 , -1, -1, NULL, &aResultToken.marker_length); // Pass &marker_length to improve performance and (more importantly) update it.
1863 }
1864 return OK;
1865}
1866
1867
1868ResultType GuiType::ControlSetDateTime(GuiControlType &aControl, LPTSTR aContents, ResultToken &aResultToken)

Callers

nothing calls this directly

Calls 1

StrReplaceFunction · 0.85

Tested by

no test coverage detected