当前位置: 首页>>代码示例>>C++>>正文


C++ MDIGetActive函数代码示例

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


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

示例1: MDIGetActive

void CMainWindow::OnUpdateFileOpen( CCmdUI* pCmdUI ) {
	pCmdUI->Enable(
		MDIGetActive() &&
		MDIGetActive()->IsKindOf( RUNTIME_CLASS( CStudentChooserWnd ) ) &&
		chooser->IsWindowVisible()
	);
}
开发者ID:bklimt,项目名称:StudentInfo,代码行数:7,代码来源:MainWindow.cpp

示例2: AfxGetMetadataTree

void CMainFrame::OnClose() 
{
	if(AfxGetModuleManager())
		if(!AfxGetModuleManager()->IsCanDestroy())
			return;//программа не разрешила закрывать

	if(AfxGetMetadataTree())
		if(AfxGetMetadataTree()->GetParent())
		{
			afxExitMode=1;
			AfxGetMetadataTree()->SaveOpenModulesState();
			//AfxGetMetadataTree()->GetParent()->BringWindowToTop();
		}

	CMDIChildWnd* pChild;
	while(pChild=MDIGetActive())
	{
		pChild->SendMessage(WM_CLOSE);
		if(pChild==MDIGetActive())
			return;//была нажата кнопка ќтмена
	}


	afxExitMode=0;
	pMessageWindow=0;
	pStatusBar=0;

  //  m_MDIClient.SaveMainFrameState();

	CMDIFrameWnd::OnClose();
}
开发者ID:open2cerp,项目名称:Open2C-ERP,代码行数:31,代码来源:MainFrm.cpp

示例3: ApplyNodesChange

void CMainFrame::ApplyNodesChange(LGeometryData::NodesConstIterator it,
	double x, double y, LGeometryData::EBoundaryType bnd, 
	bool delete_all_containing )
{
	CGeometry2dView* pView = NULL;
	CGeometry2dDoc* pDoc = NULL;

	POSITION pos;
		
	CChildFrame* pChild = static_cast<CChildFrame*>(MDIGetActive());
	if ( pChild )
	{
		pDoc = static_cast<CGeometry2dDoc*>(pChild->GetActiveDocument());
		if ( pDoc )
		{
			pos = pDoc->GetFirstViewPosition();
			if ( pos )
			{
				pView = static_cast<CGeometry2dView*>(pDoc->GetNextView(pos));
				if ( pView )
				{
					pDoc->PrepareUndo();
					pDoc->GetData().SetCoordinates(it,x,y);
					pDoc->GetData().SetBoundary(it,bnd);
					if ( delete_all_containing )
						pDoc->GetData().RemoveAllContainingNode(it);
					pView->PrepareBuffer();
					pView->RedrawWindow();
					return;
				}
			}
		}
	}	
	UnsetNodeForProperties();
}
开发者ID:fourier,项目名称:Geometry2d,代码行数:35,代码来源:MainFrm.cpp

示例4: ChangeProperties

void CMainFrame::ChangeProperties(short scale, CGeometry2dView::ENodeDrawingMode mode,
	LGeometryData::EBoundaryCondition cond)
{
	CGeometry2dView* pView = NULL;
	CGeometry2dDoc* pDoc = NULL;

	POSITION pos;
		
	CChildFrame* pChild = static_cast<CChildFrame*>(MDIGetActive());
	if ( pChild )
	{
		pDoc = static_cast<CGeometry2dDoc*>(pChild->GetActiveDocument());
		if ( pDoc )
		{
			pos = pDoc->GetFirstViewPosition();
			if ( pos )
			{
				pView = static_cast<CGeometry2dView*>(pDoc->GetNextView(pos));
				if ( pView )
				{
					m_wndInBarProperties.SetScale(scale);
					m_wndInBarProperties.SetNodeDrawingMode(mode);
					m_wndInBarProperties.SetBoundaryConditions(cond);
					pView->GeometryProperties(scale,mode,cond);
				}
			}
		}
	}
}
开发者ID:fourier,项目名称:Geometry2d,代码行数:29,代码来源:MainFrm.cpp

示例5: MDIGetActive

LRESULT CMDIFrameWnd::OnCommandHelp(WPARAM wParam, LPARAM lParam)
{
	if (lParam == 0 && IsTracking())
		lParam = HID_BASE_COMMAND+m_nIDTracking;

	CMDIChildWnd* pActiveChild = MDIGetActive();
	if (pActiveChild != NULL && AfxCallWndProc(pActiveChild,
	  pActiveChild->m_hWnd, WM_COMMANDHELP, wParam, lParam) != 0)
	{
		// handled by child
		return TRUE;
	}

	if (CFrameWnd::OnCommandHelp(wParam, lParam))
	{
		// handled by our base
		return TRUE;
	}

	if (lParam != 0)
	{
		CWinApp* pApp = AfxGetApp();
		if (pApp != NULL)
		{
			AfxGetApp()->WinHelpInternal(lParam);
			return TRUE;
		}
	}
	return FALSE;
}
开发者ID:AeonAxan,项目名称:mpc-hc,代码行数:30,代码来源:winmdi.cpp

示例6: OnHelp

BOOL CMainFrame::PreTranslateMessage( MSG* pMsg )
{
	if( pMsg->message == 0x4d )  //0x4d = button F1	
	{
		AnalyticsHelper::SendDeltaViewStatistics(_T("DeltaView Event: F1 key pressed raising help button click"));
		OnHelp();
		return TRUE;
	}
	if( pMsg->message == WM_KEYUP )
	{
		switch (pMsg->wParam)
		{	
		case VK_F3:		
			CChildFrame *pFrame = DYNAMIC_DOWNCAST( CChildFrame, MDIGetActive() );

			if (pFrame && pFrame->GetSummaryWnd()->IsVisible() )
			{
				pFrame->GetSummaryWnd()->NavigateSearch(1); // 1 for forward -> allowed -1 for back (not implelented)
				return TRUE;
			}
			break;
		}

	}
	return CMDIFrameWndEx::PreTranslateMessage( pMsg );
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:26,代码来源:MainFrm.cpp

示例7: GetCountMDIChildWnds

BOOL CMainFrame::CloseAll(UINT iDontPrompt)
{
	AnalyticsHelper::SendDeltaViewStatistics(_T("DeltaView Event: Close All"));
	CMDIChildWnd* pLastChild = NULL;
	CloseOption closeOption = kUserSpecified;
	int nSiblingCount = GetCountMDIChildWnds();

	while( CMDIChildWnd* const pChild = MDIGetActive() )
	{
		if( pLastChild == pChild )
			return TRUE;

		pLastChild = pChild;

		if (iDontPrompt)
		{
			CDVController* pController = GetDVController(DYNAMIC_DOWNCAST(CChildFrame, pChild));
			pController->SetModifiedFlag(false);
		}

		closeOption = static_cast<CloseOption>( pChild->SendMessage( WM_CLOSE_MUPLITPLE, --nSiblingCount, closeOption ) );
		if (closeOption == kCancel)
			return FALSE;
	}
	return TRUE;
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:26,代码来源:MainFrm.cpp

示例8: switch

void CMainFrame::OnComparisonModeSelected(WSCONVERTERLib::dvComparisonOption dvOption)
{
	switch (dvOption)
	{
	case WSCONVERTERLib::dvCompareFast:
		AnalyticsHelper::SendDeltaViewStatistics(_T("DeltaView Event: Fast Comparison Mode Selected"));
		break;
	case WSCONVERTERLib::dvCompareStandard:
		AnalyticsHelper::SendDeltaViewStatistics(_T("DeltaView Event: Standart Comparison Mode Selected"));
		break;
	case WSCONVERTERLib::dvCompareTextOnly:
		AnalyticsHelper::SendDeltaViewStatistics(_T("DeltaView Event: Text Only Comparison Mode Selected"));
		break;
	case WSCONVERTERLib::dvCompareWithoutOcr:
		AnalyticsHelper::SendDeltaViewStatistics(_T("DeltaView Event: Without OCR Comparison Mode Selected"));
		break;
	case WSCONVERTERLib::dvCompareUnknown:
	default: 
		AnalyticsHelper::SendDeltaViewStatistics(_T("DeltaView Event: Unknown Comparison Mode Selected"));
		break;
	}
	if (GetApp()->RevertToClassicUI())
		return;

	if (GetSelectedComparisonOption() != dvOption)
	{
		// rerun comparison -> active child
		CChildFrame* const pFrame = DYNAMIC_DOWNCAST( CChildFrame, MDIGetActive() );
		if (pFrame)
		{
			SetCurrentComparisonOption(dvOption);
			pFrame->ReCompare(dvOption);
		}
	}
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:35,代码来源:MainFrm.cpp

示例9: GetActiveFrame

HWND CMDIFrameWnd::GetActiveFrame()
{
	HWND hActiveChild=MDIGetActive();
	if (hActiveChild==NULL)
		return m_hWnd;
	return hActiveChild;
}
开发者ID:eladkarako,项目名称:locate32,代码行数:7,代码来源:WindowClasses.cpp

示例10: GetActiveDocument

void CMDIFrameWnd::OnUpdateFrameTitle(BOOL bAddToTitle)
{
	if ((GetStyle() & FWS_ADDTOTITLE) == 0)
		return;     // leave it alone!

#ifndef _AFX_NO_OLE_SUPPORT
	// allow hook to set the title (used for OLE support)
	if (m_pNotifyHook != NULL && m_pNotifyHook->OnUpdateFrameTitle())
		return;
#endif

	CMDIChildWnd* pActiveChild = NULL;
	CDocument* pDocument = GetActiveDocument();
	if (bAddToTitle &&
	  (pActiveChild = MDIGetActive()) != NULL &&
	  (pActiveChild->GetStyle() & WS_MAXIMIZE) == 0 &&
	  (pDocument != NULL ||
	   (pDocument = pActiveChild->GetActiveDocument()) != NULL))
		UpdateFrameTitleForDocument(pDocument->GetTitle());
	else
	{
		LPCTSTR lpstrTitle = NULL;
		CString strTitle;

		if (pActiveChild != NULL &&
			(pActiveChild->GetStyle() & WS_MAXIMIZE) == 0)
		{
			strTitle = pActiveChild->GetTitle();
			if (!strTitle.IsEmpty())
				lpstrTitle = strTitle;
		}
		UpdateFrameTitleForDocument(lpstrTitle);
	}
}
开发者ID:AeonAxan,项目名称:mpc-hc,代码行数:34,代码来源:winmdi.cpp

示例11: GetApp

void CMainFrame::OnRenderingSet(UINT nID)
{
	CStdString selectedRenderingSet = Ribbon::GetRenderingSetNameByID(nID);
	if (!selectedRenderingSet.IsEmpty() && selectedRenderingSet.CompareNoCase(CStdString::LoadResource(IDS_TXTEX_customRenderingSet6129,_T("Custom rendering set"))) != 0)
	{
		if (!RenderingSet::LoadRenderingSetIfRequired(selectedRenderingSet))
		{
			GetApp()->ShowMessageEx(this->m_hWnd, 
				CStdStringW::LoadResource(IDS_TXTEX_theOptionsFileSpecifiedDoesNotHaveCorrectInformationPleaseMakeSureThisIsaValidOptionsFileCurrentSettingsWillBeApplied5086,_T("The options file specified does not have the correct information - please make sure this is a valid options file.\n\nCurrent settings will be applied.")),
				WsOK,
				WsDefault,
				WsErrorIcon,
				L"",
				CDeltaVwApp::GetProductHelpID(HIDC_INVALID_OPTIONS_FILE),
				LOG_LOCATION);

			return;
		}
	}
	Workshare::OptionApi::SetString(L"CurrentRenderingSet", selectedRenderingSet.c_str()); 

	CChildFrame* const pFrame = DYNAMIC_DOWNCAST( CChildFrame, MDIGetActive() );
	if( pFrame )
	{
		CStdString str;
		str.Format(_T("DeltaView Event: Change rendering set to %s"),selectedRenderingSet.c_str());
		AnalyticsHelper::SendDeltaViewStatistics(str.c_str());
		pFrame->ReCompare(m_dvComparisonOption, true);
	}
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:30,代码来源:MainFrm.cpp

示例12: DoCloseWnd

int CMainFrame::DoCloseWnd(CExtControlBar &Box)//заданное ќкно, которое требуетс¤ закрыть
{
	CWnd *pWnd=GetFocus();
	if(pWnd)
	{
		CWnd *pParent=pWnd->GetParent();
		if(pParent==&Box)//если текущее окно - заданное ќкно, то не закрываем
		{
			CMDIChildWnd* pView=MDIGetActive();
			if(pView)
			{
				MDIActivate(pView);
				pView->SetFocus();
				return 0;
			}
		}
		//иначе, если открыто заданное ќкно - закрываем
		if(Box.IsVisible())
		{
			ShowControlBar(&Box,0,1);	
			return 1;
		}
	}
	return -1;
}
开发者ID:open2cerp,项目名称:Open2C-ERP,代码行数:25,代码来源:MainFrm.cpp

示例13: DYNAMIC_DOWNCAST

void CMainFrame::OnUpdateMailTo(CCmdUI *pCmdUI)
{
	CChildFrame* const pFrame = DYNAMIC_DOWNCAST( CChildFrame, MDIGetActive() );
	if( pFrame )
		pFrame->OnUpdateMailTo( pCmdUI );
	else
		pCmdUI->Enable( FALSE );
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:8,代码来源:MainFrm.cpp

示例14: GetActiveUIView

CUIDesignerView* CMainFrame::GetActiveUIView() const
{
	CMDIChildWnd* pFrame=MDIGetActive();
	if(!pFrame)
		return NULL;

	return DYNAMIC_DOWNCAST(CUIDesignerView,pFrame->GetActiveView());
}
开发者ID:ddcatgg,项目名称:duilib,代码行数:8,代码来源:MainFrm.cpp

示例15: WindowProc

LRESULT CMDIFrameWnd::WindowProc(UINT msg,WPARAM wParam,LPARAM lParam)
{
	if (msg==WM_NCACTIVATE)
	{
		HWND hActiveWnd=MDIGetActive();
		if (hActiveWnd!=NULL)
			::SendMessage(hActiveWnd,WM_NCACTIVATE,wParam,lParam);
	}
	return CFrameWnd::WindowProc(msg,wParam,lParam);
}
开发者ID:eladkarako,项目名称:locate32,代码行数:10,代码来源:WindowClasses.cpp


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