Worksheet::EmbeddedPages

Description

A Collection of all Embedded Pages in a Worksheet


Retrieves an embedded page by index


Retrieves an embedded page by name

Syntax

PageBase EmbeddedPages( int nIndex )

PageBase EmbeddedPages( LPCSTR lpcszName )

Parameters

nIndex
[input] internal index of the page in this collection

lpcszName
[input] Page name

Return

embedded page corresponding to the index


embedded page corresponding to the name

Examples

EX1

//Output the number of the pages in a worksheet.
void Worksheet_EmbeddedPages_Ex1()
{
    Worksheet wks = Project.ActiveLayer();
    if( wks )
    {
        int nCount = wks.EmbeddedPages.Count();
        printf("%d pages embdded in a worksheet", nCount);
    }
}


EX2

//Retrieve the embeded page by the index.
void Worksheet_EmbeddedPages_Ex2()
{
    Worksheet wks = Project.ActiveLayer();
    if( wks )
    {
        int nIndex = 1;
        Page pg = wks.EmbeddedPages(nIndex);
        
        if(!pg)
            printf("Failed to Retrieves the embedded page");
    }
}


EX3

//Retrieve an embeded page by the name.
void Worksheet_EmbeddedPages_Ex3()
{
    Worksheet wks = Project.ActiveLayer();
    if( wks )
    {
        string strPgName = "page1";
        Page pg = wks.EmbeddedPages(strPgName);
        
        if(!pg)
            printf("Failed to Retrieves the embedded page");
    }
}

Remark

See Also

DataRange::EmbedGraph, DataRange::EmbedMatrix, DataRange::EmbedNote

header to Include

origin.h