CompuServe Thread

CEdit::LimitText

3 messages in this thread
#30298From: Jeff GalvinJul 8, 1994 1:16 PM
I'm having a problem getting CEdit::LimitText do do anything. I call this function from my OnInitialUpdate, and I've tried calling this function in other places as well. None seem to cause the Edit control to limit user input to the desired length. I'm sure I'm missing something here. Where should I call LimitText??? Thanks in advance for any help! Jeff
#30389From: Charles SteinhardtJul 9, 1994 9:00 PM
Jeff, I assume this is not a multiline edit. What happens if you add the following code AFTER your first call to CDialog::OnInitDialog(). ((CEdit*)GetDlgItem(IDD_YOUREDITBOXID))->LimitText(5); If this doesn't limit the text, send me a copy of your complete OnInitDialog code (only). Charles Steinhardt[MVP], OMG Inc. Written 09-Jul-1994 @ 21:38:01 Windows NavCIS PRO 1.21 !^NavFont01F0017MGHmG48MG4DHG74MGAAHGF40EB1
#30486From: Jeff GalvinJul 11, 1994 7:26 AM
Thanks Charles, I'll give it a try. Jeff