◄Message Group► ◄Overview► ◄Changes► ◄Up► ◄Next► ◄Previous► ──────────────────────────────────────────────────────────────────────────── #define INCL_WINENTRYFIELDS EM_SETTEXTLIMIT mp1 = MPFROMSHORT((SHORT) cchMax); /* max. number of bytes */ mp2 = 0L; /* not used, must be zero */ An application sends an EM_SETTEXTLIMIT message to set the maximum number of bytes an entry-field control can contain. Parameter Description ──────────────────────────────────────────────────────────────────────────── cchMax Low word of mp1. Specifies the maximum number of bytes an entry field can hold. Return Value The return value is TRUE if the operation is successful or FALSE if there is not enough memory to hold the requested number of characters. Comments Sending an EM_SETTEXTLIMIT message causes memory to be allocated from the control heap for the specified maximum number of bytes. Failure to allocate sufficient memory results in a WM_CONTROL message, with the EN_MEMERROR notification code being sent to the owner window. See Also WM_CONTROL ♦