hi,
I work with a modeless dialog that contains a multiline edit control created with:
ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL
processing EN_KILLFOCUS I can set text by: SetDlgItemText(), append text with: EM_REPLACESEL and retreave the content of the control using: GetDlgItemText(). everything works fine.
but I'm unable to determine the length of the text in the control to allocate memory. neither:
cr.cpMin=0;
cr.cpMax=-1;
SendMessage((HWND)lP, EM_EXSETSEL, 0, (LPARAM)&cr);
nor:
gtl.flags = GTL_NUMCHARS | GTL_PRECISE | GTL_USECRLF;
gtl.codepage = CP_ACP;
len = SendMessage((HWND)lP, EM_GETTEXTLENGTHEX, (WPARAM)>l, (LPARAM)0);
both methodes failed to get the size.
any hint or comment would be great,
thank you