• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetTopLevelFrame函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetTopLevelFrame函数的典型用法代码示例。如果您正苦于以下问题:C++ GetTopLevelFrame函数的具体用法?C++ GetTopLevelFrame怎么用?C++ GetTopLevelFrame使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: GetParentButton

void 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,代码来源:UndoBar.cpp


示例2: TRACE

int 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,代码来源:UndoBar.cpp


示例3: GetTopLevelFrame

void 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,代码来源:MSOffice2007DemoView.cpp


示例4: ASSERT_VALID

BOOL 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,代码来源:barcore.cpp


示例5: DYNAMIC_DOWNCAST

// Ends-in Contrast Stretching의 최저값 설정
void CBMPFrame::OnIpEcsLowEnd()
{
	// TODO: 여기에 명령 처리기 코드를 추가합니다.
	CMFCRibbonEdit *pSpin = DYNAMIC_DOWNCAST(CMFCRibbonEdit,
		((CMainFrame*)GetTopLevelFrame())->GetRibbonBar()->FindByID(ID_IP_ECSLOW));
	m_bEcsLowEnd = (BYTE)_wtof(pSpin->GetEditText());
}
开发者ID:Leehwajung,项目名称:ImagePointProcessor,代码行数:8,代码来源:BMPFrm.cpp


示例6: GetTopLevelFrame

void CBCGPMSOffice2007DemoView::OnFontname() 
{
	USES_CONVERSION;

	CBCGPRibbonBar* pRibbon = ((CMainFrame*) GetTopLevelFrame ())->GetRibbonBar ();
	ASSERT_VALID (pRibbon);

	CBCGPRibbonFontComboBox* pFontCombo = DYNAMIC_DOWNCAST (
		CBCGPRibbonFontComboBox, pRibbon->FindByID (ID_FONT_FONT));
	if (pFontCombo == NULL)
	{
		return;
	}

	CCharFormat cf;
	cf.szFaceName[0] = NULL;
	cf.dwMask = CFM_FACE | CFM_CHARSET;

	const CBCGPFontDesc* pDesc = pFontCombo->GetFontDesc ();
	ASSERT_VALID (pDesc);
	ASSERT(pDesc->m_strName.GetLength() < LF_FACESIZE);

#if _MSC_VER >= 1300
	lstrcpyn(cf.szFaceName, pDesc->m_strName, LF_FACESIZE);
#else
	lstrcpynA(cf.szFaceName,
		T2A((LPTSTR) (LPCTSTR) pDesc->m_strName), LF_FACESIZE);
#endif

	cf.bCharSet = pDesc->m_nCharSet;
	cf.bPitchAndFamily = pDesc->m_nPitchAndFamily;

	SetCharFormat (cf);
}
开发者ID:zxlooong,项目名称:bcgexp,代码行数:34,代码来源:BCGPMSOffice2007DemoView.cpp


示例7: GetTopLevelFrame

void CStagePrefsLighting::OnLightingDefaults() 
{
	CFrameWnd *pMainFrame = GetTopLevelFrame(); 
	CStageView *pView = (CStageView *)pMainFrame->GetActiveView();
	CStageDoc *pDoc = pView->GetDocument();

	pDoc->m_lighting[1] = YO_DEFAULT_LIGHTING_TWO_SIDED;
	m_twoSide = YO_DEFAULT_LIGHTING_TWO_SIDED;
	::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, YO_DEFAULT_LIGHTING_TWO_SIDED);

	pDoc->m_sunIntensity = YO_DEFAULT_SUN_INTENSITY;
	m_lightingSunIntensity = YO_DEFAULT_SUN_INTENSITY;
	m_lightingSunSliderIntensity.SetPos((int)(m_lightingSunIntensity * 100.0));

	pDoc->m_sunAzimuth = YO_DEFAULT_SUN_AZIMUTH;
	m_lightingSunAzimuth = YO_DEFAULT_SUN_AZIMUTH;

	pDoc->m_sunAltitude = YO_DEFAULT_SUN_ALTITUDE;
	m_lightingSunAltitude = YO_DEFAULT_SUN_ALTITUDE;

	UpdateData(FALSE);

	pView->YoRender(YO_RENDER_LIGHT);
	pView->YoRender(YO_RENDER_FULL);
	
}
开发者ID:brifishjones,项目名称:stage,代码行数:26,代码来源:StagePrefsLighting.cpp


示例8: GetTopLevelFrame

void CEditFrameView::OnFontSize ()
{
	CBCGPRibbonBar* pRibbon = ((CEditFrameDialog*) GetTopLevelFrame ())->GetRibbonBar ();
	ASSERT_VALID (pRibbon);

	CBCGPRibbonComboBox* pSizeCombo = DYNAMIC_DOWNCAST (
		CBCGPRibbonComboBox, pRibbon->FindByID (ID_FONT_SIZE));
	if (pSizeCombo == NULL)
	{
		return;
	}

	int nSize = GetTwipSize (pSizeCombo->GetItem (-1));

	if (nSize == -2)
	{
		return;
	}

	if ((nSize >= 0 && nSize < 20) || nSize > 32760)
	{
		return;
	}

	if (nSize > 0)
	{
		CCharFormat cf;
		cf.dwMask = CFM_SIZE;
		cf.yHeight = nSize;

		SetCharFormat (cf);
	}
}
开发者ID:zxlooong,项目名称:bcgexp,代码行数:33,代码来源:EditFrameView.cpp


示例9: GetTopLevelFrame

void CFrameWnd::OnMenuSelect( UINT nItemID, UINT nFlags, HMENU hSysMenu )
/***********************************************************************/
{
    CWnd::OnMenuSelect( nItemID, nFlags, hSysMenu );

    if( nFlags == 0xFFFF && hSysMenu == NULL ) {
        CFrameWnd *pFrame = GetTopLevelFrame();
        ASSERT( pFrame != NULL );
        if( pFrame->m_bHelpMode ) {
            SetMessageText( AFX_IDS_HELPMODEMESSAGE );
        } else {
            SetMessageText( AFX_IDS_IDLEMESSAGE );
        }
    } else {
        if( nFlags & MF_POPUP ) {
            SetMessageText( _T("") );
        } else if( nItemID >= AFX_IDM_FIRST_MDICHILD ) {
            SetMessageText( AFX_IDS_MDICHILD );
        } else if( nItemID >= 0xF000 && nItemID < 0xF1F0) {
            SetMessageText( ID_COMMAND_FROM_SC( nItemID ) );
        } else {
            SetMessageText( nItemID );
        }
    }
}
开发者ID:ArmstrongJ,项目名称:open-watcom-v2,代码行数:25,代码来源:framewnd.cpp


示例10: ASSERT_VALID

BOOL CDlgResLib::PreTranslateMessage(MSG* pMsg)
{
	ASSERT_VALID(this);
	ASSERT(m_hWnd != NULL);

	CWnd* pOwner = GetOwner();

	// 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
	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
		if (IsWindow (pOwner->GetSafeHwnd ()))
		{
			pOwner = pOwner->GetParentFrame();
		}
		else
		{
			break;
		}
	}

	return CDialogEx::PreTranslateMessage(pMsg);
}
开发者ID:cugxiangzhenwei,项目名称:MySrcCode,代码行数:33,代码来源:DlgResLib.cpp


示例11: GetParentButton

void CUndoBar::DoUndo ()
{
	CUndoButton* pUndoButton = GetParentButton ();
	ASSERT_VALID (pUndoButton);

	pUndoButton->m_nSelNum = m_wndList.GetSelCount () + 1;
	
	CMDIChildWnd* pChildFrame = ((CMDIFrameWnd*)GetTopLevelFrame())->MDIGetActive();

	if (pChildFrame)
	{
		CView* pView = pChildFrame->GetActiveView();

		if (pView &&
			pView->IsKindOf(RUNTIME_CLASS(CBCGPVisualStudioGUIDemoView)))
		{
			((CBCGPVisualStudioGUIDemoView*)pView)->DoUndo(pUndoButton);
		}
		else
		{
			ASSERT(FALSE);
		}
	}
	else
	{
		ASSERT(FALSE);
	}

	GetParent ()->PostMessage (WM_CLOSE);
}
开发者ID:zxlooong,项目名称:bcgexp,代码行数:30,代码来源:UndoBar.cpp


示例12: SendMessage

void CBCGPMSOffice2007DemoView::OnInitialUpdate ()
{
	CRichEditView::OnInitialUpdate();

	SendMessage (EM_SHOWSCROLLBAR, SB_HORZ, FALSE);
	SendMessage (EM_SHOWSCROLLBAR, SB_VERT, FALSE);

	GetRichEditCtrl ().SetEventMask (GetRichEditCtrl ().GetEventMask() | (ENM_REQUESTRESIZE | ENM_SCROLL));

	CScrollBar* pScrollBar = ((CMainFrame*) GetTopLevelFrame ())->GetScrollBar ();
	if (pScrollBar->GetSafeHwnd () != NULL && GetRichEditCtrl().GetTextLength () == 0)
	{
		ASSERT_VALID (pScrollBar);
		pScrollBar->EnableScrollBar (ESB_DISABLE_BOTH);
	}

	// Set the printing margins (720 twips = 1/2 inch).
	SetMargins(CRect(720, 720, 720, 720));

	CCharFormat cf;
	GetDefaultFont (cf);

	SetCharFormat (cf);
	SyncFont ();
}
开发者ID:zxlooong,项目名称:bcgexp,代码行数:25,代码来源:BCGPMSOffice2007DemoView.cpp


示例13: ASSERT

BOOL CFormView::PreTranslateMessage(MSG* pMsg)
{
    ASSERT(pMsg != NULL);
    ASSERT_VALID(this);
    ASSERT(m_hWnd != NULL);

    // allow tooltip messages to be filtered
    if (CView::PreTranslateMessage(pMsg))
        return TRUE;

    // 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
    pFrameWnd = GetParentFrame();   // start with first parent frame
    while (pFrameWnd != NULL)
    {
        // allow owner & frames to translate before IsDialogMessage does
        if (pFrameWnd->PreTranslateMessage(pMsg))
            return TRUE;

        // try parent frames until there are no parent frames
        pFrameWnd = pFrameWnd->GetParentFrame();
    }

    // don't call IsDialogMessage if form is empty
    if (::GetWindow(m_hWnd, GW_CHILD) == NULL)
        return FALSE;

    // filter both messages to dialog and from children
    return PreTranslateInput(pMsg);
}
开发者ID:willpoon,项目名称:wcwp,代码行数:35,代码来源:VIEWFORM.CPP


示例14: ASSERT

BOOL CSAPrefsDialog::PreTranslateMessage(MSG* pMsg) 
{
	ASSERT(pMsg != NULL);
	ASSERT_VALID(this);
	ASSERT(m_hWnd != NULL);
	
	// Don't let CDialog process the Escape key.
	if ((pMsg->message == WM_KEYDOWN) && (pMsg->wParam == VK_ESCAPE))
	{
		return TRUE;
	}
	
	if (CWnd::PreTranslateMessage(pMsg))
		return TRUE;
	
	// don't translate dialog messages when 
	// application is in help mode
	CFrameWnd* pFrameWnd = GetTopLevelFrame();
	if (pFrameWnd != NULL && pFrameWnd->m_bHelpMode)
		return FALSE;
	
	// ensure the dialog messages will not
	// eat frame accelerators
	pFrameWnd = GetParentFrame();
	while (pFrameWnd != NULL)
	{
		if (pFrameWnd->PreTranslateMessage(pMsg))
			return TRUE;
		pFrameWnd = pFrameWnd->GetParentFrame();
	}
	
	return PreTranslateInput(pMsg);
	
}
开发者ID:xeonfusion,项目名称:Mp3TagTools,代码行数:34,代码来源:SAPrefsDialog.cpp


示例15: ASSERT

BOOL CDialog::PreTranslateMessage(MSG* pMsg)
{
	// for modeless processing (or modal)
	ASSERT(m_hWnd != NULL);

	// allow tooltip messages to be filtered
	if (CWnd::PreTranslateMessage(pMsg))
		return TRUE;

	// don't translate dialog messages when in Shift+F1 help mode
	CFrameWnd* pFrameWnd = GetTopLevelFrame();
	if (pFrameWnd != NULL && pFrameWnd->m_bHelpMode)
		return FALSE;

	// fix around for VK_ESCAPE in a multiline Edit that is on a Dialog
	// that doesn't have a cancel or the cancel is disabled.
	if (pMsg->message == WM_KEYDOWN &&
		(pMsg->wParam == VK_ESCAPE || pMsg->wParam == VK_CANCEL) &&
		(::GetWindowLong(pMsg->hwnd, GWL_STYLE) & ES_MULTILINE) &&
		_AfxCompareClassName(pMsg->hwnd, _T("Edit")))
	{
		HWND hItem = ::GetDlgItem(m_hWnd, IDCANCEL);
		if (hItem == NULL || ::IsWindowEnabled(hItem))
		{
			SendMessage(WM_COMMAND, IDCANCEL, 0);
			return TRUE;
		}
	}
	// filter both messages to dialog and from children
	return PreTranslateInput(pMsg);
}
开发者ID:anyue100,项目名称:winscp,代码行数:31,代码来源:dlgcore.cpp


示例16: ASSERT

BOOL CSettingsDialog::PreTranslateMessage(MSG* pMsg) 
{
	// TODO: Add your specialized code here and/or call the base class
	ASSERT(pMsg != NULL);
	ASSERT_VALID(this);
	ASSERT(m_hWnd != NULL);

	// Don't let CDialog process the Escape key.
	if ((pMsg->message == WM_KEYDOWN) && (pMsg->wParam == VK_ESCAPE))
		return TRUE;

	if (CWnd::PreTranslateMessage(pMsg)) return TRUE;

   // Don't translate dialog messages when 
   // application is in help mode
	CFrameWnd* pFrameWnd = GetTopLevelFrame();
	if (pFrameWnd != NULL && pFrameWnd->m_bHelpMode) return FALSE;

	// Ensure the dialog messages will not
	// eat frame accelerators
	pFrameWnd = GetParentFrame();
	while (pFrameWnd != NULL)
	{
		if (pFrameWnd->PreTranslateMessage(pMsg)) return TRUE;
		pFrameWnd = pFrameWnd->GetParentFrame();
	}

	return PreTranslateInput(pMsg);	
//	return CDialog::PreTranslateMessage(pMsg);
}
开发者ID:segafan,项目名称:Construct-classic,代码行数:30,代码来源:SettingsDlg.cpp


示例17: GetTopLevelFrame

void CStageGripperDlg::OnGripperOpen() 
{
	CFrameWnd *pMainFrame = GetTopLevelFrame(); 
	CView *pView = pMainFrame->GetActiveView();
	CStageDoc *pDoc = ((CStageView *)pView)->GetDocument();

	((CStageGripper *)pDoc->m_currentDevice)->YoOpenGripper();
	return;	
}
开发者ID:brifishjones,项目名称:stage,代码行数:9,代码来源:StageGripperDlg.cpp


示例18: UpdateData

void CSetPaneSizeView::OnButtonSetContainerSize() 
{
	UpdateData ();	
	CMainFrame* pMainFrame = DYNAMIC_DOWNCAST (CMainFrame, GetTopLevelFrame());
	if (pMainFrame != NULL)
	{
		pMainFrame->SetContainerSize (m_nContainerSize);
	}
}
开发者ID:jetlive,项目名称:skiaming,代码行数:9,代码来源:SetPaneSizeView.cpp


示例19: GetTopLevelFrame

void CStagePartMotion::OnPartRemove() 
{
	// TODO: Add your control notification handler code here
	CFrameWnd *pMainFrame = GetTopLevelFrame(); 
	CView *pView = pMainFrame->GetActiveView();
	CStageDoc *pDoc = ((CStageView *)pView)->GetDocument();
	CStageMotion *ptrMotion;
	int i = 0;
	int j = m_partMotionList.GetCount();
	GLint min;
	GLint sec;
	GLint frm;
	GLint t;
	char s[128];
	char *p;

	while (i < j)
	{
		if (m_partMotionList.GetSel(i))
		{
			m_partMotionList.GetText(i, s);
			sscanf(s, "%d", &min);
			p = &s[3];
			sscanf(p, "%d", &sec);
			p = &s[6];
			sscanf(p, "%d", &frm);
			//sscanf(s, "%d  *%s %d *%s %d", &min, &sec, &frm);
			t = (min * 60 * pDoc->m_framesPerSecond)
				+ (sec * pDoc->m_framesPerSecond)
				+ frm;

			ptrMotion = pDoc->m_currentPart->m_motion;
			while (ptrMotion != NULL && t != 0)
			{
				if (t == ptrMotion->m_time)
				{
					// flag motion for removal
					ptrMotion->m_time = -ptrMotion->m_time;
					ptrMotion = NULL;
				}
				else
				{
					ptrMotion = ptrMotion->m_next;
				}
			}

			m_partMotionList.DeleteString(i);
			j--;
		}
		else
		{
			i++;
		}
	}
	return;
}
开发者ID:brifishjones,项目名称:stage,代码行数:56,代码来源:StagePartMotion.cpp


示例20: GetTopLevelFrame

BOOL CFrameWndBase::OnNcActivate( BOOL bActive )
{
    CFrameWnd* pFrame = GetTopLevelFrame();
    ASSERT_VALID( pFrame );

    m_wndMenuBar.FrameOnNcActivate(
        ( bActive || ( pFrame->m_nFlags & WF_STAYACTIVE ) ) && pFrame->IsWindowEnabled() );

    return CFrameWnd::OnNcActivate( bActive );
}
开发者ID:3rdexp,项目名称:fxfile,代码行数:10,代码来源:FrameWndEx.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetTopWindow函数代码示例发布时间:2022-05-30
下一篇:
C++ GetTop函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap