15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


RichEditCtrl scrolling

John Howard Robertson -- jrobert@howard-ind.com
Thursday, January 16, 1997

Environment:  VC++4.2b;Win95

Greetings:

I am using a CRichEditCtrl to display a text file.  This text =
corresponds to "functions" that will be performed by a machine.

My goal is to display the complete text file and position each section =
of text being performed in the vertical center of my control. =20

The text sections are sequential in the file; therefore, I have been =
trying to scroll to or position my cursor on a certain line in my text =
on demand. =20

When using the LineScroll member function of the control, the cursor is =
moved, but the first screen is always displayed.  I attempted setting =
the ECO_AUTOVSCROLL, but to no avail.

I am currently maintaining an array of pointers to the first character =
position of each section.

Any pointers are greatly appreciated.

Thanks,
John Howard Robertson
jrobert@merlin.ebicom.net




Randy Sales -- rsc@halcyon.com
Friday, January 17, 1997

John,

Try EM_SCROLLCARET.  Also make sure the style of the CRichEditCtrl at
creation supports vertically scrolling.

Randy Sales

-- 
RS Consulting
1521 1/2 Cedar Street
Everett, WA 98201

Phone   206-259-1056
Fax     206-259-1315
email   rsc@halcyon.com


John Howard Robertson wrote:
> 
> Environment:  VC++4.2b;Win95
> 
> Greetings:
> 
> I am using a CRichEditCtrl to display a text file.  This text corresponds to "functions" that will be performed by a machine.
> 
> My goal is to display the complete text file and position each section of text being performed in the vertical center of my control.
> 
> The text sections are sequential in the file; therefore, I have been trying to scroll to or position my cursor on a certain line in my text on demand.
> 
> When using the LineScroll member function of the control, the cursor is moved, but the first screen is always displayed.  I attempted setting the ECO_AUTOVSCROLL, but to no avail.
> 
> I am currently maintaining an array of pointers to the first character position of each section.
> 
> Any pointers are greatly appreciated.
> 
> Thanks,
> John Howard Robertson
> jrobert@merlin.ebicom.net




| Вернуться в корень Архива |