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. View with color txt added automatically by one thread,No flash and auto scrolling

View with color txt added automatically by one thread,No flash and auto scrolling

Scheduled Pinned Locked Moved C / C++ / MFC
csharpvisual-studioadobedebugginghelp
3 Posts 3 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.
  • P Offline
    P Offline
    PaulKvm
    wrote on last edited by
    #1

    I need to create one edit view which could be able to add different color txt automatially(actually by another thread). act like a monitor to monitor the message from serialport or tcp; The message displayed shall be able have different color to make it has different meanings;(if different font is support is better) Also when user scrolls up, it could stay at that scroll position, it did not scroll down automatically when new message arrived. User could select and copy the txt; When user scroll down to the last line, it could scroll down automatically to the last line when background message is arrived; when scrolling, it did not flash(twinkle); I have tried EditView & Richedit, all failed, the new txt added is by ReplaceSel, which will make the content auto scroll down to the last line, and user could not do Selection and copy when new txt added; I have found the Visual Studio Trace window, it could add message automatially and user could easily select txt even when new txt added. I am not sure how to realize it, this thing has bothered me a lot time, please someone could help me about this. Very appricate of your help;

    L L 2 Replies Last reply
    0
    • P PaulKvm

      I need to create one edit view which could be able to add different color txt automatially(actually by another thread). act like a monitor to monitor the message from serialport or tcp; The message displayed shall be able have different color to make it has different meanings;(if different font is support is better) Also when user scrolls up, it could stay at that scroll position, it did not scroll down automatically when new message arrived. User could select and copy the txt; When user scroll down to the last line, it could scroll down automatically to the last line when background message is arrived; when scrolling, it did not flash(twinkle); I have tried EditView & Richedit, all failed, the new txt added is by ReplaceSel, which will make the content auto scroll down to the last line, and user could not do Selection and copy when new txt added; I have found the Visual Studio Trace window, it could add message automatially and user could easily select txt even when new txt added. I am not sure how to realize it, this thing has bothered me a lot time, please someone could help me about this. Very appricate of your help;

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      You could try subclassing the EditView so you can have greater control over the movement of text and the actual display. Alternatively you may need to create your own View class which will be specific to your requirements.

      1 Reply Last reply
      0
      • P PaulKvm

        I need to create one edit view which could be able to add different color txt automatially(actually by another thread). act like a monitor to monitor the message from serialport or tcp; The message displayed shall be able have different color to make it has different meanings;(if different font is support is better) Also when user scrolls up, it could stay at that scroll position, it did not scroll down automatically when new message arrived. User could select and copy the txt; When user scroll down to the last line, it could scroll down automatically to the last line when background message is arrived; when scrolling, it did not flash(twinkle); I have tried EditView & Richedit, all failed, the new txt added is by ReplaceSel, which will make the content auto scroll down to the last line, and user could not do Selection and copy when new txt added; I have found the Visual Studio Trace window, it could add message automatially and user could easily select txt even when new txt added. I am not sure how to realize it, this thing has bothered me a lot time, please someone could help me about this. Very appricate of your help;

        L Offline
        L Offline
        leon de boer
        wrote on last edited by
        #3

        Do the obvious thing start by looking at something like NotePad++ which the source code is open. http://notepad-plus-plus.org/[^]

        In vino veritas

        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