Click here to Skip to main content
15,894,405 members
Articles / Mobile Apps / Windows Mobile

Detect If Window is Split

Rate me:
Please Sign up or sign in to vote.
1.11/5 (5 votes)
16 Dec 1999 59.1K   18   2
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!

C++
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.


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralMy vote of 1 Pin
Member 786664028-Apr-11 3:46
Member 786664028-Apr-11 3:46 
GeneralYac... Pin
thenickname14-Oct-05 8:47
thenickname14-Oct-05 8:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.