Thread: Graphics

  1. #1
    aura
    Guest

    Graphics

    hello people, does anyone know whats the fastest method of redrawing graphics on a windows form without the flickers.

  2. #2
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    back buffering. This should be a FAQ topic if it isn't (I haven't read the FAQ )
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  3. #3
    aura
    Guest
    right, do any of the canvas methods provide this?

  4. #4
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    CreateCompatibleDC and CreateCompatibleBitmap // for the back buffer itself

    BitBlt //for "copying" the back buffer to the screen once it's been completed
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  5. #5
    aura
    Guest
    Hi, i have tried using BitBlt but it still flickers. Can it be done this way, BitBlt is called from the MouseMove event.

    Code:
    BitBlt(Canvas->Handle,X,Y,BlitToMove->Width, BlitToMove->Height,BlitToMove->Canvas->Handle,0,0,SRCCOPY);

  6. #6
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    you have to blit a finished product. everything needs to be drawn onto the screen-sized back buffer. and when complete you blit. obviously, blitting alone doesn't stop flickering. You must be sure not to see the in between stages. This is done by only showing in between stages on the back buffer.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  7. #7
    aura
    Guest
    right ok thanks, i'll have another go.

  8. #8
    aura
    Guest
    Hi FYB, well about 5 days later i have managed to do it. I would like to say thanks for your help. I appreciate it.

  9. #9
    Registered User rmullen3's Avatar
    Join Date
    Nov 2001
    Posts
    330

    ~

    bumping is bad... =P

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Turtle Graphics, how does it work?
    By freddyvorhees in forum C++ Programming
    Replies: 15
    Last Post: 08-28-2009, 09:57 AM
  2. Graphics Programming :: Approach and Books
    By kuphryn in forum Windows Programming
    Replies: 4
    Last Post: 05-11-2004, 08:33 PM
  3. egavga.bgi problem
    By sunil21 in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 09-22-2003, 05:06 PM
  4. Graphics Devices and Cprintf clash
    By etnies in forum C Programming
    Replies: 6
    Last Post: 05-09-2002, 11:14 AM