#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. |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
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. |
Functions: |
|
Topics: |
#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileName
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;
}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET