newntui/discovermdi/src/discovermdiview.cpp
// Special handling of OnSetFocus and OnSize are required for a container
//  when an object is being edited in-place.
Special handling of OnSetFocus and OnSize are required for a container
when an object is being edited in-place.
Special handling of OnSetFocus and OnSize are required for a container when an object is being edited in - place .
void CDiscoverMDIView::OnSetFocus(CWnd* pOldWnd)
{
	COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
	if (pActiveItem != NULL &&
		pActiveItem->GetItemState() == COleClientItem::activeUIState)
	{
		CWnd* pWnd = pActiveItem->GetInPlaceWindow();
		if (pWnd != NULL)
		{
			pWnd->SetFocus();   
			return;
		}
	}
	CFormView::OnSetFocus(pOldWnd);
}
void CDiscoverMDIView :: OnSetFocus ( CWnd * pOldWnd ) { COleClientItem * pActiveItem = GetDocument ( ) -> GetInPlaceActiveItem ( this ) ; if ( pActiveItem != NULL && pActiveItem -> GetItemState ( ) == COleClientItem :: activeUIState ) { CWnd * pWnd = pActiveItem -> GetInPlaceWindow ( ) ; if ( pWnd != NULL ) { pWnd -> SetFocus ( ) ; return ; } } CFormView :: OnSetFocus ( pOldWnd ) ; }
Special handling of OnSetFocus and OnSize are required for a container
when an object is being edited in-place.
Special handling of OnSetFocus and OnSize are required for a container when an object is being edited in - place .
// need to set focus to this item if it is in the same view // don't call the base class