LVectorBase::SetPalette

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetPalette(hPalette)

HPALETTE hPalette;

/* handle to a palette */

Sets the palette handle associated with the vector.

Parameter

Description

hPalette

Handle to the new palette to set.

Returns

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

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::GetPalette, LVectorBase::Paint

Topics:

Vector Images: Getting and Setting General Information

Example

L_VOID Example35( HWND hWnd)
{
   LVectorBase Vector1, Vector2;
   HPALETTE hPalette1, hPalette2;
   HDC hDC=GetDC(0);
   
   Vector1.Load(TEXT("s:\\temp\\images\\dxf\\test.dxf"));
   Vector2.Load(TEXT("s:\\temp\\images\\dxf\\skull.dxf"));
   
   hPalette1 = Vector1.GetPalette();
   hPalette2 = L_DUPPALETTE(hPalette1);
   
   Vector2.SetPalette(hPalette2);
   
   ReleaseDC(0,hDC);
}