GraphPageBase::CreateCopy

Description

Create or replace an existing GraphPage or LayoutPage with this one as an exact copy

Syntax

BOOL CreateCopy( GraphPageBase & pgDest, DWORD dwCtrl = 0 )

Parameters

pgDest
[output] the destination page
dwCtrl
[input] control options. See the CREATE_* flags in oc_const.h

Return

TRUE for success; otherwise FALSE.

Examples

EX1

int GraphPageBase_CreateCopy_ex1(string strGraphName = "Graph1")
{
    GraphPage    gp(strGraphName);
    if( !gp )
        return -1;
    
    GraphPage     gp2;
    if( !gp.CreateCopy(gp2, CREATE_HIDDEN) ) // create a hidden page and copied from gp
        printf("Fail to copy %s.\n", strGraphName);    
    
    printf("The newly copied hidden graph is %s.\n", gp2.GetName());
    return 0;
}

Remark

See Also

Header to Include

origin.h