您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DYNAMIC_DOWNCAST函数代码示例

51自学网 2021-06-01 20:24:50
  C++
这篇教程C++ DYNAMIC_DOWNCAST函数代码示例写得很实用,希望能帮到您。

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

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

示例1: AfxGetMainFrame

CView* CStaticDoc::GetActiveView( ){	CMainFrame * pMainFrame = AfxGetMainFrame();	if( pMainFrame )	{		CChildFrame * pChildFrame = DYNAMIC_DOWNCAST( CChildFrame, pMainFrame->MDIGetActive() );		if( pChildFrame )		{			CView * pView = pChildFrame->GetActiveView();			if( pView && this == pView->GetDocument() )				return pView;		}	}	return NULL;}
开发者ID:maerson,项目名称:mystkproj,代码行数:15,


示例2: ASSERT_VALID

//--------------------------------------------------------------------------------------//void CBCGPDragFrameImpl::Init (CWnd* pDraggedWnd){	ASSERT_VALID (pDraggedWnd);	m_pDraggedWnd = pDraggedWnd;	CWnd* pDockSite = NULL;	if (m_pDraggedWnd->IsKindOf (RUNTIME_CLASS (CBCGPMiniFrameWnd)))	{		CBCGPMiniFrameWnd* pMiniFrame = DYNAMIC_DOWNCAST (CBCGPMiniFrameWnd, m_pDraggedWnd);		pDockSite = pMiniFrame->GetParent ();	}	else if (m_pDraggedWnd->IsKindOf (RUNTIME_CLASS (CBCGPControlBar)))	{		CBCGPControlBar* pBar = 				DYNAMIC_DOWNCAST (CBCGPControlBar, m_pDraggedWnd);		ASSERT_VALID (pBar);		CBCGPMiniFrameWnd* pParentMiniFrame = pBar->GetParentMiniFrame ();		if (pParentMiniFrame != NULL)		{			pDockSite = pParentMiniFrame->GetParent ();		}		else		{			pDockSite = pBar->GetDockSite ();		}	}	m_pDockManager = globalUtils.GetDockManager (pDockSite);	if (globalUtils.m_bDialogApp)	{		return;	}	ASSERT(m_pDockManager != NULL);}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:37,


示例3: GetTopLevelFrame

void CBCGPMSOffice2007DemoView::OnZoomSlider(){	CBCGPRibbonStatusBar* pStatusBar = ((CMainFrame*) GetTopLevelFrame ())->GetRibbonStatusBar ();	CBCGPRibbonSlider* pSlider = DYNAMIC_DOWNCAST (		CBCGPRibbonSlider,		pStatusBar->FindElement (ID_STATUSBAR_ZOOM_SLIDER));	ASSERT_VALID (pSlider);	int nPos = pSlider->GetPos ();	CBCGPRibbonStatusBarPane* pZoom = DYNAMIC_DOWNCAST (		CBCGPRibbonStatusBarPane,		pStatusBar->FindElement (ID_STATUSBAR_ZOOM));	ASSERT_VALID (pZoom);	CString strZoom;	strZoom.Format (_T("%d%%"), nPos);	pZoom->SetText (strZoom);	pZoom->Redraw ();	SendMessage(EM_SETZOOM, nPos, 100);}
开发者ID:zxlooong,项目名称:bcgexp,代码行数:24,


示例4: DYNAMIC_DOWNCAST

COXTabSkin* COXSkinnedSpinCtrl::GetTabSkin(){	// Check if the app is derived from COXSkinnedApp	COXSkinnedApp* pSkinnedApp = DYNAMIC_DOWNCAST(COXSkinnedApp, AfxGetApp());	if (pSkinnedApp != NULL && pSkinnedApp->GetCurrentSkin() != NULL)		return pSkinnedApp->GetCurrentSkin()->GetTabSkin();	else	{		// Create a classic skin for this class if not created already		if (m_pTabSkin == NULL)			m_pTabSkin = new COXTabSkinClassic();		return m_pTabSkin;	}}
开发者ID:drupalhunter-team,项目名称:TrackMonitor,代码行数:15,


示例5: DYNAMIC_DOWNCAST

//******************************************************************************void CBCGPDragFrameImpl::PlaceTabPreDocking (CWnd* pCBarToPlaceOn){	CBCGPBaseTabbedBar* pTabbedBar = 			DYNAMIC_DOWNCAST (CBCGPBaseTabbedBar, pCBarToPlaceOn);	if (pTabbedBar != NULL &&		 (pTabbedBar->GetVisibleTabsNum () > 1 && pTabbedBar->IsHideSingleTab () ||		  pTabbedBar->GetVisibleTabsNum () > 0 && !pTabbedBar->IsHideSingleTab ()))	{		m_pTargetBar = pTabbedBar;		PlaceTabPreDocking (pTabbedBar, TRUE);		return;	}	else if (m_nInsertedTabID == -1)	{		CBCGPDockingControlBar* pDockingControlBar = DYNAMIC_DOWNCAST (CBCGPDockingControlBar, pCBarToPlaceOn);		if (pDockingControlBar != NULL)		{			DrawFrameTab (pDockingControlBar, FALSE);			m_pTargetBar = pDockingControlBar;			m_pOldTargetBar = pDockingControlBar;			m_nInsertedTabID = 1;		}	}}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:25,


示例6: AfxGetMainWnd

CStatusBar* CProgressBar::GetStatusBar(){	if (m_pStatusBar)	{		return m_pStatusBar;	}	else	{		CWnd *pMainWnd = AfxGetMainWnd();		if (!pMainWnd)			return NULL;		// If main window is a frame window, use normal methods...		if (pMainWnd->IsKindOf(RUNTIME_CLASS(CFrameWnd)))		{			CWnd* pMessageBar = ((CFrameWnd*)pMainWnd)->GetMessageBar();			return DYNAMIC_DOWNCAST(CStatusBar, pMessageBar);		}		// otherwise traverse children to try and find the status bar...		else			return DYNAMIC_DOWNCAST(CStatusBar, 									pMainWnd->GetDescendantWindow(AFX_IDW_STATUS_BAR));	}}
开发者ID:flair2005,项目名称:AVOpenGL,代码行数:24,


示例7: ASSERT_VALID

//***********************************************************************************void CBCGPVisualManagerVS2005::OnFillHighlightedArea (CDC* pDC, CRect rect, 							CBrush* pBrush, CBCGPToolbarButton* pButton){	if (pButton != NULL && 		(m_CurrAppTheme == WinXpTheme_Blue || m_CurrAppTheme == WinXpTheme_Olive))	{		ASSERT_VALID (pButton);		CBCGPToolbarMenuButton* pMenuButton = 			DYNAMIC_DOWNCAST (CBCGPToolbarMenuButton, pButton);		BOOL bIsPopupMenu = pMenuButton != NULL &&			pMenuButton->GetParentWnd () != NULL &&			pMenuButton->GetParentWnd ()->IsKindOf (RUNTIME_CLASS (CBCGPPopupMenuBar));		if (bIsPopupMenu &&			(pButton->m_nStyle & TBBS_CHECKED) &&			pBrush == &m_brHighlightDn)		{			if (CBCGPToolBarImages::m_bIsDrawOnGlass)			{				CBCGPDrawManager dm (*pDC);				dm.DrawRect (rect, m_clrBarBkgnd, (COLORREF)-1);			}			else			{				pDC->FillRect (rect, &m_brMenuItemCheckedHighlight);			}			return;		}		if (pMenuButton != NULL && !bIsPopupMenu && pMenuButton->IsDroppedDown ())		{			if (CBCGPToolBarImages::m_bIsDrawOnGlass)			{				CBCGPDrawManager dm (*pDC);				dm.DrawRect (rect, m_clrBarBkgnd, (COLORREF)-1);			}			else			{				pDC->FillRect (rect, &m_brMenuButtonDroppedDown);			}			return;		}	}	CBCGPVisualManager2003::OnFillHighlightedArea (pDC, rect, pBrush, pButton);}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:49,


示例8: DYNAMIC_DOWNCAST

BOOL CPackagesPage::OnSetActive(){    CTeXSetupWizard *sheet = DYNAMIC_DOWNCAST(CTeXSetupWizard, GetParent());    if (sheet != 0) {        if (m_pageNext != 0) {            sheet->RemovePage(m_pageNext);            m_pageNext = 0;        }        sheet->SetWizardButtons (PSWIZB_BACK | PSWIZB_NEXT);        switch (g_eInstallType) {        case INSTALL_FULL:            // FIXME: Selection based on current / default scheme.            SelectDefault(g_vSourceTPM);            break;        case INSTALL_MAINTENANCE:            // If some package was given select it and jump to the next dialog            if (! g_sPackage.IsEmpty()) {                TPM *tpm = PackageLookup(g_sPackage);                if (tpm != 0) {                    tpm->Select();                }                else {                    theLog("Warning: `--add-package=%s' required, but package not found!/n",                           g_sPackage);                }            }            break;        case INSTALL_UNINSTALL:            break;        }    }    m_cPackages.UpdateStateImage(m_cPackages.GetRootItem());        m_bInstallDocumentation = g_bInstallDocumentation;    m_bInstallSource = g_bInstallSource;    UpdateData(FALSE);        int nRet = CPropertyPage::OnSetActive();        if (g_bQuickInstall) {        // sheet->PressButton(PSBTN_NEXT);        GdiFlush();        PostMessage(WM_NEXTPAGE);    }    return nRet;}
开发者ID:BackupTheBerlios,项目名称:texlive,代码行数:48,


示例9: DYNAMIC_DOWNCAST

CBCGPOleCntrFrameWnd::~CBCGPOleCntrFrameWnd(){	POSITION pos = NULL;	for (pos = m_dockManager.m_lstMiniFrames.GetHeadPosition (); pos != NULL;)	{		CBCGPMiniFrameWnd* pNextFrame = DYNAMIC_DOWNCAST (CBCGPMiniFrameWnd,					m_dockManager.m_lstMiniFrames.GetNext (pos));		if (pNextFrame != NULL)		{			pNextFrame->DestroyWindow ();		}	}	CList<HWND, HWND> lstChildren;	CWnd* pNextWnd = GetTopWindow ();	while (pNextWnd != NULL)	{		lstChildren.AddTail (pNextWnd->m_hWnd);		pNextWnd = pNextWnd->GetNextWindow ();	}	for (pos = lstChildren.GetHeadPosition (); pos != NULL;)	{		HWND hwndNext = lstChildren.GetNext (pos);		if (IsWindow (hwndNext) && ::GetParent (hwndNext) == m_hWnd)		{			::DestroyWindow (hwndNext);		}	}	const CObList& list = CBCGPToolBar::GetAllToolbars ();	CObList& gAllToolbars = const_cast<CObList&>(list);	for (pos = gAllToolbars.GetHeadPosition (); pos != NULL;)	{		POSITION posSave = pos;		CBCGPToolBar* pToolBar = (CBCGPToolBar*) gAllToolbars.GetNext (pos);		ASSERT (pToolBar != NULL);		if (CWnd::FromHandlePermanent (pToolBar->m_hWnd) == NULL)		{			gAllToolbars.RemoveAt (posSave);		}	}}
开发者ID:iclosure,项目名称:jframework,代码行数:48,


示例10: DYNAMIC_DOWNCAST

void CMainFrame::OnTerrainBrushSize2Spin( NMHDR* pNMHDR, LRESULT* pResult ){	NMXTPUPDOWN* tagNMCONTROL = (NMXTPUPDOWN*)pNMHDR;	CXTPControlEdit* pControl = DYNAMIC_DOWNCAST(CXTPControlEdit, tagNMCONTROL->pControl);	if (pControl)	{		String strHeight = Utility::UnicodeToEngine(pControl->GetEditText());		float height = Ogre::StringConverter::parseReal(strHeight) + tagNMCONTROL->iDelta;		ManipulatorSystem.GetTerrain().SetSquareBrushHeight(height);		std::wstring strNewHeight = Utility::EngineToUnicode(Ogre::StringConverter::toString(height));		pControl->SetEditText(strNewHeight.c_str());	}	*pResult = 1;}
开发者ID:mavaL,项目名称:MiniCraft,代码行数:16,


示例11: CreateWidgets

void CGUIEditor::CreateDocView(UINT xRes, UINT yRes){	CreateWidgets();		CGUIEditorDoc *createDoc;	// create blank document, with frame	createDoc = DYNAMIC_DOWNCAST(CGUIEditorDoc, m_DocTemplate->OpenDocumentFile(NULL));	createDoc->SetToolbar(&m_TabBar);	createDoc->NewGUISystem(xRes, yRes);		    SIZEDATA sd;	sd.m_fXSize = (float)xRes;	sd.m_fYSize = (float)yRes;	static DWORD msgHash_SetSize = CHashString(_T("SetSize")).GetUniqueID();	m_ToolBox->SendMessage(msgHash_SetSize, sizeof(SIZEDATA), &sd, &CHashString(_T("WorkingCanvas")), &CHashString(_T("CGUIBackground")));		}
开发者ID:klhurley,项目名称:ElementalEngine2,代码行数:16,


示例12: DYNAMIC_DOWNCAST

void CUIControler::updateTestAtRibbonCombo( CTest* pTest ){	CMainFrame* pMainFrame=(CMainFrame*)AfxGetMainWnd();	CMFCRibbonComboBox* pAnalyseTestsCombo = DYNAMIC_DOWNCAST(CMFCRibbonComboBox,pMainFrame->GetRibbonBar()->FindByID(WM_ANALYSIS_TEST_SELECT));	DWORD_PTR dwPtr=(DWORD_PTR)pTest;	pAnalyseTestsCombo->DeleteItem(dwPtr);	CString dispName=CCommonUtilities::toMFCString(pTest->getName())+_T("[")+/		CCommonUtilities::toMFCString(pTest->getDescription())+_T("]");	pAnalyseTestsCombo->AddItem(CCommonUtilities::toMFCString(dispName),(DWORD_PTR)pTest);}
开发者ID:geforce42376,项目名称:easyprofiler,代码行数:16,


示例13: DYNAMIC_DOWNCAST

void CMainFrame::SetAddress(LPCTSTR lpszUrl){    // This is called when the browser has completely loaded the new location,    // so make sure the text in the address bar is up to date and stop the    // animation.    CBCGPToolbarComboBoxButton* pAdress = DYNAMIC_DOWNCAST (CBCGPToolbarComboBoxButton,                                          m_wndAddressBar.GetButton (m_wndAddressBar.CommandToIndex (IDC_ADDRESS)));    if (pAdress != NULL)    {        ASSERT_VALID (pAdress);        pAdress->SetText (lpszUrl);    }//	m_wndAnimate.Stop();}
开发者ID:zxlooong,项目名称:bcgexp,代码行数:16,


示例14: DYNAMIC_DOWNCAST

BOOL CBCGPIE7DemoApp::SaveAllModified(){	if (!CWinApp::SaveAllModified ())	{		return FALSE;	}	CBCGPMDIFrameWnd* pMainFrame = 		DYNAMIC_DOWNCAST (CBCGPMDIFrameWnd, m_pMainWnd);	if (pMainFrame != NULL)	{		pMainFrame->SaveMDIState (GetRegSectionPath ());	}	return TRUE;}
开发者ID:zxlooong,项目名称:bcgexp,代码行数:16,


示例15: ASSERT_VALID

//****************************************************************************************void CBCGPToolBox::OnActivatePage (int /*nPage*/){	ASSERT_VALID (this);	CBCGPOutlookWnd* pOlWnd = DYNAMIC_DOWNCAST (CBCGPOutlookWnd, GetTabWnd ());	ASSERT_VALID (pOlWnd);	CBCGPToolBoxPage* pPage = GetPage (GetActivePage ());	if (pPage == NULL)	{		ASSERT (FALSE);		return;	}	pOlWnd->EnableScrollButtons (TRUE, pPage->m_nVertScrollOffset > 0, pPage->m_nVertScrollSize > 0);}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:17,


示例16: DYNAMIC_DOWNCAST

void CMainFrame::OnHelp(){	AnalyticsHelper::SendDeltaViewStatistics(_T("DeltaView Event: Help button pressed"));	if( !ShowHtmlHelp() )	{		CChildFrame* const pFrame = DYNAMIC_DOWNCAST( CChildFrame, MDIGetActive() );		if( pFrame )		{			pFrame->OnHelp();		}		else		{			GetApp()->WinHelp( 1 );		}	}}
开发者ID:killbug2004,项目名称:WSProf,代码行数:16,


示例17: CDialog

CMainDialog::CMainDialog(CWnd* pParentWnd):CDialog(IDD_XCRASHREPORT_MAIN, pParentWnd),m_hIcon(NULL),m_hSmIcon(NULL),m_hLinkCursor(NULL),m_nFilesInZip(0),m_bOverIcon(FALSE),m_hPrevCursor(NULL){	CCrashReporterApp* pApp = DYNAMIC_DOWNCAST(CCrashReporterApp, AfxGetApp());	ASSERT_VALID(pApp);	// load dialog's icons	m_hIcon = pApp->LoadIcon(IDI_APP_ICON);	m_hSmIcon = pApp->LoadSmIcon(MAKEINTRESOURCE(IDI_APP_ICON));}
开发者ID:zephyrer,项目名称:update-it,代码行数:16,


示例18: GetTopLevelFrame

void CSynBCGPEditView::OnUpdateCursorPos( CCmdUI * /*pCmdUI*/ ){	CBCGPRibbonStatusBar* pStatusBar = ((CMainFrame*) GetTopLevelFrame ())->GetRibbonStatusBar ();	CBCGPRibbonStatusBarPane* pCursorPos = DYNAMIC_DOWNCAST (		CBCGPRibbonStatusBarPane,		pStatusBar->FindElement (ID_STATUSBAR_PANE3));	ASSERT_VALID (pCursorPos);	CString strCursorPos, strTemp;	BOOL bNameValid = strTemp.LoadString(IDS_STATUS_ROWCOL);	ASSERT(bNameValid);	strCursorPos.Format (strTemp, m_pEdit->GetCurRow() + 1, m_pEdit->GetCurColumn() + 1);	pCursorPos->SetText (strCursorPos);	pCursorPos->Redraw ();}
开发者ID:20400992,项目名称:CoolFormat,代码行数:16,


示例19: DYNAMIC_DOWNCAST

//*************************************************************************************BOOL CBCGPFullScreenImpl::ShouldProccessTabbedBar (CBCGPTabbedControlBar* pTabbedBar){	int nTabsNum = pTabbedBar->GetTabsNum ();	for (int i = 0; i < nTabsNum; i++)	{		CBCGPDockingControlBar* pBar = DYNAMIC_DOWNCAST(CBCGPDockingControlBar, pTabbedBar->FindBarByTabNumber (i, TRUE));		ASSERT_VALID (pBar);			if (!pBar->HideInFullScreenMode ())		{			return TRUE;		}	}	return FALSE;}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:17,


示例20: ASSERT_VALID

//*********************************************************************************void CBCGPPrintPreviewView::OnUpdatePreviewNumPage(CCmdUI *pCmdUI) {	CPreviewView::OnUpdateNumPageChange(pCmdUI);	//--------------------------------------------------	// Change the Icon of AFX_ID_PREVIEW_NUMPAGE button:	//--------------------------------------------------	UINT nPages = m_nZoomState == ZOOM_OUT ? m_nPages : m_nZoomOutPages;#ifndef BCGP_EXCLUDE_RIBBON	if (m_pWndRibbonBar != NULL && m_pWndRibbonBar->IsVisible())	{		ASSERT_VALID (m_pWndRibbonBar);		if (m_pNumPageButton == NULL)		{			m_pNumPageButton = DYNAMIC_DOWNCAST (				CBCGPRibbonButton,				m_pWndRibbonBar->GetActiveCategory ()->FindByID (AFX_ID_PREVIEW_NUMPAGE));		}		if (m_pNumPageButton != NULL)		{			ASSERT_VALID (m_pNumPageButton);			int nImageIndex = nPages == 1 ? 5 : 4;			if (m_pNumPageButton->GetImageIndex (TRUE) != nImageIndex)			{				m_pNumPageButton->SetImageIndex (nImageIndex, TRUE);				m_pNumPageButton->SetKeys (nPages == 1 ? _T("2") : _T("1"));				m_pNumPageButton->Redraw ();			}		}	}	else#endif	if (m_wndToolBar.GetSafeHwnd () != NULL)	{		CBCGPToolbarButton* pButton = m_wndToolBar.GetButton (m_iPagesBtnIndex);		ASSERT_VALID (pButton);		pButton->SetImage (nPages == 1 ? m_iTwoPageImageIndex : m_iOnePageImageIndex);		m_wndToolBar.InvalidateRect (pButton->Rect ());	}}
开发者ID:iclosure,项目名称:jframework,代码行数:48,


示例21: ASSERT

void COXCustomizeToolbarsPage::OnButtonDelete() {	// TODO: Add your control notification handler code here	HTREEITEM hItem=m_treeToolbars.GetSelectedItem();	ASSERT(hItem!=NULL);	CWnd* pWnd=AfxGetMainWnd();	ASSERT(pWnd!=NULL);	CFrameWnd* pFrameWnd=DYNAMIC_DOWNCAST(CFrameWnd,pWnd);	ASSERT(pFrameWnd!=NULL);	CToolBar* pToolbar=(CToolBar*)m_treeToolbars.GetItemData(hItem);	ASSERT(pToolbar!=NULL);	BOOL bWasFloating=pToolbar->IsFloating();	int nToolbarIndex=-1;	VERIFY(m_mapAssociatedToolbars.Lookup(pToolbar,nToolbarIndex));	ASSERT(nToolbarIndex!=-1);	OXCUSTOMIZE_TOOLBARINFO& rtbInfo=m_arrToolbars[nToolbarIndex];	ASSERT(rtbInfo.m_pToolBar==pToolbar);	ASSERT(rtbInfo.m_bCustomMade);	VERIFY(pToolbar->DestroyWindow());	POSITION pos=pFrameWnd->m_listControlBars.Find(pToolbar);	if(pos!=NULL)		pFrameWnd->m_listControlBars.RemoveAt(pos);		m_mapAssociatedToolbars.RemoveKey(pToolbar);	pos=m_mapAssociatedToolbars.GetStartPosition();	while(pos!=NULL)	{		CToolBar* pToolbarTest=NULL;		int nIndexTest=-1;		m_mapAssociatedToolbars.GetNextAssoc(pos,pToolbarTest,nIndexTest);		ASSERT(pToolbarTest!=NULL);		ASSERT(nIndexTest!=-1 && nIndexTest!=nToolbarIndex);		if(nIndexTest>nToolbarIndex)			m_mapAssociatedToolbars.SetAt(pToolbarTest,nIndexTest-1);	}	m_arrToolbars.RemoveAt(nToolbarIndex);	m_treeToolbars.DeleteItem(hItem);	if(!bWasFloating)		pFrameWnd->RecalcLayout();}
开发者ID:Spritutu,项目名称:AiPI-1,代码行数:47,


示例22: _T

bool CExtMiniDockFrameWnd::_GetSingleVisibleCaptionText( CExtSafeString & sCaption ){	sCaption = _T("");CFrameWnd * pDockSite = GetParentFrame();	if( pDockSite == NULL )		return false;	ASSERT( !pDockSite->IsKindOf(RUNTIME_CLASS(CMiniFrameWnd)) );POSITION pos = pDockSite->m_listControlBars.GetHeadPosition();	for( ; pos != NULL; )	{		CExtControlBar * pBar =			DYNAMIC_DOWNCAST(				CExtControlBar,				((CControlBar *)(pDockSite->m_listControlBars.GetNext(pos)))				);		if(		pBar == NULL			||	pBar->m_pDockSite == NULL			||	pBar->IsFixedMode()			||	(	pBar->IsKindOf(RUNTIME_CLASS(CExtDynControlBar))#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)					&& !pBar->IsKindOf(RUNTIME_CLASS(CExtDynTabControlBar))#endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS)				)			||	pBar->GetParentFrame() != this			||	pBar->IsFloating()			||	!pBar->IsVisible()			)			continue;		ASSERT( pBar->m_pDockBar != NULL );		if(#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)			pBar->m_pDockBar->IsKindOf(RUNTIME_CLASS(CExtDockDynTabBar))			||#endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS)			!pBar->m_pDockBar->IsKindOf(RUNTIME_CLASS(CExtDockBar))			)			continue;		if( ! pBar->_IsSingleVisibleInFloatingPalette() )			return false;		pBar->OnGetBarCaptionText(			CExtControlBar::__EBCT_SINGLE_CAPTION_FLOATING,			sCaption			);		return sCaption.IsEmpty() ? false : true;	}	return false;}
开发者ID:ngphloc,项目名称:agmagic,代码行数:47,


示例23: DYNAMIC_DOWNCAST

//*******************************************************************************void CShopTabWnd::OnLButtonDown (UINT nFlags, CPoint point){    if (IsPtInMenuArea (point))    {        return;    }    if (GetTabFromPoint (point) < 0)    {        CBCGPTabbedControlBar* pParent = DYNAMIC_DOWNCAST(CBCGPTabbedControlBar, GetParent ());        if (pParent)        {            pParent->SendMessage(WM_LBUTTONDOWN, (WPARAM)nFlags, MAKELPARAM (point.x, point.y));            return;        }    }    CBCGPTabWnd::OnLButtonDown(nFlags, point);}
开发者ID:zxlooong,项目名称:bcgexp,代码行数:18,


示例24: Initialize

BOOL CReviewPage::OnSetActive() {    // TODO: Add your specialized code here and/or call the base class    Initialize();    CTeXSetupWizard *sheet = DYNAMIC_DOWNCAST(CTeXSetupWizard, GetParent());    if (sheet != 0) {        sheet->SetWizardButtons (PSWIZB_BACK | PSWIZB_NEXT);        if (m_pageNext != 0) {            sheet->RemovePage(m_pageNext);            m_pageNext = 0;        }    }	    return CPropertyPage::OnSetActive();}
开发者ID:BackupTheBerlios,项目名称:texlive,代码行数:17,


示例25: ASSERT_VALID

//*******************************************************************************CBCGPDiagramItemID CBCGPDiagramVisualContainer::AddItem (CBCGPBaseVisualObject* pObject, BOOL bAutoDestroy){	ASSERT_VALID (this);	if (!CBCGPVisualContainer::Add (pObject, bAutoDestroy))	{		return CBCGPDiagramItemID ();	}		CBCGPDiagramVisualObject* pDiagramItem = DYNAMIC_DOWNCAST(CBCGPDiagramVisualObject, pObject);	if (pDiagramItem != NULL)	{		return pDiagramItem->GetItemID ();	}	return CBCGPDiagramItemID ();}
开发者ID:iclosure,项目名称:jframework,代码行数:18,


示例26: DYNAMIC_DOWNCAST

//*******************************************************************************void CBCGPDiagramVisualContainer::NotifyConnectorOnDisconnect (const CBCGPDiagramItemID& idObjectToDisconnect, const CBCGPDiagramItemID& idConnector){	CBCGPDiagramConnector* pConnector = DYNAMIC_DOWNCAST(CBCGPDiagramConnector, GetConnector (idConnector));	if (pConnector != NULL)	{		//pConnector->DisconnectFrom (idObjectToDisconnect);		for (int i = 0; i < pConnector->GetPointCount (); i++)		{			CBCGPDiagramAnchorPoint& ptAnchor = pConnector->AnchorPoint (i);			if (idObjectToDisconnect == ptAnchor.m_idObject)			{				ptAnchor = CBCGPDiagramAnchorPoint::NullAnchor (CalculatePoint (ptAnchor));			}		}	}}
开发者ID:iclosure,项目名称:jframework,代码行数:18,


示例27: BCGPPrintPreview

//*********************************************************************************BCGCBPRODLLEXPORT void BCGPPrintPreview (CView* pView){	ASSERT_VALID (pView);#ifndef BCGP_EXCLUDE_RIBBON	CFrameWnd* pParentFrame = BCGPGetParentFrame (pView);	ASSERT_VALID (pParentFrame);	CFrameWnd* pToplevelFrame = pParentFrame;	if (pToplevelFrame->IsKindOf (RUNTIME_CLASS (CBCGPMDIChildWnd)))	{		pToplevelFrame = pToplevelFrame->GetTopLevelFrame ();	}	CBCGPRibbonBar* pWndRibbonBar = DYNAMIC_DOWNCAST (CBCGPRibbonBar,		pToplevelFrame->GetDlgItem (AFX_IDW_RIBBON_BAR));	if (pWndRibbonBar != NULL && pWndRibbonBar->ShowBackstagePrintView())	{		return;	}#endif	if (g_pActivePrintPreview != NULL &&		CWnd::FromHandlePermanent (g_pActivePrintPreview->GetSafeHwnd ()) != NULL)	{		return;	}	CPrintPreviewState *pState= new CPrintPreviewState;	ASSERT (g_pPrintPreviewlocaRes == NULL);	g_pPrintPreviewlocaRes = new CBCGPLocalResource;	if (!pView->DoPrintPreview (IDD_BCGBAR_RES_PRINT_PREVIEW, pView, 		RUNTIME_CLASS (CBCGPPrintPreviewView), pState))	{		TRACE0("Error: OnFilePrintPreview failed./n");		AfxMessageBox (AFX_IDP_COMMAND_FAILURE);		delete pState;      // preview failed to initialize, delete State now	}	ASSERT (g_pPrintPreviewlocaRes == NULL);}
开发者ID:iclosure,项目名称:jframework,代码行数:47,


示例28: ASSERT_VALID

//**************************************************************************void CBCGPRibbonComboBox::OnSelectItem (int nItem){	ASSERT_VALID (this);	SelectItem (nItem);	m_RecentChangeEvt = CBCGPRibbonEdit::BCGPRIBBON_EDIT_CHANGED_FROM_DROPDOWN;	NotifyCommand (TRUE);	if (m_pParentMenu != NULL)	{		ASSERT_VALID (m_pParentMenu);		if (m_pParentMenu->IsFloaty ())		{			CBCGPRibbonFloaty* pFloaty = DYNAMIC_DOWNCAST (				CBCGPRibbonFloaty, m_pParentMenu->GetParent ());			if (pFloaty != NULL && !pFloaty->IsContextMenuMode ())			{				if (m_pWndEdit->GetSafeHwnd () != NULL && m_pWndEdit->GetTopLevelFrame () != NULL)				{					m_pWndEdit->GetTopLevelFrame ()->SetFocus ();				}				Redraw ();				return;			}		}		CFrameWnd* pParentFrame = BCGPGetParentFrame (m_pParentMenu);		ASSERT_VALID (pParentFrame);		pParentFrame->PostMessage (WM_CLOSE);	}	else	{		if (m_pWndEdit->GetSafeHwnd () != NULL && m_pWndEdit->GetTopLevelFrame () != NULL)		{			m_bNotifyCommand = FALSE;			m_pWndEdit->GetTopLevelFrame ()->SetFocus ();		}		Redraw ();	}}
开发者ID:iclosure,项目名称:jframework,代码行数:47,



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


C++ D_函数代码示例
C++ DYNAMIC_CAST函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。