Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. irl like textoutput ..

irl like textoutput ..

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mandalay
    wrote on last edited by
    #1

    i know, i have posted this question some days ago ... but this example : CHARRANGE cr; cr.cpMax = LONG_MAX; cr.cpMin = LONG_MAX; richedit.SetSel( cr ); // move selection to the bottom richedit.ReplaceSel( (LPCSTR)string ); // insert your text // force the rich edit to scroll to the bottom richedit.SendMessage( SB_BOTTOM, NULL, NULL ); doesn't work correctly. (for richedit) Maybe anybody else knows, how ara many clients prints channel text (mIRC, Client, etc... ) it would be better give some examples (full sources of small exampl-programs) ... thanks ---------------------------- never stop coding.

    M 1 Reply Last reply
    0
    • M Mandalay

      i know, i have posted this question some days ago ... but this example : CHARRANGE cr; cr.cpMax = LONG_MAX; cr.cpMin = LONG_MAX; richedit.SetSel( cr ); // move selection to the bottom richedit.ReplaceSel( (LPCSTR)string ); // insert your text // force the rich edit to scroll to the bottom richedit.SendMessage( SB_BOTTOM, NULL, NULL ); doesn't work correctly. (for richedit) Maybe anybody else knows, how ara many clients prints channel text (mIRC, Client, etc... ) it would be better give some examples (full sources of small exampl-programs) ... thanks ---------------------------- never stop coding.

      M Offline
      M Offline
      Mandalay
      wrote on last edited by
      #2

      sorry, the topic is "irc like textoutput" ... nevermind .. ---------------------------- never stop coding.

      R 1 Reply Last reply
      0
      • M Mandalay

        sorry, the topic is "irc like textoutput" ... nevermind .. ---------------------------- never stop coding.

        R Offline
        R Offline
        RobJones
        wrote on last edited by
        #3

        You could try this

        // strMessage is the text you want to send to the edit control
        CString strRecvd;
        m_cRichEdit.GetWindowText(strRecvd);

        if(strRecvd.IsEmpty())
        m_wndMonitor.SetWindowText(strMessage);
        else if(!strRecvd.Right(1).CompareNoCase("\n"))
        m_cRichEdit.SetWindowText(strRecvd + strMessage);
        else
        m_cRichEdit.SetWindowText(strRecvd +"\n"+ strMessage );

        // Scroll the line down
        m_cRichEdit.SetSel(-1, -1);
        m_cRichEdit.SendMessage(EM_SCROLLCARET);

        Hope it helps Rob

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups