当前位置: 首页>>代码示例>>C++>>正文


C++ CChildFrame::ShowWindow方法代码示例

本文整理汇总了C++中CChildFrame::ShowWindow方法的典型用法代码示例。如果您正苦于以下问题:C++ CChildFrame::ShowWindow方法的具体用法?C++ CChildFrame::ShowWindow怎么用?C++ CChildFrame::ShowWindow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CChildFrame的用法示例。


在下文中一共展示了CChildFrame::ShowWindow方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

void CMainFrame::OnView3dview()
{
	CChildFrame		*pChildFrame;
	CW3ZMapEditDoc	*pDoc;
	pChildFrame = (CChildFrame*)MDIGetActive();
	if (NULL != pChildFrame)
	{
		pDoc = (CW3ZMapEditDoc *)pChildFrame->GetActiveDocument();
		pChildFrame = pDoc->Get3DChildFrame();
		if (NULL != pChildFrame)
		{
			if (TRUE == pChildFrame->IsWindowVisible())
			{
				pChildFrame->ShowWindow(SW_HIDE);
			}
			else
			{
				pChildFrame->ShowWindow(SW_SHOWNORMAL);
			}
		}
	}
}
开发者ID:Amrf000,项目名称:War3-Jass,代码行数:22,代码来源:MainFrm.cpp

示例2: Open

IComparison* Comparisons::Open(LPCTSTR wdfDocId)
{
	AFX_MANAGE_STATE(AfxGetAppModuleState());
	AutomationInteractionSuppressor ais;


	CMDIFrameWnd* pMainFrame = DYNAMIC_DOWNCAST(CMDIFrameWnd, AfxGetMainWnd());
	GetApp()->RealFileNew();
// TODO - can we get the frame in a better way
	CChildFrame *pFrame = DYNAMIC_DOWNCAST( CChildFrame, pMainFrame->MDIGetActive() );

	if (pFrame)
	{
	// TODO - do we need this
		GetDVController(pFrame)->CloseDocument(true);
		GetDVController(pFrame)->CloseDocument(false);

		GetDVController(pFrame)->CloseCompositeDocument();
		GetDVController(pFrame)->GetComparisonDocController().CloseComparisonDocument();

		if( pFrame->GetCompositeBar() )
			pFrame->GetCompositeBar()->OnInitialUpdate();

		pFrame->ShowWindow(SW_SHOW);
		pFrame->BringWindowToTop();

		if (!GetDVController(pFrame)->LoadWDF(wdfDocId))
		{
			AfxThrowOleDispatchException(1102, L"File not found : " + CString(wdfDocId));
		}


		pFrame->GetDocument()->UpdateAllViews(NULL);
		UpdateOpenList();
		return FindComObject(pFrame->GetDocument());
	}
	AfxThrowOleDispatchException(1101, L"Internal Error");
	return NULL;
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:39,代码来源:Comparisons.cpp

示例3: ShowStaticView

BOOL CStaticDoc::ShowStaticView( CRuntimeClass * pViewClass, BOOL bMaximized )
{
	if( NULL == pViewClass )
		return FALSE;

	CChildFrame * pChildFrame = NULL;

	POSITION pos = GetFirstViewPosition( );
	CView * pView = NULL;
	while( pView = GetNextView(pos) )
	{
		if( pView->IsKindOf( pViewClass ) )
		{
			pChildFrame = DYNAMIC_DOWNCAST( CChildFrame, pView->GetParentFrame() );
			ASSERT( pChildFrame );
			if( pChildFrame )
				break;
		}
	}

	if( NULL == pChildFrame )
	{
		// create frame
		pChildFrame = CChildFrame::CreateNewFrame( this );
		ASSERT( pChildFrame );

		if( pChildFrame )
		{
			// create view
			CCreateContext context;
			context.m_pCurrentDoc = this;
			context.m_pCurrentFrame = pChildFrame;
			context.m_pLastView = NULL;
			context.m_pNewDocTemplate = NULL;
			context.m_pNewViewClass = pViewClass;

			CView * pNewView = DYNAMIC_DOWNCAST(CView,pChildFrame->CreateView( &context, AFX_IDW_PANE_FIRST));
			if( pNewView )
			{
				pChildFrame->SetActiveView( pNewView );
				pNewView->OnInitialUpdate( );
			}

			// if no active child frame, maximize this frame
			CMainFrame * pMainFrame = AfxGetMainFrame();
			if( pMainFrame )
			{
				CFrameWnd * pActiveFrame = AfxGetMainFrame()->GetActiveFrame();
				if( !pActiveFrame || !pActiveFrame->IsKindOf(RUNTIME_CLASS(CChildFrame)) )
					pChildFrame->MDIMaximize();
			}
		}
	}
	
	if( pChildFrame )
	{
		// activate it
		pChildFrame->MDIActivate();
		if( bMaximized )
			pChildFrame->MDIMaximize();
		else
			pChildFrame->ShowWindow( SW_SHOW );
	}

	return TRUE;
}
开发者ID:ZhaoboMeng,项目名称:k-line-print,代码行数:66,代码来源:StaticDoc.cpp


注:本文中的CChildFrame::ShowWindow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。