This method will tell you where on the split window this view is located (row and column).
void CMySplitterView::GetRowCol(int &row, int &col)
{
CSplitterWnd * parent;
parent = (CSplitterWnd*)GetParent();
int rows = parent->GetRowCount();
int cols = parent->GetColumnCount();
for (row = 0; row < rows; row++)
{
for (col = 0; col < cols; col++)
{
if (this == parent->GetPane(row,col))
{
return;
}
}
}
ASSERT(FALSE);
}
License
This article has no explicit license attached to it, but may contain usage terms in the article text or the download files themselves. If in doubt, please contact the author via the discussion board below.
A list of licenses authors might use can be found here.