LAutomation::SetPaintBkColor

#include "ltwrappr.h"

L_INT LAutomation::SetPaintBkColor(rcBKColor)

COLORREF rcBKColor;

/* new background color */

Sets the DigitalPaint automation background color. This function is only available in the Digital Paint toolkits.

Parameter

Description

rcBKColor

The COLORREF value that specifies the new background color.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

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).

Required DLLs and Libraries

LTAUT

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions:

LAutomation::Cut, LAutomation::Delete, LAutomation::GetPaintBkColor.

Example

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 ; 
}