Reputation: 3793
Im trying to get the dialog item text into a buffer. It works with GetDlgItemText()
, but how do i get the length of the text so i can allocate the buffer before i read it in there? I want to be sure i always get the whole text. I could use always for example 10k buffer, but it would be nicer if there wasnt any chance that the user text isnt received completely.
Upvotes: 1
Views: 814
Reputation: 612794
Send the window handle, obtained by calling GetDlgItem
, a WM_GETTEXTLENGTH
message. Or if you prefer call GetWindowTextLength
.
Upvotes: 3