HexEdit/HexEditDoc.cpp
CHexEditView *CHexEditDoc::GetBestView()
{
	CView *pbest = NULL;
	CView *pactive = ::GetView();  // returns the hex view associated with the active view

	POSITION pos = GetFirstViewPosition();
	while (pos != NULL)
	{
		CView *pview = GetNextView(pos);
		if (pview != NULL && pbest == NULL && pview->IsKindOf(RUNTIME_CLASS(CHexEditView)))
			pbest = pview;
		else if (pview == pactive)
		{
			pbest = pview;
			break;
		}
	}
	return (CHexEditView *)pbest;
}
// Get a (hex) view for the document: the active view if there is one, or just the first one

Get a (hex) view for the document: the active view if there is one, or just the first one
Get a ( hex ) view for the document : the active view if there is one or just the first one
CHexEditView *CHexEditDoc::GetBestView()
{
	CView *pbest = NULL;
	CView *pactive = ::GetView();  
	POSITION pos = GetFirstViewPosition();
	while (pos != NULL)
	{
		CView *pview = GetNextView(pos);
		if (pview != NULL && pbest == NULL && pview->IsKindOf(RUNTIME_CLASS(CHexEditView)))
			pbest = pview;
		else if (pview == pactive)
		{
			pbest = pview;
			break;
		}
	}
	return (CHexEditView *)pbest;
}
CHexEditView * CHexEditDoc :: GetBestView ( ) { CView * pbest = NULL ; CView * pactive = :: GetView ( ) ; POSITION pos = GetFirstViewPosition ( ) ; while ( pos != NULL ) { CView * pview = GetNextView ( pos ) ; if ( pview != NULL && pbest == NULL && pview -> IsKindOf ( RUNTIME_CLASS ( CHexEditView ) ) ) pbest = pview ; else if ( pview == pactive ) { pbest = pview ; break ; } } return ( CHexEditView * ) pbest ; }
Get a (hex) view for the document: the active view if there is one, or just the first one
Get a ( hex ) view for the document : the active view if there is one or just the first one
// returns the hex view associated with the active view
