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.
HRESULT get_AutoCommit( BOOL *pfAutoCommit, long *pxSrc, long *pySrc );
NOERROR indicates success. E_OUTOFMEMORY indicates that the device is out of memory.
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.