MatrixObject::ApplyPalette

 

Description

This function apply the palette to the matrix object

Syntax

int ApplyPalette( LPCSTR lpcszPal, DWORD dwCntrl = MOPAL_USE_ORIGINAL, BOOL bUndo = FALSE )

Parameters

lpcszPal
[input]full path palette file name
dwCntrl
[input]control bits, see MATOBJPALETTE
bUndo
[input] if bUndo is true, you can use Ctrl + Z to undo

Return

Returns MOPALERROR_NO_ERROR on successful and a non-zero error code on failure, see MATOBJPALERROR

Examples

EX1

void mo_copy_palette(const MatrixObject& moSrc, MatrixObject& moDest)
{
    if( !moSrc || !moDest )
        return;
    
    string strPal;
    DWORD dwCntrl;
    if( 0 == moSrc.GetPaletteInfo(strPal, dwCntrl) )
        moDest.ApplyPalette(strPal, dwCntrl);
}

Remark

See Also

MatrixObject::GetPaletteInfo

header to Included

origin.h