Solved

Limit text in CEdit control

Posted on 1997-10-22
3
480 Views
Last Modified: 2013-11-20
I've a CEdit control in a View derived from CFormView.
I've declared a variable m_edit, pointer to CEdit assigned in DoDataExchange.

I call the function m_edit.SetLimitText(LIMIT);
It doesn't works.

I've tried creating the control by myself and it was ok, but
I need to use the derived control instead of this.

Thanks
0
Comment
Question by:css
3 Comments
 
LVL 8

Accepted Solution

by:
gelbert earned 10 total points
ID: 1308607
Try to use ((CEdit*)GetDlgItem(ID_EDIT_CONTROL))->SetTextLimit(LIMIT) in OnInitialUpdate() for example, where ID_EDIT_CONTROL - is ID of your edit control in dialog template
0
 
LVL 3

Expert Comment

by:shaig
ID: 1308608
You can also set this value through the class-wizard, member variables page.
0
 
LVL 4

Expert Comment

by:jtwine100697
ID: 1308609
1) Make sure that you are doing a correct DDX_CONTROL in the DoDataExchange.

2) Remember that changing the text limit does not effect text that is already in the control, meaning, it will not truncate it.

-=- James.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need to retreive data from .TFS file exported by DVR 8 221
Get filename and folder into excel 7 79
Generic progress indicator 6 117
zeroFront challenge 7 114
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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 video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

828 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