2.1.14.3.5 get_active_page


Description

Get active page that is not a Notes page

Syntax

Page get_active_page( bool bAllowGraph = true )

Parameters

bAllowGraph
[input] determine to allow graphpage or not

Return

a valid page if successful, else invalid object.

Examples

EX1

void get_active_page_ex1()
{
	Page pg = get_active_page(false);
}

EX2

//make sure there is an active graph page before running this code as to check the difference
void get_active_page_ex2()
{
    Page pg = get_active_page(false); //not allow graphpage, pg is invalid
    if ( pg )
    	out_str("Should not come here, pg should be invalid!");
    
    pg = get_active_page(true); //allow graphpage
    if ( !pg )
    	out_str("Error, pg should be valid!");
    else
    	out_str("Get an active GraphPage object.");
    
    return;
}

Remark

See Also

page_is_active

Header to Include

origin.h

Reference