本文整理汇总了C++中CFrameWnd::ActivateFrame方法的典型用法代码示例。如果您正苦于以下问题:C++ CFrameWnd::ActivateFrame方法的具体用法?C++ CFrameWnd::ActivateFrame怎么用?C++ CFrameWnd::ActivateFrame使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFrameWnd
的用法示例。
在下文中一共展示了CFrameWnd::ActivateFrame方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ShowWindow
void CAutoClickDoc::ShowWindow()
{
POSITION pos = GetFirstViewPosition();
CView* pView = GetNextView(pos);
if (pView != NULL)
{
CFrameWnd* pFrameWnd = pView->GetParentFrame();
pFrameWnd->ActivateFrame(SW_SHOW);
pFrameWnd = pFrameWnd->GetParentFrame();
if (pFrameWnd != NULL)
pFrameWnd->ActivateFrame(SW_SHOW);
}
}
示例2: OnContextMenu
void CMsgView::OnContextMenu(CWnd *pWnd, CPoint point)
{
CFrameWnd *pFrame;
CMenu menu;
CMenu *pPopupMenu;
int nStart;
int nEnd;
UINT uiEnable;
// make sure window is active
pFrame = GetParentFrame ();
ASSERT (pFrame != NULL);
if (pFrame != NULL)
{
pFrame->ActivateFrame ();
};
if (!menu.LoadMenu (IDR_COMPILEVW_POPUP))
{
return;
}
pPopupMenu = menu.GetSubMenu (0);
ASSERT (pPopupMenu != NULL);
if (pPopupMenu == NULL)
{
return;
}
GetEditCtrl().GetSel(nStart, nEnd);
uiEnable = (nStart == nEnd) ? MF_DISABLED | MF_GRAYED : MF_ENABLED;
pPopupMenu->EnableMenuItem(IDM_MSG_COPY, uiEnable);
pPopupMenu->TrackPopupMenu (TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, this);
}
示例3: while
CDocument *CDocManager::OpenDocumentFile( LPCTSTR lpszFileName )
/**************************************************************/
{
POSITION position = m_templateList.GetHeadPosition();
CDocTemplate *pSelected = NULL;
CDocTemplate::Confidence nSelConfidence = CDocTemplate::noAttempt;
while( position != NULL ) {
CDocTemplate *pTemplate = (CDocTemplate *)m_templateList.GetNext( position );
ASSERT( pTemplate != NULL );
CDocument *pMatch = NULL;
CDocTemplate::Confidence nConfidence = pTemplate->MatchDocType( lpszFileName,
pMatch );
if( nConfidence > nSelConfidence ) {
nSelConfidence = nConfidence;
pSelected = pTemplate;
if( nConfidence == CDocTemplate::yesAlreadyOpen ) {
ASSERT( pMatch != NULL );
POSITION viewPos = pMatch->GetFirstViewPosition();
if( viewPos != NULL ) {
CView *pView = pMatch->GetNextView( viewPos );
CFrameWnd *pFrame = pView->GetParentFrame();
ASSERT( pFrame != NULL );
pFrame->ActivateFrame();
}
return( pMatch );
}
}
}
if( pSelected == NULL ) {
return( NULL );
}
return( pSelected->OpenDocumentFile( lpszFileName ) );
}
示例4: raisekids
void CGuiApp:: raisekids(CMultiDocTemplate *doc_temp)
{
POSITION pos_doc_temp = doc_temp->GetFirstDocPosition();
while (pos_doc_temp) {
CDocument *doc = doc_temp->GetNextDoc(pos_doc_temp);
POSITION p = doc->GetFirstViewPosition();
while (p)
{
CView *view = doc->GetNextView (p);
// view->GetParentFrame()->SetParent(crap);
CFrameWnd *f = (CFrameWnd *)(view->GetParentFrame());
f->ActivateFrame(SW_SHOWNORMAL);
}
}
}
示例5: GetFirstViewPosition
void CNTU_OCCT_v2Doc::ActivateFrame(CRuntimeClass* pViewClass,int nCmdShow)
{
POSITION position = GetFirstViewPosition();
while (position != (POSITION)NULL)
{
CView* pCurrentView = (CView*)GetNextView(position);
if(pCurrentView->IsKindOf(pViewClass) )
{
ASSERT_VALID(pCurrentView);
CFrameWnd* pParentFrm = pCurrentView->GetParentFrame();
ASSERT(pParentFrm != (CFrameWnd *)NULL);
// simply make the frame window visible
pParentFrm->ActivateFrame(nCmdShow);
}
}
}