LDoubleBuffer::Begin

Summary

Returns a memory hDC that is used in the double buffering process.

Syntax

#include "ltwrappr.h"

virtual HDC LDoubleBuffer::Begin(hDC, cx, cy)

Parameters

HDC hDC

Handle to the target device context.

L_INT cx

Width, in pixels, of the target device context.

L_INT cy

Height, in pixels, of the target device context.

Returns

Value Meaning
<> 0 Memory hDC to use for double buffered paints
0 The function failed.

Comments

Use [LDoubleBuffer:Begin to begin a double buffering process. All double buffered paint operations should be wrapped in [LDoubleBuffer:Begin and LDoubleBuffer::End calls.

The hDC argument is the device context that you want to double buffer. The arguments cx and cy specify the pixel dimensions of the hDC. If the call to [LDoubleBuffer:Begin is successful, a memory hDC is returned. Use this memory hDC for all subsequent paint operations. When you want the result of the memory hDC to appear on the target hDC, call LDoubleBuffer::End.

Note that you must create a double buffer handle with LDoubleBuffer::CreateHandle before calling this function.

For more information, see the topic Minimizing Flicker with Double Buffering.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

For an example, refer to LDoubleBuffer::End.

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.