CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Posts
    18

    Flickering Problem in VC++

    Hello,

    I've created a MFC based VC++ Dialog application. I set green color as background for the dialog by overriding the OnCtlColor method.

    I've three ActiveX Controls( Rounded Rectangle, Rectangle, Line) and i'll move these based on the value i read from the device.

    I'm using the following function call to move these controls

    ::SetWindowPos(<Controlhandle>, HWND_TOP, objLineRect.left ,lMovePos - nCenter, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW);

    These controls are flickering when it is moved from one place to another.
    I move these controls 5 times per second.

    Please help me how to get rid of the flickering.

    Thanks and Regards,
    Muthu.

  2. #2
    Join Date
    Oct 2000
    Location
    India
    Posts
    4,620

    Thumbs up Re: Flickering Problem in VC++

    Hi

    Search for "Double buffering" on the net. There is a class called CMemDC
    by Keith Rule which will help u avoid the flickering.
    All luck and have a great day.

    Regards,
    V.Girish

    Visit www.geocities.com/contactgirish for Source code, Tutorials, FAQs and Downloads.

  3. #3
    Join Date
    Apr 2003
    Location
    kathmandu, nepal
    Posts
    1,570

    Re: Flickering Problem in VC++

    Maybe applying WS_CLIPCHILDREN style to the dialog window will work.
    If there is no love sun won't shine

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