Get maximum editor length that has been set by EM_LIMITTEXT

253 views Asked by At

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?

1

There are 1 answers

0
Zeus On BEST ANSWER

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);