0

Text limit of an edit control could be set by sending EM_LIMITTEXT Windows message.

Is there some way to request this parameter from an edit control?

Paul
  • 25,812
  • 38
  • 124
  • 247
  • 8
    [`EM_GETLIMITTEXT`](https://learn.microsoft.com/en-us/windows/win32/controls/em-getlimittext) ? – RbMm Sep 08 '20 at 14:15

1 Answers1

2

According to the EM_GETLIMITTEXT:

Parameters

wParam

Not used; must be zero.

lParam

Not used; must be zero.

Return value

The return value is the text limit.

So you can try the following code to get the Text limit:

DWORD size = SendMessage(he, EM_GETLIMITTEXT, 0, 0);
Zeus
  • 3,703
  • 3
  • 7
  • 20