本文整理汇总了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);
}
}
}
}
示例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;
}
示例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;
}