CStatic control flicker only when running with Windows Classic theme - Page 2
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20

Thread: CStatic control flicker only when running with Windows Classic theme

  1. #16
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,836

    Re: CStatic control flicker only when running with Windows Classic theme

    Quote Originally Posted by ovidiucucu View Post
    ...while fixing major UI display issues needs much bigger asteroids.
    This is what happened to dinosaurs. One of the dinosaurs wanted to really overhaul JurassicOS version 472.12, but the asteroid needed to fix that UI problem was so big that it wiped out all of them in the process.

  2. #17
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    827

    Re: CStatic control flicker only when running with Windows Classic theme

    @ovidiucucu: Your approach might be interesting. Unfortunately it's too late for me to try. As I said in the post #4 above I fixed it by doing the owner-drawn rendering with double-buffering, which completely takes out the flicker. If you update my test project and post it here I will run it on my test OS and tell you if your method fixes it as well or not.

    As for comments about my method breaking something in the future, then I don't think so. I'm not doing anything extraordinary to cause that:

    While processing WM_DRAWITEM:
    1. The background is erased with the COLOR_3DFACE brush.
    2. The text is drawn on top of it (using the font selected in the original control.)
    3. Then the resulting memory DC in bitblt'ed to the actual control's DC.

    That's it. And as I said the WM_ERASEBACKGROUND is stunted by simply returning TRUE in the subclass for the static control.

  3. #18
    ovidiucucu's Avatar
    ovidiucucu is offline Moderator/Reviewer Power Poster
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,021

    Re: CStatic control flicker only when running with Windows Classic theme

    Quote Originally Posted by OReubens View Post
    This is what happened to dinosaurs. One of the dinosaurs wanted to really overhaul JurassicOS version 472.12, but the asteroid needed to fix that UI problem was so big that it wiped out all of them in the process.
    Absolutely right!
    The mighty dinosaurs died while trying to resolve big UI issues in Cretaceous (or Jurassic *NIX-based ) Systems.
    But a few humble mammals, fixing much more trivial UI things underground, survived.
    That's the reason we are now, here.


    Quote Originally Posted by dc_2000 View Post
    @ovidiucucu: Your approach might be interesting. Unfortunately it's too late...
    Generally speaking:
    Never say "too late" for an easier and/or better solution!
    Ovidiu Cucu
    "When in Rome, do as Romans do."
    Visit: Microsoft Virtual Academy
    Follow: https://twitter.com/#!/ovidiucucu
    My blog: http://codexpert.ro/blog/author/ovidiu-cucu/

  4. #19
    Join Date
    Jul 2002
    Posts
    2,512

    Re: CStatic control flicker only when running with Windows Classic theme

    This thread is about asteroids and dinosaurs. Somebody talks about programming problems - where is the forum moderator?

  5. #20
    ovidiucucu's Avatar
    ovidiucucu is offline Moderator/Reviewer Power Poster
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,021

    Re: CStatic control flicker only when running with Windows Classic theme

    Quote Originally Posted by Alex F View Post
    This thread is about asteroids and dinosaurs. Somebody talks about programming problems - where is the forum moderator?
    Here I am (one of them).
    Well, we were talking (in other words) about how important is to fix (relatively) small UI issues like the one from OP. IMO, not totally off-topic and nothing able to hurt.
    So, no reason to ban someone, including me.
    Last edited by ovidiucucu; November 23rd, 2013 at 10:47 AM.
    Ovidiu Cucu
    "When in Rome, do as Romans do."
    Visit: Microsoft Virtual Academy
    Follow: https://twitter.com/#!/ovidiucucu
    My blog: http://codexpert.ro/blog/author/ovidiu-cucu/

Page 2 of 2 FirstFirst 12

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center