IXRTextBox::GetMaxLength (Compact 2013)
This method retrieves the value that determines the maximum number of characters allowed for user input.
If pMaxLength is 0, it indicates that there is no restriction on the number of characters.
pMaxLength only restricts the number of characters that a user can input. It does not restrict the programmatic input. If the number of characters programmatically added to the text box is greater than the value of pMaxLength, then the user can delete characters, but not add any. As soon as the number of characters is less than pMaxLength, the user can add text again.
The user is able to undo previous actions and cause the text to exceed the value of pMaxLength.
If the user pastes text into the text box that causes the number of characters to exceed pMaxLength, then the last characters in the text box are deleted.
Surrogate characters are treated as one character for the purposes of determining text length. For more information about surrogate characters, see this Web site.