dcsimg

Detect if window is split

WEBINAR:
On-Demand

Desktop-as-a-Service Designed for Any Cloud ? Nutanix Frame


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;
	rows = parent->GetRowCount();
	if(rows>1)
	{
		return(TRUE);
	}
	int cols;
	cols = parent->GetColumnCount();
	if(cols>1)
	{
		return(TRUE);
	}
	return(FALSE);
}



This article was originally published on October 1st, 2002

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date