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

C++ MDIGetActive函数代码示例

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

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



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


示例16: MDIGetActive

BOOL CMainFrame::PreTranslateMessage(MSG* pMsg)
{
	if(CMDIFrameWindowImpl<CMainFrame>::PreTranslateMessage(pMsg))
		return TRUE;

	HWND hWnd = MDIGetActive();
	if(hWnd != NULL)
		return (BOOL)::SendMessage(hWnd, WM_FORWARDMSG, 0, (LPARAM)pMsg);

	return FALSE;
}
开发者ID:moon-sky,项目名称:fishjam-template-library,代码行数:11,代码来源:MainFrm.cpp


示例17: MDIGetActive

BOOL MainFrameBase::PreTranslateMessage(MSG* pMsg)
{
   if (pMsg == NULL)
      return FALSE;

   bool bCalledBaseClass = false;

   if (pMsg->hwnd == m_hWnd || pMsg->hwnd == m_hWndMDIClient)
   {
      // Message is sent directly to main frame or
      // to the MDIClient window
      if (baseClass::PreTranslateMessage(pMsg))
         return TRUE;

      bCalledBaseClass = true;
   }

   HWND hWndFocus = ::GetFocus();
   HWND hWndMDIActive = MDIGetActive();

   if ((hWndMDIActive == hWndFocus) || (::IsChild(hWndMDIActive, hWndFocus)))
   {
      // Message is sent to Active MDI child frame
      // or a descendant
      // NOTE: IsChild checks if the window is a direct child or a descendant

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

      bCalledBaseClass = true;

      if (hWndMDIActive != NULL)
      {
         return (BOOL)::SendMessage(hWndMDIActive, WM_FORWARDMSG, 0, (LPARAM)pMsg);
      }
   }

   if (!bCalledBaseClass)
   {
      // If the base class hasn't already had a shot at doing
      // PreTranslateMessage (because the main frame or an
      // MDI child didn't have focus), call it now
      if (baseClass::PreTranslateMessage(pMsg))
         return TRUE;

      // Give active MDI child a chance.
      if (hWndMDIActive != NULL)
      {
         return (BOOL)::SendMessage(hWndMDIActive, WM_FORWARDMSG, 0, (LPARAM)pMsg);
      }
   }

   return FALSE;
}
开发者ID:vividos,项目名称:MultiplayerOnlineGame,代码行数:54,代码来源:MainFrameBase.cpp


示例18: OnUpdateEditRepeatUp

void CMainFrame::OnUpdateEditRepeatUp(CCmdUI *pCmdUI)
{
    if (MDIGetActive())
    {
        pCmdUI->Enable(TRUE);
    }
    else
    {
        pCmdUI->Enable(FALSE);
    }
}
开发者ID:cdesjardins,项目名称:DCom,代码行数:11,代码来源:MainFrm.cpp


示例19: OnUpdateOpenFileClipboard

void CMainFrame::OnUpdateOpenFileClipboard(CCmdUI *pCmdUI)
{
    if (MDIGetActive())
    {
        pCmdUI->Enable(TRUE);
    }
    else
    {
        pCmdUI->Enable(FALSE);
    }
}
开发者ID:cdesjardins,项目名称:DCom,代码行数:11,代码来源:MainFrm.cpp


示例20: OnUpdateFileCapture

void CMainFrame::OnUpdateFileCapture(CCmdUI *pCmdUI)
{
    if (MDIGetActive())
    {
        pCmdUI->Enable(TRUE);
    }
    else
    {
        pCmdUI->Enable(FALSE);
    }
}
开发者ID:cdesjardins,项目名称:DCom,代码行数:11,代码来源:MainFrm.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ MDLCACHE_CRITICAL_SECTION函数代码示例发布时间:2022-05-30
下一篇:
C++ MDFN_printf函数代码示例发布时间: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