开发者

EN_MAXTEXT in Edit and Rich Controls

开发者 https://www.devze.com 2023-02-07 14:29 出处:网络
Is it possible to set a user-defined value for notification rather than checking for default EN_M开发者_开发知识库AXTEXT when control has been completely filled?Unfortunately, no.User-defined notifica

Is it possible to set a user-defined value for notification rather than checking for default EN_M开发者_开发知识库AXTEXT when control has been completely filled?


Unfortunately, no. User-defined notifications do not exist.

Your (painful) alternative is to use the EN_CHANGE notification to notify you that a user has somehow changed the text and do a manual check to determine if it is full. (For example, you could check the line length with the EM_LINELENGTH message.) To receive the EN_CHANGE notification, be sure to specify ENM_CHANGE in the mask sent with the EM_SETEVENTMASK message. (See MSDN.)

Your best bet is to make EN_MAXTEXT work for you.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号