LVectorBase::SetPalette

Summary

Sets the palette handle associated with the vector.

Syntax

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetPalette(hPalette)

Parameters

HPALETTE hPalette

Handle to the new palette to set.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This function makes a copy of hPalette, so you can delete the object if you don't need it anymore.

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT LVectorBase__SetPaletteExample() 
{ 
   L_INT          nRet; 
   LVectorBase    Vector1, Vector2; 
   HPALETTE       hPalette1, hPalette2; 
   HDC            hDC = GetDC(0); 
 
   Vector1.Load(MAKE_IMAGE_PATH(TEXT("random.dxf"))); 
   Vector2.Load(MAKE_IMAGE_PATH(TEXT("random.dxf"))); 
 
   hPalette1 = Vector1.GetPalette(); 
 
   hPalette2 = L_WRPDUPPALETTE(hPalette1); 
 
   nRet = Vector2.SetPalette(hPalette2); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   ReleaseDC(0,hDC); 
 
   return SUCCESS; 
} 
Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 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.