LayoutPage::LayoutPage

Description

Construct a LayoutPage object using the name of an existing Origin layout page.


Construct a LayoutPage object using an existing LayoutPage object.

Syntax

LayoutPage( LPCTSTR lpcszName )

LayoutPage( PageBase & page )

Parameters

lpcszName
[input]The name of an existing Origin layout page.

page
[input]An existing LayoutPage object.

Return

Examples

EX1

//Construct a LayoutPage object using the name of an existing Origin layout page
int LayoutPage_LayoutPage_ex1()
{
    LayoutPage lp;
    lp.Create("Layout");
    if( lp.IsValid() )
    {
        LayoutPage lp2(lp.GetName());
        if( lp2.IsValid() )
            printf("lp and lp2 are both attached to '%s'\n", lp2.GetName());
    }
    return 0;
}


EX2

//Construct a LayoutPage object using an existing LayoutPage object
int LayoutPage_LayoutPage_ex2()
{
    LayoutPage lp;
    lp.Create("Layout");
    if( lp.IsValid() )
    {
        LayoutPage lp2(lp);
        if( lp2.IsValid() )
            printf("lp and lp2 are both attached to '%s'\n", lp2.GetName());
    }
    return 0;
}

Remark

See Also

Page::Create

header to Include

origin.h