这篇教程C++ GetTopLevelFrame函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetTopLevelFrame函数的典型用法代码示例。如果您正苦于以下问题:C++ GetTopLevelFrame函数的具体用法?C++ GetTopLevelFrame怎么用?C++ GetTopLevelFrame使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetTopLevelFrame函数的23个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: GetParentButtonvoid CUndoBar::DoUndo(){ CUndoButton* pUndoButton = GetParentButton(); ASSERT_VALID(pUndoButton); pUndoButton->m_nSelNum = m_wndList.GetSelCount() + 1; CMDIChildWnd* pChildFrame = ((CMDIFrameWndEx*)GetTopLevelFrame())->MDIGetActive(); if (pChildFrame) { CEditView* pView = DYNAMIC_DOWNCAST(CEditView, pChildFrame->GetActiveView()); if (pView != NULL) { //pView->OnEditUndo(); TODO } else { ASSERT(FALSE); } } else { ASSERT(FALSE); } GetParent()->PostMessage(WM_CLOSE);}
开发者ID:jetlive,项目名称:skiaming,代码行数:27,
示例2: TRACEint CUndoMenu::OnCreate(LPCREATESTRUCT lpCreateStruct){ if (CMiniFrameWnd::OnCreate(lpCreateStruct) == -1) return -1; DWORD toolbarStyle = AFX_DEFAULT_TOOLBAR_STYLE; if (m_AnimationType != NO_ANIMATION && !CMFCToolBar::IsCustomizeMode()) { toolbarStyle &= ~WS_VISIBLE; } if (!m_wndUndoBar.Create(this, toolbarStyle | CBRS_TOOLTIPS | CBRS_FLYBY, 1)) { TRACE(_T("Can't create popup menu bar/n")); return -1; } CWnd* pWndParent = GetParent(); ASSERT_VALID(pWndParent); m_wndUndoBar.SetOwner(pWndParent); m_wndUndoBar.SetPaneStyle(m_wndUndoBar.GetPaneStyle() | CBRS_TOOLTIPS); ActivatePopupMenu(GetTopLevelFrame(), this); RecalcLayout(); return 0;}
开发者ID:jetlive,项目名称:skiaming,代码行数:28,
示例3: GetTopLevelFramevoid CMSOffice2007DemoView::OnFontsize(){ CMFCRibbonBar* pRibbon = ((CMainFrame*) GetTopLevelFrame())->GetRibbonBar(); ASSERT_VALID(pRibbon); CMFCRibbonComboBox* pSizeCombo = DYNAMIC_DOWNCAST(CMFCRibbonComboBox, pRibbon->FindByID(ID_FONT_FONTSIZE)); if (pSizeCombo == NULL) { return; } int nSize = GetTwipSize(pSizeCombo->GetEditText()); if (nSize == -2 || (nSize >= 0 && nSize < 20) || nSize > 32760) { // Restore current size: pSizeCombo->SetEditText (TwipsToPointString (GetCharFormatSelection ().yHeight)); MessageBox (_T("The number must be between 1 and 1638.")); return; } if (nSize > 0) { CCharFormat cf; cf.dwMask = CFM_SIZE; cf.yHeight = nSize; SetCharFormat(cf); }}
开发者ID:jetlive,项目名称:skiaming,代码行数:31,
示例4: ASSERT_VALIDBOOL CControlBar::PreTranslateMessage(MSG* pMsg){ ASSERT_VALID(this); ASSERT(m_hWnd != NULL); // handle mouse messages for tooltip support if (m_dwStyle & (CBRS_FLYBY|CBRS_TOOLTIPS)) FilterToolTipMsg(pMsg->message, pMsg->pt); // don't translate dialog messages when in Shift+F1 help mode CFrameWnd* pFrameWnd = GetTopLevelFrame(); if (pFrameWnd != NULL && pFrameWnd->m_bHelpMode) return FALSE; // since 'IsDialogMessage' will eat frame window accelerators, // we call all frame windows' PreTranslateMessage first CWnd* pOwner = GetOwner(); // always use owner first while (pOwner != NULL) { // allow owner & frames to translate before IsDialogMessage does if (pOwner->PreTranslateMessage(pMsg)) return TRUE; // try parent frames until there are no parent frames pOwner = pOwner->GetParentFrame(); } // filter both messages to dialog and from children return PreTranslateInput(pMsg);}
开发者ID:rickerliang,项目名称:OpenNT,代码行数:30,
|