Get active page that is not a Notes page
Page get_active_page( bool bAllowGraph = true )
a valid page if successful, else invalid object.
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; }
page_is_active
origin.h