IASCanvas::put_AutoCommit

This method sets the auto-commit mode for a control and sets the coordinates of the starting point for an off-screen bitmap from which auto-commit blits.

Syntax

HRESULT put_AutoCommit( BOOL fAutoCommit, long xSrc, long ySrc );

Parameters

fAutoCommit
Boolean that is set to TRUE to enable auto-commit, or to FALSE to disable it. The default setting is FALSE.
pxSrc
Pointer to the starting x-coordinate of the source bitmap from which auto-commit blits.
pySrc
Pointer to the starting y-coordinate of the source bitmap from which auto-commit blits.

Return Values

NOERROR indicates success. E_OUTOFMEMORY indicates that the device is out of memory.

Remarks

If auto-commit is enabled, every time the screen is redrawn, the last bitmap that was set is used to redraw the screen. This is useful for handling form focus changes— for example, using a timer to move an application from the background to the foreground. Enabling auto-commit tells the forms manager to only repaint the last bitmap that was set when the Forms Manager redraws the screen.

In general, the purpose of the Canvas control is to give the application a substantial degree of control over drawing. For this reason, auto-commit is disabled by default. However, in some circumstances, enabling auto-commit can simplify your application by automating the painting process.