Sets the DigitalPaint automation background color. This function is only available in the Digital Paint toolkits.
#include "ltwrappr.h"
L_INT LAutomation::SetPaintBkColor(rcBKColor)
The COLORREF value that specifies the new background color.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This function will only work when the automation mode is AUTOMATION_MODE_PAINT.
This color will be used by the automation to fill the area lift behind, when the user cuts or deletes some selected region from the bitmap.
The default color is RGB (0, 0, 0).
This example will make sure that the BK is not anything but black.
L_INT LAutomation_SetPaintBkColorExample( LAutomation &Automation )
{
L_INT nRet;
nRet = Automation.IsValid ();
if ( SUCCESS == nRet ) /* check the validity of the automation handle */
{
COLORREF crBkColor ;
/* get the current paint automation color */
crBkColor=Automation.GetPaintBkColor () ;
if ( crBkColor != RGB ( 0, 0, 0 ) ) /* check if its not black */
{
/* set the paint automation background color */
nRet = Automation.SetPaintBkColor (RGB(0, 0, 0 ) ) ;
if(nRet != SUCCESS)
return nRet;
}
}
else
{
return nRet ;
}
return SUCCESS ;
}