` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Limiting number of characters entered in a field
2006-12-15 -- Larry Sand
 
If you want to limit the text box to n characters you can send it the Edit Message: EM_LIMITTEXT Like this: SendMessage(hWndText, EM_LIMITTEXT, nTextLimit, 0) hWndText is the handle to the text box, ?textbox{Prop:Handle} EM_LIMITTEXT EQUATE(00C5h) nTextLimit is the number of characters. This does not require that you subclass the text box. If you want to know the number of characters as they're typed you can subclass the control and watch for the Edit Notification message EN_CHANGE. Edit notification messages are sent in a WM_COMMAND message.


Today is November 21, 2024, 6:46 am
This article has been viewed 35231 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: