CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2017
    Posts
    6

    [RESOLVED] Updating a Static 'Text' Control without flicker ?

    Hi All,

    I have a simple input/output loop that updates a static control on each iteration, I'm seeing a lot of flickering which I don't like, the behaviour I'm looking for is like that of a static text control with the SS_SIMPLE style set, text is rendered without flickering, presumably without erasing the background? however there will be times where I would like to erase the background and completely reset the text... How can this be achieved ?

    Many thanks in advance!

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,395

    Re: Updating a Static 'Text' Control without flicker ?

    How often do you refresh this static control? Every second?, Millisecond?
    Victor Nijegorodov

  3. #3
    Join Date
    Dec 2017
    Posts
    6

    Re: Updating a Static 'Text' Control without flicker ?

    Every Millisecond or so, I haven't managed to reduce the he flicking by updating less frequently but there still remains flicker... Would this be a owner drawn solution ?

  4. #4
    Join Date
    Dec 2017
    Posts
    6

    Re: Updating a Static 'Text' Control without flicker ?

    Edit: I have managed *

  5. #5
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,395

    Re: Updating a Static 'Text' Control without flicker ?

    Quote Originally Posted by Danage View Post
    Every Millisecond or so, I haven't managed to reduce the he flicking by updating less frequently but there still remains flicker... Would this be a owner drawn solution ?
    But it is senseless to it so often!
    Try to update it in response to WM_TIMER every second.
    Victor Nijegorodov

  6. #6
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,395

    Re: Updating a Static 'Text' Control without flicker ?

    Quote Originally Posted by Danage View Post
    Edit: I have managed *
    Good to know it!
    And how?
    Victor Nijegorodov

  7. #7
    Join Date
    Dec 2017
    Posts
    6

    Re: Updating a Static 'Text' Control without flicker ?

    And how?
    A second was a little to slow for me, worker thread Posts() a user defined message to the GUI every half a second or so... zero flicker!! Many thanks for your time Victor! Merry Christmas and happy new year to you!

  8. #8
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,395

    Re: [RESOLVED] Updating a Static 'Text' Control without flicker ?

    You are welcome!
    And I wish you happy new year and Merry Christmas too!
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured