EM_SETLIMITTEXT(MSDN)

EM_SETLIMITTEXT

An application sends the EM_SETLIMITTEXT message to set the text limit for an edit control. The text limit is the maximum amount of text, in bytes, that the edit control can contain. Remember that in the ANSI character set, each character is one byte, and in the Unicode character set, each character is two bytes.

EM_SETLIMITTEXT 
wParam = (WPARAM) cchMax;    // new text limits, in characters 
lParam = 0;                  // not used, must be zero 
 
Parameters
cchMax
Value of wParam. Specifies the new text limit, in characters. If this parameter is 0, the system sets the maximum text limit. For more information, see Remarks.
Return Values

This message does not return a value.

Remarks

Windows NT: For single-line edit controls, the text limit is either 0x7FFFFFFE bytes or the value of the wParam parameter, whichever is smaller. For multiline edit controls, this value is either 0xFFFFFFFF bytes or the value of the wParam parameter, whichever is smaller.

Windows 95 and Windows 98: For single-line edit controls, the text limit is either 0x7FFE bytes or the value of the wParam parameter, whichever is smaller. For multiline edit controls, this value is either 0xFFFF bytes or the value of the wParam parameter, whichever is smaller.

QuickInfo

  Windows NT: Requires version 4.0 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Requires version 1.0 or later.
  Header: Declared in winuser.h.

See Also
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值