Redraw problem - Programmer

This is a discussion on Redraw problem - Programmer ; I have a dialog based app which has a row of buttons at the bottom of the client area and a slider just above the buttons. When the dialog window is re-sized I set the position of the buttons and ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Redraw problem

  1. Redraw problem

    I have a dialog based app which has a row of buttons at the bottom of
    the client area and a slider just above the buttons.

    When the dialog window is re-sized I set the position of the buttons
    and a slider so that they are always at the bottom of the dialog's
    client area.

    This works OK except that if I resize the dialog vertically by
    dragging its top or bottom up and down repeatedly *rapidly*, the
    buttons and slider end up with fragments of other controls drawn
    across them. For example the slider has bits of the button text across
    it.

    I can't get rid of these fragments unless I force the dialog to redraw
    itself.

    It looks like there may be some problem with the order of painting (or
    background erasing), or that the button and slider are not able to
    erase their background before drawing themselves.

    Does anyone know what is causing this and how I can solve it?

    BTW, I'm using MFC.

    Thanks

    Colin

  2. Re: Redraw problem

    >This works OK except that if I resize the dialog vertically by
    >dragging its top or bottom up and down repeatedly *rapidly*


    Colin,

    If the problem only occurs sometimes, I'd suspect a graphics driver
    issue. Have you checked if the problem is consistent on machines that
    have different graphics cards/drivers? Have you tried reducing the
    video acceleration setting to see if that has any effect?

    If it is a driver problem, see if you have the latest version from
    your card manufacturer.

    Dave
    --
    MVP VC++ FAQ: http://www.mvps.org/vcfaq

+ Reply to Thread