Solved

Line length in a multiple line CEdit control

Posted on 2001-08-08
2
262 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

707 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

18 Experts available now in Live!

Get 1:1 Help Now