Click here to Skip to main content
Licence 
First Posted 16 Dec 1999
Views 58,345
Bookmarked 16 times

Determine the row and column of a view

By | 16 Dec 1999 | Article
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

About the Author

Randy More



United States United States

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralEasier way PinsussGreg Marr5:01 25 Jan '00  
GeneralRe: Easier way PinsussAnonymous1:02 8 Aug '05  
GeneralRe: Easier way PinsussAnonymous1:10 8 Aug '05  

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

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

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 17 Dec 1999
Article Copyright 1999 by Randy More
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid