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. How to scroll text ?

How to scroll text ?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialc++helpquestion
5 Posts 5 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.
  • A Offline
    A Offline
    Amarelia
    wrote on last edited by
    #1

    Hi I want a MFC application in which I want to scroll some text. Also sometime text might be long and sometimes it might be short. Also Font size of text might need to be as big as 200. So is there a way to do it ? I tried using CBannerStatic example given in this site, but problem occurs when i make my text size big. It stops scrolling and consumes 100% CPU making other application work very very slow. So I want to make it myself and text shold scroll smothly without any flickering.....is there a way to do this ? Thankx a lot in advance Amarelia Maehsh Gujarat India

    T S M J 4 Replies Last reply
    0
    • A Amarelia

      Hi I want a MFC application in which I want to scroll some text. Also sometime text might be long and sometimes it might be short. Also Font size of text might need to be as big as 200. So is there a way to do it ? I tried using CBannerStatic example given in this site, but problem occurs when i make my text size big. It stops scrolling and consumes 100% CPU making other application work very very slow. So I want to make it myself and text shold scroll smothly without any flickering.....is there a way to do this ? Thankx a lot in advance Amarelia Maehsh Gujarat India

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      still on the same problem since more than one month ?! :confused: :omg::wtf::~


      TOXCCT >>> GEII power
      [toxcct][VisualCalc]

      1 Reply Last reply
      0
      • A Amarelia

        Hi I want a MFC application in which I want to scroll some text. Also sometime text might be long and sometimes it might be short. Also Font size of text might need to be as big as 200. So is there a way to do it ? I tried using CBannerStatic example given in this site, but problem occurs when i make my text size big. It stops scrolling and consumes 100% CPU making other application work very very slow. So I want to make it myself and text shold scroll smothly without any flickering.....is there a way to do this ? Thankx a lot in advance Amarelia Maehsh Gujarat India

        S Offline
        S Offline
        S Douglas
        wrote on last edited by
        #3

        I have used this one AIM-Style Scrolling Banner Control [^]and found it to work fairly well. Either way, why note dissect the code locate the problem and let the author know. Most authors seem to enjoy others helping them with their projects.


        DEBUGGING : Removing the needles from the haystack.

        1 Reply Last reply
        0
        • A Amarelia

          Hi I want a MFC application in which I want to scroll some text. Also sometime text might be long and sometimes it might be short. Also Font size of text might need to be as big as 200. So is there a way to do it ? I tried using CBannerStatic example given in this site, but problem occurs when i make my text size big. It stops scrolling and consumes 100% CPU making other application work very very slow. So I want to make it myself and text shold scroll smothly without any flickering.....is there a way to do this ? Thankx a lot in advance Amarelia Maehsh Gujarat India

          M Offline
          M Offline
          Mathieu Dijkstra
          wrote on last edited by
          #4

          :laugh:if dit a bit research and kame up hith this progy its basicly a simple scrol text not supper fine but it choud wordk if you make it further trik is in this void CScrolDlg::OnBUTTONstartStop() { // TODO: Add your control notification handler code here m_Scroltextje = m_InputTextVariabel; m_scrollengt = m_Scroltextje.GetLength(); m_scrollengt = m_scrollengt -1 ; //er 1 van af halen // m_Scroltextje.Delete(m_scrollengt,1);// this is for if the scrol text choud end m_Scroltextje.Delete(0,m_scrollengt+1);// this is for if the begin of the scrol text // 0=this is the position in text // scrolltext+1 = amoud of charackters wat must be deleted UpdateData(FALSE); } but you have to do make it a litle completer i cant do al the work 4 u but basicly it works simple like this her is the link for hole litle project i make http://www.palcopy.com/down_load/scrol.zip[^] you have to do the scrol in a timer function thats all i think you can figure it out this way greetings to al of you -- modified at 8:11 Thursday 10th November, 2005

          1 Reply Last reply
          0
          • A Amarelia

            Hi I want a MFC application in which I want to scroll some text. Also sometime text might be long and sometimes it might be short. Also Font size of text might need to be as big as 200. So is there a way to do it ? I tried using CBannerStatic example given in this site, but problem occurs when i make my text size big. It stops scrolling and consumes 100% CPU making other application work very very slow. So I want to make it myself and text shold scroll smothly without any flickering.....is there a way to do this ? Thankx a lot in advance Amarelia Maehsh Gujarat India

            J Offline
            J Offline
            John R Shaw
            wrote on last edited by
            #5

            Amarelia wrote:

            So is there a way to do it ?

            Of course there is, but it can become complicated. Only print the part of the text that needs to be seen and nothing else. That is you need to know: which is the first visible character and what its x coordinate is, as well as which visible character is last. Check out GetTextExtent() amongst others. Oh, one last note: The Windows text output functions states that they are limited to 8192 characters. That's not exactly true, the number of characters depend on the size of the font; in otherwords, the total number of pixels in the string length is limited to 32767. INTP Every thing is relative...

            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