
Go To Line Number (in RichTextBox)
Excuse my ignorance, but, let's say I have a form which gives me a number of
lines to scroll (lgTotal), how do I use EM_LineScroll?
David Wier
Quote:
>You guys should use the EM_LINESCROLL message.
>wParam = # to scroll horiz.
>lParam = # to scroll vert.
>--
>Richard Cardarelle
>Eclipse Applications
>www.eclipseapplications.com
>> Actually, yes, the reason I wrote this email is because I have been
trying
>> off & on for days trying to do this somehow, but apparently, my logic
>> knowledge can't see a good way to do it.
>> If you have some code that will work I would most appreciate it.
>> --
>> > I don't think there's a build in function for that. You will have to
>> create
>> > your own code.
>> > One method is to search for the line position and stop the exit the
loop
>> > when the wanted line number is reached. Of course, this can be
optimized
>> by
>> > starting somewhere in the middle of the text.
>> > Let me know if you want some code for this
>> > > I've got a Rich Text box and I know that using the GetLineFromChar
>> method,
>> > > you can get the line number of where your cursor is, but I've had a
>> really
>> > > hard time trying to figure out how to implement a 'Go To Line Number'
>> type
>> > > of procedure.
>> > > Does anyone have any idea or code on how to do this?