IASCanvas::get_AutoCommit

This method enables you to determine if the control is in the auto-commit mode and to determine the coordinates of the starting point for the off-screen bitmap from which auto-commit blits.

Syntax

HRESULT get_AutoCommit( BOOL *pfAutoCommit, long *pxSrc, long *pySrc );

Parameters

pfAutoCommit
Pointer to a Boolean that is set to TRUE if auto-commit is enabled, or to FALSE if auto-commit is disabled. The default setting is FALSE.
pxSrc
Pointer to the x-coordinate of the source bitmap from which auto-commit blits.
pySrc
Pointer to the 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.