HexEdit/HexEditView.cpp
CHexEditView * CHexEditView::PrevView() const
{
	CChildFrame *currc = dynamic_cast<CChildFrame *>(GetFrame());
	ASSERT(currc != NULL);
	CChildFrame *prevc = currc;

	do
	{
		// Get next sibling window (which are the child frames of other views)
		CWnd * pw = prevc->GetWindow(GW_HWNDNEXT);

		// If reached the end of the list go back around
		if (pw == NULL)
			pw = prevc->GetWindow(GW_HWNDFIRST);

		// Skip any windows that are not child frames (eg MFC 10 has added a CMFCTabCtrl window at this level)
		while (!pw->IsKindOf(RUNTIME_CLASS(CChildFrame)))
		{
			pw = pw->GetWindow(GW_HWNDNEXT);
			if (pw == NULL)
				pw = prevc->GetWindow(GW_HWNDFIRST);
		}

		// Get the window as a child frame
		prevc = dynamic_cast<CChildFrame *>(pw);
	} while (prevc != NULL && prevc != currc && prevc->IsIconic());

	if (prevc == NULL || prevc == currc)
		return NULL;
	else
		return prevc->GetHexEditView();
}
// Same as NextView but returns the previous view.  This will be the previous most recently
// viewed window - ie, when called for the active window it will be the previous active window.

Same as NextView but returns the previous view.  This will be the previous most recently
viewed window - ie, when called for the active window it will be the previous active window.
Same as NextView but returns the previous view . This will be the previous most recently viewed window - ie when called for the active window it will be the previous active window .
CHexEditView * CHexEditView::PrevView() const
{
	CChildFrame *currc = dynamic_cast<CChildFrame *>(GetFrame());
	ASSERT(currc != NULL);
	CChildFrame *prevc = currc;
	do
	{
		CWnd * pw = prevc->GetWindow(GW_HWNDNEXT);
		if (pw == NULL)
			pw = prevc->GetWindow(GW_HWNDFIRST);
		while (!pw->IsKindOf(RUNTIME_CLASS(CChildFrame)))
		{
			pw = pw->GetWindow(GW_HWNDNEXT);
			if (pw == NULL)
				pw = prevc->GetWindow(GW_HWNDFIRST);
		}
		prevc = dynamic_cast<CChildFrame *>(pw);
	} while (prevc != NULL && prevc != currc && prevc->IsIconic());
	if (prevc == NULL || prevc == currc)
		return NULL;
	else
		return prevc->GetHexEditView();
}
CHexEditView * CHexEditView :: PrevView ( ) const { CChildFrame * currc = dynamic_cast < CChildFrame * > ( GetFrame ( ) ) ; ASSERT ( currc != NULL ) ; CChildFrame * prevc = currc ; do { CWnd * pw = prevc -> GetWindow ( GW_HWNDNEXT ) ; if ( pw == NULL ) pw = prevc -> GetWindow ( GW_HWNDFIRST ) ; while ( ! pw -> IsKindOf ( RUNTIME_CLASS ( CChildFrame ) ) ) { pw = pw -> GetWindow ( GW_HWNDNEXT ) ; if ( pw == NULL ) pw = prevc -> GetWindow ( GW_HWNDFIRST ) ; } prevc = dynamic_cast < CChildFrame * > ( pw ) ; } while ( prevc != NULL && prevc != currc && prevc -> IsIconic ( ) ) ; if ( prevc == NULL || prevc == currc ) return NULL ; else return prevc -> GetHexEditView ( ) ; }
Same as NextView but returns the previous view.
Same as NextView but returns the previous view .
// Get next sibling window (which are the child frames of other views)
 // If reached the end of the list go back around
 // Skip any windows that are not child frames (eg MFC 10 has added a CMFCTabCtrl window at this level)
 // Get the window as a child frame
