Thread: Need help with edit box and vert scroll

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I mean, through SetWindowText. You can set the textbox's text.
    EM_GETLINE:
    Copies a line of text from an edit control and places it in a specified buffer. You can send this message to either an edit control or a rich edit control.
    Basically means you need to set the text first using SetWindowText.

    I mean, if you set a text to an edit with SetWindowText, it will redraw itself automatically when it needs to (actually, it will always redraw itself, but in case it has any text, it will redraw the text of course).

    A screenshot is possible, too... I'm not sure how to do, but maybe something like getting the textbox's dc and bliting it to a bitmap? And then bliting it back?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  2. #2
    Registered User
    Join Date
    Dec 2007
    Posts
    9
    Yes blting it back, I was being funny and I looked into that earlier last night and it's not worth the performance hit.

    Yes SetWindowText, I used that and the flicker was so horrible it was unreadable. This data is coming in off my socket and I'm outputting the translated data to an edit box so the user can search and save it to disk, all the functions of an edit box.

    Mirc is the perfect example I keep neglecting to mention, just like Mirc does and I presently have it as a MDI. But you know how mirc can be scrolled back and forth and data added to it. I find it really hard to believe he's doing a SetWindowText with every incoming line of text?? Seems the buffer would eventually get too large for good function. But I can't find any examples like mirc out there, an edit box that can be searched, highlighted, saved to disk and redrawn.

    Also, using SetWindowText, you just keep updating the scrollbar to the bottom I assume?

    I appreciate your correspondence, Elysia and I apologize for my GUI newbiness, this is my weak area.

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    9
    After reading what you wrote and looking up some examples of SetWindowText on edits, I was thinking maybe I can continue using TextOut or DrawText while the window is at the top of the z pos but if it gets covered and then uncovered, I could do a GetWindowText and a SetWindowText and continue on processing my data with the GDI funcs.

    Maybe that wouldnt be as hard a hit on performance, what do you think?

    I just wish I had a good mirc example as yeah I need to switch text colors on some lines using ExtText and PolyText.

    I never dreamed this project would have turned into this *sigh*

Popular pages Recent additions subscribe to a feed