LVectorBase::GetBackgroundColor

Summary

Gets the current background color.

Syntax

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetBackgroundColor(pColor)

Parameters

L_COLOR *pColor

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

Returns

Value Meaning
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

See Also

Functions

Topics

Example

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; 
} 
Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Vector C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.