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

Method UpdateResult

source/script2.cpp:5363–5375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5361
5362
5363ResultType InputBoxType::UpdateResult(HWND hControl)
5364{
5365 int space_needed = GetWindowTextLength(hControl) + 1;
5366 // Set up the result buffer.
5367 if ( !(return_string = tmalloc(space_needed)) )
5368 return FAIL; // BIF_InputBox will display an error.
5369 // Write to the variable:
5370 size_t len = (size_t)GetWindowText(hControl, return_string, space_needed);
5371 if (!len)
5372 // There was no text to get or GetWindowText() failed.
5373 *return_string = '\0';
5374 return OK;
5375}
5376
5377
5378

Callers 2

InputBoxProcFunction · 0.80
InputBoxTimeoutFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected