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

Detect If Window is Split

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

Many times, it is necessary to know whether a view is currently split or not. This method will return TRUE if the view is split and FALSE if it is not.

NOTE: It does NOT detect multiple views, so don't use it to determine whether UpdateAllViews should be called!

int CMySplitterView::IsSplit(void)
{
	CSplitterWnd * parent;
	parent = (CSplitterWnd*)GetParent();
	int rows = parent->GetRowCount();
	if (rows > 1)
	{
		return TRUE;
	}
	int cols = parent->GetColumnCount();
	if (cols > 1)
	{
		return(TRUE);
	}
	return 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