L_VecSetBackgroundColor

#include "lvkrn.h"

L_INT EXT_FUNCTION L_VecSetBackgroundColor(pVector, Color)

pVECTORHANDLE pVector;

/* pointer to a vector handle */

COLORREF Color;

/* the background color */

Sets the current background color.

Parameter

Description

pVector

Pointer to a vector handle.

Color

The background color to set.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

If L_VecPaint is called, with bEraseBkgnd set to TRUE, this color will be used to erase the background.

Required DLLs and Libraries

LVKRN

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:

L_VecGetBackgroundColor, L_VecPaint, L_VecAttachToWindow

Example

/* This example will set the background color of a vector handle */

void ChangeBackgroundColor( HWND hWnd, pVECTORHANDLE pVector )
{
   CHOOSECOLOR cc;                  /* ChooseColor Windows structure */
   COLORREF    ccCustColors[16];    /* Custom colors */

   memset( &cc, 0, sizeof( CHOOSECOLOR ));
   cc.lStructSize    = sizeof( CHOOSECOLOR );
   cc.hwndOwner      = hWnd;
   cc.rgbResult      = L_VecGetBackgroundColor( pVector );
   cc.lpCustColors   = ccCustColors;
   cc.Flags          = CC_RGBINIT;

   if( ChooseColor( &cc ))
      L_VecSetBackgroundColor( pVector, cc.rgbResult );
}