CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004
    Location
    Bangalore, INDIA
    Posts
    20

    How to draw a graphical object independently?

    Hai all,

    I am doing a project involving graphical drawings.

    In my project, I add every drawn elements in a pointer list.
    And, while drawing a new element ie on every mouse move, i redraw all the elements in the pointer list and draw the current elements with the new coordinates.

    This slows down my application.
    I tried Double buffering and XOR techniques but in vain.

    Is there any other way to draw an element without disturbing other drawn elements?

    Please help me.

    With Thanks,
    Arun Chakaravarthy

  2. #2
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354
    Do you by any chance handle WM_ERASEBKGND. May be you want to trap that and do nothing.

    When windows needs to paint, it may send a WM_ERASEBKGND and if you don't handle this, the default window proc will erase the whole bkgnd with the bkgnd color. This could result in a flicker.

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