2.2.4.29.5 MatrixPage::MatrixPage

Description

Construct a MatrixPage object using the name of an existing matrix page.


Construct a MatrixPage object using an existing matrix page object.

Syntax

MatrixPage( LPCTSTR lpcszName )


MatrixPage( PageBase & page )

Parameters

lpcszName
[input]The name of an existing matrix page.


page
[input]An existing matrix page object.

Return

Examples

EX1

int MatrixPage_MatrixPage_ex1(string strName = "MBook1")
{	
    MatrixPage mp(strName);
    if( mp.IsValid() )
        printf("%s matrix window is existed\n", strName);
    else
        printf("%s matrix window is not existed\n", strName);
   
    return mp.IsValid();
}


EX2

// This is an example for MatrixPage copy constructor
int MatrixPage_MatrixPage_ex2()
{
    MatrixPage mp;
    mp.Create("origin");
    if( mp.IsValid() )
    { 
        // copy constructor   
        MatrixPage mp2(mp);
        if( mp2.IsValid() )
            printf("mp and mp2 are both attached to '%s'\n", mp2.GetName());
    }
    return 0;
}

Remark

See Also

Page::Create

Header to Include

origin.h