GetOwner
Get the origin object that this grid attached to
void GetOwner( OriginObject & oo )
EX1
//Get the attached worksheet name. void Grid_GetOwner_ex1() { Worksheet wks = Project.ActiveLayer(); if(wks) { Grid gg; gg.Attach(wks); Worksheet wksSrc; gg.GetOwner(wksSrc); out_str(wksSrc.GetName()); } }
EX2
//Get the attached worksheet name. void Grid_GetOwner_ex2() { Worksheet wks = Project.ActiveLayer(); if( wks && wks.GetSystemParam(0) & WP_SHEET_HIERARCHY ) { Grid gg; gg.Attach(wks); Worksheet wksSrc; gg.GetOwner(wksSrc); out_str(wksSrc.GetName()); } }
origin.h