Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

how do i scroll an edit window and keep the lower text in view.?

kevanwoodcockkevanwoodcock Posts: 172Member
Hi
I have created an edit window and i can send text to it. The problem is the text scrolls off the bottom of the window and out of view. I want to keep the most recent text in view and have the window scroll. This will cause the top part of the edit window text to scroll up out of view but keep the lower , most recent text in view. Here are the styles i am using if that is the problem.

WS_THICKFRAME | WS_SIZEBOX | WS_THICKFRAME | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL |ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL ,

Any suggestions anybody?

Cheers
kev

Comments

  • CyGuyCyGuy Posts: 312Member
    : Hi
    : I have created an edit window and i can send text to it. The problem is the text scrolls off the bottom of the window and out of view. I want to keep the most recent text in view and have the window scroll. This will cause the top part of the edit window text to scroll up out of view but keep the lower , most recent text in view. Here are the styles i am using if that is the problem.
    :
    : WS_THICKFRAME | WS_SIZEBOX | WS_THICKFRAME | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL |ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL ,
    :
    : Any suggestions anybody?
    :
    : Cheers
    : kev
    :
    :
    I am no MS expert, but if MSDN.microsoft.com can not help, then I suggest writting the code yourself. To make a seperate view port,
    1. determine the coordinates in the window you want this text to stay
    min and max
    2. every time you get a scroll event, write over what is in those coordinates with the text that you want to stay

  • AsmGuru62AsmGuru62 Posts: 6,519Member
    [blue]To add text into a box use EM_REPLACESEL message and that will solve it.[/blue]
  • kevanwoodcockkevanwoodcock Posts: 172Member
    : [blue]To add text into a box use EM_REPLACESEL message and that will solve it.[/blue]
    :


    Thanks to you both. It doesnt seem like there is an easy solution to keeping the edit window text displaying the most current. Presently i keep appending to a text string and then write that to the edit window. I just keep using strcat() to add a new line of text to the previouse. when the text string gets too long to fit on one page / window it disapears of the bottom of the edit window. I need to keep the end of the string in the visable window space. I was hoping that i could make the window scrole down so always keepign the end of the text in view. But it desnt seen to be an eas fix. ??

    Is there a better option than usign an edit window perhpas? I chose the edit window because after my worker functon has finished , all the text sent to the edit window is avialable for viewign by scolling the scrole bars on the side. That is important too.

    Any more thoughts?

    cheers
    kev

Sign In or Register to comment.