Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ MFC
Hi! Experts,
 
please do the needful on my query.
 
In RichEditControl, i'm accommodating 24 lines(horizontally).
When 25th line enters, the 1st line should become as non editable. similary whenever new line is adding on the bottom, the top most should go in non editable part. How to solve this ?
Please give me the idea or sample if possible.
 
Thanks
Sam
Posted 3-Apr-13 19:31pm
Mr Sam700
Edited 3-Apr-13 23:38pm
v3
Comments
Mohibur Rashid at 4-Apr-13 0:54am
   
I looked for it in google. there is no built in solution. But you can fix this issue programmatically. Before you let the character to be printed make sure they are not your readonly part area....
Mr Sam at 4-Apr-13 1:17am
   
Thanks Rashid. I'm trying.
Mohibur Rashid at 4-Apr-13 1:32am
   
In more detail. At beginning keep your readonlyarea=0, when your character count read to 25, then change your read only area to 25 i.e. readonlyarea=25. and check if the user cursor position is less than readonlyarea, if so, don't let the character to be inserted. this way keep incrementing your count.
Mr Sam at 4-Apr-13 5:26am
   
Any other solutions plz ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 277
1 Maciej Los 210
2 BillWoodruff 205
3 Jochen Arndt 180
4 Sergey Alexandrovich Kryukov 165
0 OriginalGriff 5,130
1 DamithSL 4,157
2 Maciej Los 3,650
3 Kornfeld Eliyahu Peter 3,460
4 Sergey Alexandrovich Kryukov 2,811


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 4 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100