CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2009
    Posts
    7

    Angry Why the ui keep flicker

    I have a project which have three dialog, Let's say A, B, C. And A
    contain B & C, B contains C. They all are inherited from a DialogBase
    class and have a setBitmap function to set a background image.

    And I have add the relationship that every time drag on C, B will drag
    as well. and B is a transparent dialog!

    When onLbuttonDown is triggered, I will set this m_pParent-
    >ModifyStyleEx(0, WS_EX_TRANSPARENT); which make that the B dialog is

    transparent.

    The problem is : if i set this, the dialog B is transparent, but when
    I move the B, it will keep flicker.

    But if i comment m_pParent->ModifyStyleEx(0, WS_EX_TRANSPARENT); Then
    the dialog B will not be transparent, but it will not flicker.

    Can someone give me a solution ? Attached is the sample project that have the flicker problem.
    Attached Files Attached Files

  2. #2
    Join Date
    Sep 2009
    Posts
    4

    Re: Why the ui keep flicker

    Here is a solution to avoid flickering with double buffering:

    http://www.codeproject.com/KB/GDI/flickerfree.aspx

  3. #3
    Join Date
    Mar 2009
    Posts
    7

    Re: Why the ui keep flicker

    Have you ever read my code ?I have used double buffer!

  4. #4
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: Why the ui keep flicker

    According to Ubuntu there is nothing in your rar file, so I can't look in it, but have you tried disabling the EraseBackground function ?

  5. #5
    Join Date
    Mar 2009
    Posts
    7

    Re: Why the ui keep flicker

    I uploaded the project again in zip file, Please help me~~
    Attached Files Attached Files

Tags for this Thread

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