Solved

Line length in a multiple line CEdit control

Posted on 2001-08-08
2
263 Views
Last Modified: 2013-11-20
Is there any way to set the line length limit in a multiple line CEdit control?
For example: The user is only allowed to write each line with maximum 50 chars, and for example maximum 50 lines.
0
Comment
Question by:JensHell
2 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 50 total points
ID: 6365302
No but you can still accomplish the same thing:

1) Derive your own class from CEdit, say CMyEdit

2) Override the OnChar member function for your CMyEdit

3) Each time OnChar is called, check the length of the text in the control and do whatever (beep, truncate, etc.) if it's more than 50 chars long
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9521156
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by: jhance

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Roshan Davis
EE Cleanup Volunteer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now