Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS Vector C++ Class Library Help

LVectorBase::GetBackgroundColor

Show in webframe

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetBackgroundColor(pColor)

L_COLOR *pColor;

/* pointer to a variable to be updated */

Gets the current background color.

Parameter

Description

pColor

Pointer to an L_COLOR variable to be updated with the background color.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function returns the current background color. If LVectorBase::Paint is called with the bEraseBkgnd parameter set t o TRUE, this is the color that is 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:

LVectorBase::SetBackgroundColor, LVectorBase::Paint, LVectorBase::AttachToWindow

Topics:

Viewing a Vector Images

 

Vector Images: Viewing a Vector Image

Example

#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileName
L_INT LVectorBase__GetBackgroundColorExample(HWND hWnd)
{
   L_INT       nRet;
   L_COLOR     color;
   L_TCHAR     szTemp[100];
   LVectorBase Vector;
   nRet = Vector.Load(MAKE_IMAGE_PATH(TEXT("random.dxf")));
   if(nRet != SUCCESS)
      return nRet;
   nRet = Vector.GetBackgroundColor(&color);
   if(nRet != SUCCESS)
      return nRet;
   wsprintf(szTemp, TEXT("Old Background color: %x"), color);
   MessageBox(hWnd, szTemp, TEXT(""), MB_OK);
   nRet = Vector.SetBackgroundColor(RGB(100,100,0));
   if(nRet != SUCCESS)
      return nRet;
   wsprintf(szTemp, TEXT("New Background color: %x"), color);
   MessageBox(hWnd, szTemp, TEXT(""), MB_OK);
   return SUCCESS;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.