help me with this

This is a discussion on help me with this within the Windows Programming forums, part of the Platform Specific Boards category; Dear All, I have designed one Form, there is some draw inside, include an background rectangle and grids, and a ...

  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    38

    help me with this

    Dear All,
    I have designed one Form, there is some draw inside, include an background rectangle and grids, and a data line.
    I want to keep the rectangle and grids unchange, but the data refresh every 2 seconds(because the data vary every 2 seconds).
    How can do that? it seems Invalidate() cannot do that.
    Thanks

  2. #2
    Semi n00b Mithoric's Avatar
    Join Date
    Jun 2003
    Posts
    293
    I am unsure exactly what you mean ( perhaps the board verterans can decipher it ?? ) ...

    Do you mean to say that you want to repaint a window?

  3. #3
    Registered User
    Join Date
    Oct 2003
    Posts
    38
    My meaning is every 2 seconds, the data line will be updated( the data line is something like wave), the data line overlap with the rectangle which have horiz.and vertical grids, in my program, when the data line is updated, entire client area included the data line and the rectangle, grids are flashing, but my goal is keeping the rectangle and grids not flash, just stay as the background, but flashing the data line every 2 seconds only.
    Can this be clear???
    Thank you.

  4. #4
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    You have to repaint everything. What you probably mean is that your picture is flickering because you simply paint on the form. Look up the technique of "double buffering" which basically means you paint it in the background and display it once it's completely drawn.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21