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. CStaic SetWindowText() blinking problem [Solved]

CStaic SetWindowText() blinking problem [Solved]

Scheduled Pinned Locked Moved C / C++ / MFC
questionadobehelp
6 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.
  • E Offline
    E Offline
    econy
    wrote on last edited by
    #1

    Hi, in my program,I use a CStatic object to flash a string every 3-4 seconds. But I found, sometimes the string is blinking. How can I flash the string and don't have jitter phenomenon?

    D 1 Reply Last reply
    0
    • E econy

      Hi, in my program,I use a CStatic object to flash a string every 3-4 seconds. But I found, sometimes the string is blinking. How can I flash the string and don't have jitter phenomenon?

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Define flash and blink. In my book, they are synonymous. Where are you setting the CStatic object's value at?

      "One man's wage rise is another man's price increase." - Harold Wilson

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

      E 1 Reply Last reply
      0
      • D David Crow

        Define flash and blink. In my book, they are synonymous. Where are you setting the CStatic object's value at?

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

        E Offline
        E Offline
        econy
        wrote on last edited by
        #3

        I want to show the string like the follow sequence: 0 - 4 Second: Display string 4 - 8 second: Display nothing,clear screen 8 - 12 second: Display string 12-16 second: Display nothing,clear screen ... Now I found the string blinking during 0-4,8-12 seconds.

        C 1 Reply Last reply
        0
        • E econy

          I want to show the string like the follow sequence: 0 - 4 Second: Display string 4 - 8 second: Display nothing,clear screen 8 - 12 second: Display string 12-16 second: Display nothing,clear screen ... Now I found the string blinking during 0-4,8-12 seconds.

          C Offline
          C Offline
          CPallini
          wrote on last edited by
          #4

          It looks your text flickers because you are repeadetly drawing the string. In the 0-4 (and 8-12) interval you have to draw the string just once. You could set a boolean variable the very first time you draw the string and then check it before drawing it again (of course you have to reset the boolean variable upon entering in the 'blank' interval).

          Veni, vidi, vici.

          E 1 Reply Last reply
          0
          • C CPallini

            It looks your text flickers because you are repeadetly drawing the string. In the 0-4 (and 8-12) interval you have to draw the string just once. You could set a boolean variable the very first time you draw the string and then check it before drawing it again (of course you have to reset the boolean variable upon entering in the 'blank' interval).

            Veni, vidi, vici.

            E Offline
            E Offline
            econy
            wrote on last edited by
            #5

            Thanks

            C 1 Reply Last reply
            0
            • E econy

              Thanks

              C Offline
              C Offline
              CPallini
              wrote on last edited by
              #6

              You are welcome.

              Veni, vidi, vici.

              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