GetSelectedRange
It retrieves the current selection in the notation in which the (first, if there are multiple, which is not supported yet) header row or column has index 0, followed by label rows and columns, followed by data rows and columns.
BOOL GetSelectedRange( int & r1, int & c1, int & r2, int & c2 )
TRUE if success else FALSE.
EX1
//before running please highlight one range void Grid_GetSelectedRange_ex1() { Worksheet wks = Project.ActiveLayer(); if(wks) { Grid gg; gg.Attach(wks); if(gg) { int r1, c1, r2, c2; gg.GetSelectedRange(r1, c1, r2, c2); } } }
Grid::GetSelection
origin.h