GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 04-Nov-2009, 18:41
alice09 alice09 is offline
New Member
 
Join Date: Oct 2009
Posts: 6
alice09 is on a distinguished road

Set maximum length for EditControl (text box)


Hi all,

I now using Visual C++ (Visual Studio 2005) for my project. i face some problem in set the maximum length for my edit control(text box).

i have 3 edit control in the same dialog. i want set the maximum length for each edit control = 5.

following are the 3 ID of edit control in same dialog:
IDC_EDIT_MCNO
IDC_EDIT_MCSERIALNO
IDC_EDIT_LOCATION

The dialog ID is: IDD_MACHINE

Please guide me for set max length.

Thanks very for your help. i will very appreciate.

Regards:
Alice
  #2  
Old 04-Nov-2009, 19:34
TurboPT's Avatar
TurboPT TurboPT is offline
Senior Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 1,233
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: Set maximum length for EditControl (text box)


There is a 'maxlength' property in the Behavior category. That should be all you need to change. (looks like the default is 32767)
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
  #3  
Old 04-Nov-2009, 19:49
alice09 alice09 is offline
New Member
 
Join Date: Oct 2009
Posts: 6
alice09 is on a distinguished road

Re: Set maximum length for EditControl (text box)


Hi TurboPT,

Thanks for your reply.^^

I could not found any 'maxlength' property in the Behavior category..
I think need to write the code for it..
Can u show me some guide by writing code?

I very appreciate your helped.
Thanks again^^

regards:
alice
 
 

Recent GIDBlogProblems with the Navy (Officers) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Power Calibration Error In Nero Fix (hopefully) matt3678 Computer Hardware Forum 60 20-Aug-2009 05:04
Str_Misaligned in Double Link List Peter_APIIT C Programming Language 1 29-Feb-2008 20:50
Having a problem Chuckles Computer Hardware Forum 19 13-Sep-2004 12:17
CD burner wont burn!! robertli55 Computer Hardware Forum 1 18-Jun-2004 10:53
Yet another CD burner problem: Lite-On LSC-24082K Erwin Computer Hardware Forum 1 22-May-2004 11:28

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 14:18.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.