2.2.4.27.19 MatrixLayer::SetInternalDataType

Description

Set the internal data type for all the matrix objects in the layer.

Syntax

BOOL SetInternalDataType( UINT nType, DWORD dwFlags = OCD_RESET_VIEW | OCD_RESTORE )

Parameters

nType
[input] FSI_* data type constants defined in oc_const.h
dwFlags
[input] OCD_* options defined in oc_const.h. The following options are allowed:
set OCD_RESET_VIEW to reset the view modes to data
set OCD_RESTORE to backup the data and attempt to restore it after changing type
default is OCD_RESET_VIEW | OCD_RESTORE.

Return

TRUE for success, FALSE for failure

Examples

EX1

//Set the internal data type for all the matrix objects in the layer.
void MatrixLayer_SetInternalDataType_Ex1()
{
    MatrixPage mp = Project.MatrixPages(0);
    if(!mp)
        return;
    
    MatrixLayer ml(mp.GetName());
    if( ml.SetInternalDataType(FSI_USHORT) )    // make    a Matrix ushort and keep its data and show as data
        printf("Success to set internal data type!");
    else
        printf("Fail to set internal data type!");
}

Remark

Set the internal data type for all the matrix objects in the layer.

If matrix is already the correct internal type, this function will do nothing. If the matrix only has image without data,

bSaveData set to TRUE will convert the image into data so that HasData will become TRUE after this command.

See Also

MatrixLayer::GetInternalDataType

Header to Include

origin.h