Double buffering is used to reduce flickering when painting windows. In many cases, double buffering is entirely unnecessary, but there are some instances where it can improve the appearance of your application.
For example, there are certain situations when using annotations that "flickering" is very difficult to avoid. One such situation occurs when zooming in very quickly on an annotation. To see this, perform the following steps:
Note that you can very clearly see the image being painted, and then the annotation over the image. For a fraction of a second, you can see the image under the annotation.
Now enable the double buffering option, and begin zooming. Notice how there is no flickering.
You can very easily add double buffering to your applications by using the following functions.
To use double buffering, first you must create a double buffer handle using LDoubleBuffer::CreateHandle. The double buffer handle is an argument for all of the double buffering functions.
At any time in your application, you can easily enable/disable the double buffering by calling LDoubleBuffer::EnableDoubleBuffer with appropriate arguments. When the double buffering is disabled, all wrapped paint calls paint directly to the screen. When double buffering is enabled, paints are triggered only by calls to LDoubleBuffer::End.
When you are finished double buffering, call LDoubleBuffer::DestroyHandle to free the internally allocated resources.
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries