Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Determine the Row and Column of a View

0.00/5 (No votes)
16 Dec 1999 1  
A function that tells you where on a split window a view is located

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.

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