Win32Api GetDlgItemText How make buffer with no fixed size?
Adam D. Ruppe
destructionator at gmail.com
Sat Oct 10 12:31:14 UTC 2020
On Saturday, 10 October 2020 at 10:15:03 UTC, Marcone wrote:
> wchar buffer; // I don't want fixed size :(
wchar buffer; // no fixed size
buffer.length = GetWindowTextLength(hwn); // set it to the text
length of the window
// now get the text
GetDlgItemText(hwn, widget, buffer.ptr, buffer.length);
Use buffer.length instead of buffer.sizeof in D.
More information about the Digitalmars-d-learn