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

C++ GetActiveView函数代码示例

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

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



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

示例1: OnShowSensorNb

/**
* 响应上工具条按钮;选择检波器Nb
* @param void
* @return void
*/
void CSensorGraphChildFrame::OnShowSensorNb(UINT nID) 
{
	CSensorGraphView* pView = (CSensorGraphView*)GetActiveView();

	unsigned int uiIndex = 0;
	uiIndex = nID - ID_BUTTON_MATRIX_SENSOR_GRAPH_NBSTART;

	CToolbarGraphButton* pBNSensorNb = NULL;
	pBNSensorNb = (CToolbarGraphButton*)m_oGraphViewTopToolBar.GetButton(uiIndex);

	POSITION pos;
	CSensorData oSensorData;
	pos = m_pSiteData->m_oSensorList.m_olsSensor.FindIndex(uiIndex);
	oSensorData = m_pSiteData->m_oSensorList.m_olsSensor.GetAt(pos);

	if(1 == pBNSensorNb->m_iMode)
	{
		pBNSensorNb->m_iMode = 0;
		m_oSensorNbMap.RemoveKey(oSensorData.m_uiNb);
	}
	else
	{
		m_oSensorNbMap.SetAt(oSensorData.m_uiNb, oSensorData.m_uiNb);
		pBNSensorNb->m_iMode = 1;
	}
	m_oGraphViewTopToolBar.InvalidateButton(uiIndex);

	pView->RedrawWindow();
}
开发者ID:liquanhai,项目名称:cxm-hitech-matrix428,代码行数:34,代码来源:SensorGraphChildFrame.cpp


示例2: OnSelectTestType

/**
* 响应上工具条按钮;选择测试类型
* @param void
* @return void
*/
void CSensorGraphChildFrame::OnSelectTestType() 
{
	CSensorGraphView* pView = (CSensorGraphView*)GetActiveView();

	CBCGPToolbarComboBoxButton* pComboButton = NULL;
	pComboButton = (CBCGPToolbarComboBoxButton*)m_oGraphViewTopToolBar.GetButton(9 + m_uiSensorNbCount);
	m_strTestType = pComboButton->GetText();
	m_uiTestType = m_pSiteData->GetTestTypeIDByString(m_strTestType);
	if(40 != m_uiTestType)
	{
		// 得到检波器TestType判据字符串
		m_strTestType = m_pSiteData->GetSensorTestTypeLimitStringByID(m_uiTestType);
	}
	CToolbarGraph* pBNGraph = NULL;
	pBNGraph = (CToolbarGraph*)m_oGraphViewTopToolBar.GetButton(2 + m_uiSensorNbCount);
	pBNGraph->m_iMode = 1;
	if(15 == m_uiTestType)	// 检波器电阻
	{
		pBNGraph->m_iMode = 2;
	}
	pBNGraph->m_strLabel = m_strTestType;
	m_oGraphViewTopToolBar.InvalidateButton(2 + m_uiSensorNbCount);

	pView->RedrawWindow();
}
开发者ID:liquanhai,项目名称:cxm-hitech-matrix428,代码行数:30,代码来源:SensorGraphChildFrame.cpp


示例3: GetActiveView

BOOL CMainFrame::OnQueryNewPalette()
{
	CView* pView = GetActiveView();
	if (pView != NULL)
		return (BOOL) pView->SendMessage(WM_QUERYNEWPALETTE);
	return FALSE;
}
开发者ID:jetlive,项目名称:skiaming,代码行数:7,代码来源:mainfrm.cpp


示例4: return

BOOL CMainFrame::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo) 
{
   BOOL tHandled;
   CWnd* pView;

   // First, try the default routing scheme.
   tHandled = CFrameWnd::OnCmdMsg( nID, nCode, pExtra, pHandlerInfo );
   if( tHandled )
   {
	  return( TRUE );
   }

   // If nobody handled it, and the main view isn't active, try the main view.
   pView = m_wndSplitter.GetPane( 0, 1 );
   if( pView != GetActiveView() )
   {
	  tHandled = pView->OnCmdMsg( nID, nCode, pExtra, pHandlerInfo );
	  if( tHandled )
	  {
		 return( TRUE );
	  }
   }

   return( FALSE );
}
开发者ID:xfxf123444,项目名称:japan,代码行数:25,代码来源:MainFrm.cpp


示例5: GetActiveView

// All child frame's will have exactly one CHexEditView (unless in print preview?).  This returns it.
CHexEditView *CChildFrame::GetHexEditView() const
{
	CView *pv = GetActiveView();
	if (pv != NULL)                         // May be NULL if print preview
	{
		if (pv->IsKindOf(RUNTIME_CLASS(CHexEditView)))
			return (CHexEditView *)pv;
		else if (pv->IsKindOf(RUNTIME_CLASS(CDataFormatView)))
			return ((CDataFormatView *)pv)->phev_;
		else if (pv->IsKindOf(RUNTIME_CLASS(CAerialView)))
			return ((CAerialView *)pv)->phev_;
		else if (pv->IsKindOf(RUNTIME_CLASS(CCompareView)))
			return ((CCompareView *)pv)->phev_;
		else if (pv->IsKindOf(RUNTIME_CLASS(CPrevwView)))
			return ((CPrevwView *)pv)->phev_;
		else if (pv->IsKindOf(RUNTIME_CLASS(CHexTabView)))
		{
			// Find the hex view (left-most tab)
			CHexTabView *ptv = (CHexTabView *)pv;
			ptv->SetActiveView(0);  // hex view is always left-most (index 0)
			ASSERT_KINDOF(CHexEditView, ptv->GetActiveView());
			return (CHexEditView *)ptv->GetActiveView();
		}
	}
	return NULL;
}
开发者ID:Andrew-Phillips,项目名称:HexEdit,代码行数:27,代码来源:ChildFrm.cpp


示例6: CRect

CXTPDockingPane* CMainFrame::CreatePane(int x, int y, CRuntimeClass* pNewViewClass, CString strFormat, XTPDockingPaneDirection direction, CXTPDockingPane* pNeighbour)
{
	//做个标记
	int nID = ++m_nCount;
	
	CXTPDockingPane* pwndPane = m_paneManager.CreatePane(nID, CRect(0, 0,x, y), direction, pNeighbour);
	
	CString strTitle;
	strTitle.Format(strFormat, nID);
	pwndPane->SetTitle(strTitle);
	pwndPane->SetIconID(nID % 6 + 1);
	
	CFrameWnd* pFrame = new CFrameWnd;
	
	CCreateContext context;
	context.m_pNewViewClass = pNewViewClass;
	context.m_pCurrentDoc = GetActiveView()->GetDocument();
	
	pFrame->Create(NULL, NULL, WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS, CRect(0, 0, 0, 0), this, NULL, 0, &context);
	pFrame->ModifyStyleEx(WS_EX_CLIENTEDGE, 0);
	
	m_mapPanes.SetAt(nID, pFrame);
	
	return pwndPane;
}
开发者ID:b1ueb0y,项目名称:LViewer,代码行数:25,代码来源:MainFrm.cpp


示例7: OnActivate

void CMainFrame::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized) 
{
//DeadCode DAW 22Jun99 		TRACE2("Activate %i ==> %08x\n",nState,::GetWindowThreadProcessId(pWndOther->m_hWnd, NULL) );
//DeadCode DAW 22Jun99 	else
//DeadCode DAW 22Jun99 	{
//DeadCode DAW 22Jun99 		TRACE1("Activate %i xxx\n",nState);
		//If in the 3D && state==0 then discard DD here
#ifdef NDEBUG
 	if (!pWndOther)
		if (Inst3d::InThe3D())
		{
			if (!nState)	Inst3d::ReleaseDirectX();
			else
			{
				Inst3d::RestoreDirectX();
				CMIGView* view=(CMIGView*)GetActiveView();
				RFullPanelDial*	dial=GetFullPanel(view);
				dial->LaunchScreen(&RFullPanelDial::quickmissionflight);
			}
		}
#endif
//DeadCode DAW 22Jun99 	}

	CFrameWnd::OnActivate(nState, pWndOther, bMinimized);
	
	// TODO: Add your message handler code here
	
}
开发者ID:xor2003,项目名称:bob-flight-sim,代码行数:28,代码来源:mainfrm.cpp


示例8: GetActiveView

void CInPlaceFrame::RecalcLayout(BOOL bNotify)
{
	if (m_wndResizeBar.m_hWnd != NULL)
		m_wndResizeBar.BringWindowToTop();
	COleIPFrameWndEx::RecalcLayout(bNotify);
	CWnd* pWnd = GetActiveView();
	if (pWnd != NULL)
		pWnd->BringWindowToTop();
	if (m_wndRulerBar.m_hWnd != NULL)
		m_wndRulerBar.BringWindowToTop();

	// at least 12 pt region plus ruler if it exists
	CDisplayIC dc;
	CSize size;
	size.cy = MulDiv(12, dc.GetDeviceCaps(LOGPIXELSY), 72)+1;
	size.cx = dc.GetDeviceCaps(LOGPIXELSX)/4; // 1/4"
	size.cx += HORZ_TEXTOFFSET; //adjust for offset
	size.cy += VERT_TEXTOFFSET;
	if (m_wndRulerBar.m_hWnd != NULL && m_wndRulerBar.IsVisible())
	{
		CRect rect;
		m_wndRulerBar.GetWindowRect(&rect);
		size.cy += rect.Height();
	}
	m_wndResizeBar.SetMinSize(size);
}
开发者ID:jhlee8804,项目名称:MFC-Feature-Pack,代码行数:26,代码来源:ipframe.cpp


示例9: OnEditPaste

void CChildFrame::OnEditPaste() 
{
	// TODO: Add your command handler code here
	CMTXCalcView* pView = (CMTXCalcView*)GetActiveView();    
	pView->pGridCtrl->OnEditPaste();
	pView->updateDocFromGrid();
}
开发者ID:coderchief,项目名称:Gorgonzola,代码行数:7,代码来源:ChildFrm.cpp


示例10: MinMaxInfo

void CResizableFrame::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI) 
{
	MinMaxInfo(lpMMI);

	CView* pView = GetActiveView();
	if (pView == NULL)
		return;

	// get the extra size from view to frame
	CRect rectClient, rectWnd;
	GetWindowRect(rectWnd);
	RepositionBars(0, 0xFFFF, AFX_IDW_PANE_FIRST, reposQuery, rectClient);
	CSize sizeExtra = rectWnd.Size() - rectClient.Size();

	// ask the view for track size
	MINMAXINFO mmiView = *lpMMI;
	pView->SendMessage(WM_GETMINMAXINFO, 0, (LPARAM)&mmiView);
	mmiView.ptMaxTrackSize = sizeExtra + mmiView.ptMaxTrackSize;
	mmiView.ptMinTrackSize = sizeExtra + mmiView.ptMinTrackSize;

	// min size is the largest
	lpMMI->ptMinTrackSize.x = __max(lpMMI->ptMinTrackSize.x,
		mmiView.ptMinTrackSize.x);
	lpMMI->ptMinTrackSize.y = __max(lpMMI->ptMinTrackSize.y,
		mmiView.ptMinTrackSize.y);

	// max size is the shortest
	lpMMI->ptMaxTrackSize.x = __min(lpMMI->ptMaxTrackSize.x,
		mmiView.ptMaxTrackSize.x);
	lpMMI->ptMaxTrackSize.y = __min(lpMMI->ptMaxTrackSize.y,
		mmiView.ptMaxTrackSize.y);
}
开发者ID:LjApps,项目名称:eMule-VeryCD,代码行数:32,代码来源:ResizableFrame.cpp


示例11: OnShowInstrumentCollect

/**
* 响应上工具条按钮;显示采集站
* @param void
* @return void
*/
void CInstrumentGraphChildFrame::OnShowInstrumentCollect() 
{
	//是否显示采集站
	m_bShowInstrumentCollect = !m_bShowInstrumentCollect;
	CInstrumentGraphView* pView = (CInstrumentGraphView*)GetActiveView();
	pView->RedrawWindow();
}
开发者ID:liquanhai,项目名称:cxm-hitech-matrix428,代码行数:12,代码来源:InstrumentGraphChildFrame.cpp


示例12: OnShowInstrumentCross

/**
* 响应上工具条按钮;显示交叉站
* @param void
* @return void
*/
void CInstrumentGraphChildFrame::OnShowInstrumentCross() 
{
	//是否显示交叉站
	m_bShowInstrumentCross = !m_bShowInstrumentCross;
	CInstrumentGraphView* pView = (CInstrumentGraphView*)GetActiveView();
	pView->RedrawWindow();
}
开发者ID:liquanhai,项目名称:cxm-hitech-matrix428,代码行数:12,代码来源:InstrumentGraphChildFrame.cpp


示例13: OnShowInstrumentPower

/**
* 响应上工具条按钮;显示电源站
* @param void
* @return void
*/
void CInstrumentGraphChildFrame::OnShowInstrumentPower() 
{
	//是否显示电源站
	m_bShowInstrumentPower = !m_bShowInstrumentPower;
	CInstrumentGraphView* pView = (CInstrumentGraphView*)GetActiveView();
	pView->RedrawWindow();
}
开发者ID:liquanhai,项目名称:cxm-hitech-matrix428,代码行数:12,代码来源:InstrumentGraphChildFrame.cpp


示例14: ASSERT_VALID

BOOL CDrawItem::OnChangeItemPosition(const CRect& rectPos)
{
	ASSERT_VALID(this);

	CDrawView* pView = GetActiveView();
	ASSERT_VALID(pView);
	CRect rect = rectPos;
	pView->ClientToDoc(rect);

	if (rect != m_pDrawObj->m_position)
	{
		// invalidate old rectangle
		m_pDrawObj->Invalidate();

		// update to new rectangle
		m_pDrawObj->m_position = rect;
		GetExtent(&m_pDrawObj->m_extent);

		// and invalidate new rectangle
		m_pDrawObj->Invalidate();

		// mark document as dirty
		GetDocument()->SetModifiedFlag();
	}
	return COleClientItem::OnChangeItemPosition(rectPos);
}
开发者ID:markraz,项目名称:hhhjjjff,代码行数:26,代码来源:cntritem.cpp


示例15: OnShowLinkLine

/**
* 响应上工具条按钮;显示连接线
* @param void
* @return void
*/
void CInstrumentGraphChildFrame::OnShowLinkLine() 
{
	//是否显示连接线
	m_bShowLinkLine = !m_bShowLinkLine;
	CInstrumentGraphView* pView = (CInstrumentGraphView*)GetActiveView();
	pView->RedrawWindow();
}
开发者ID:liquanhai,项目名称:cxm-hitech-matrix428,代码行数:12,代码来源:InstrumentGraphChildFrame.cpp


示例16: GetActiveView

BOOL CMainFrame::OnCopyData(CWnd* pWnd, COPYDATASTRUCT* pData) {
    
	//TRACE("OnCopyData Accessed\n");
	//std::string *msg = (std::string*)pData->lpData;
	//TRACE("CMainframe     msg: %s\n",msg->c_str());

	//int msgId = pData->dwData;
	//int msgSize = pData->cbData;
	//std::string *filename = (std::string*)pData->lpData;

	COPYDATASTRUCT data;
	//data.dwData = msgId;
	//data.cbData = msgSize;
	//data.lpData = msg;
	data.dwData = pData->dwData;
	data.cbData = pData->cbData;
	data.lpData = pData->lpData;


		
	CView *pView = GetActiveView();
	if (pView == NULL){
		TRACE("pView == NULL\n");
	}
	else{
	    pView->SendMessage(WM_COPYDATA,0,(LPARAM)&data);
		//TRACE("CMainFrame::OnCopyData message sent\n");
	}
	

	return TRUE;
}
开发者ID:jhkoivis,项目名称:lumikki,代码行数:32,代码来源:MainFrm.cpp


示例17: OnEditCopy

void CChildFrame::OnEditCopy() 
{
	// TODO: Add your command handler code here
	CMTXCalcView* pView = (CMTXCalcView*)GetActiveView();
    ((CMainFrame*)AfxGetApp()->m_pMainWnd)->pDoc = pView->GetDocument();
	pView->pGridCtrl->OnEditCopy();	
}
开发者ID:coderchief,项目名称:Gorgonzola,代码行数:7,代码来源:ChildFrm.cpp


示例18: GetActiveView

void CMainFrame::SwitchToView(eView nView)
{
	CView* pOldActiveView = GetActiveView();
	CView* pNewActiveView = (CView*) GetDlgItem(nView);
	if (pNewActiveView == NULL) {
		switch (nView) {
		case STRING:
			pNewActiveView = (CView*) new CStringView;
			break;
		case HEX:
			pNewActiveView = (CView*) new CHexView;
			break;
		}
		CCreateContext context;
		context.m_pCurrentDoc = pOldActiveView->GetDocument();
		pNewActiveView->Create(NULL, NULL, WS_BORDER,
			CFrameWnd::rectDefault, this, nView, &context);
		pNewActiveView->OnInitialUpdate();
	}
	SetActiveView(pNewActiveView);
	pNewActiveView->ShowWindow(SW_SHOW);
	pOldActiveView->ShowWindow(SW_HIDE);
	pOldActiveView->SetDlgCtrlID(
		pOldActiveView->GetRuntimeClass() == 
		RUNTIME_CLASS(CStringView) ? STRING : HEX);
	pNewActiveView->SetDlgCtrlID(AFX_IDW_PANE_FIRST);
	RecalcLayout();
}
开发者ID:jiayuehua,项目名称:InsideVC,代码行数:28,代码来源:MainFrm.cpp


示例19: AfxMessageBox

void CMainFrame::OnSendFile() 
{
	// TODO: Add your command handler code here
	CMyCommDoc   *Doc   =  (CMyCommDoc   *)GetActiveDocument();
	if (!Doc->m_ComAction) {
		AfxMessageBox(_T("串口没有打开!"));
		return;
	}
	
	CSendFileByXModem dlg;
	dlg.m_ModemType = 0;
	if (dlg.DoModal()==IDOK)
	{
		//发送文件
		CFile fp;
		if(!(fp.Open((LPCTSTR)dlg.m_SendFileName ,CFile::modeRead))) 
		{
			AfxMessageBox(_T("打开文件出错!"));
			return;
		}
		fp.SeekToEnd();
		unsigned long fplength=fp.GetLength();
		char* fpBuff;
		fpBuff=new char[fplength];
		fp.SeekToBegin();
		if(fp.Read(fpBuff,fplength)<1)
		{
			fp.Close();
			return;
		}
		fp.Close();

		//send
		CMyCommView * myview = (CMyCommView *)GetActiveView();
		myview->m_EditLogger.AddText(_T("发送文件....\r\n"));
		BOOL mySendOk;
        
		switch(dlg.m_ModemType) {
			case 0:  //xModem
				mySendOk = Doc->SendByXmodem(fpBuff,fplength,0);
				break;
			case 1: //yModem
				break;
			case 2: //zModem
				
				break;
			case 3: //1k xmodem 
				
				break;
			default:
				return;
		}

		if(mySendOk)
			myview->m_EditLogger.AddText(_T("完成发送。\r\n"));
		else
			myview->m_EditLogger.AddText(_T("发送失败!!!\n\r"));

	}
}
开发者ID:liquanhai,项目名称:LSDComm,代码行数:60,代码来源:MainFrm.cpp


示例20: switch

LRESULT CMainFrame::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
    BOOL oldMin = m_isMinimum;
    //printf("CMainFrame::WindowProc() Msg: %x, WPARAM: %x, LPARAM: %x\n", message, wParam, lParam);
	switch(message)
	{
    case WM_CLOSE:
        printf("received WM_CLOSE!");
        break;
    case WM_SIZE:
        switch ( wParam ) {
        case SIZE_MINIMIZED:
            m_isMinimum = TRUE;
            break;
        case SIZE_MAXIMIZED:
        case SIZE_RESTORED:
            m_isMinimum = FALSE;
            break;
        }
        break;
    case ID_OBTAIN_TGT_WITH_LPARAM:
        GetActiveView()->SendMessage(ID_OBTAIN_TGT_WITH_LPARAM, wParam,
                                     lParam);
        break;
	}

    if ( oldMin != m_isMinimum ) {
        if ( m_isMinimum ) {
            ShowTaskBarButton(FALSE);
            ShowWindow(SW_HIDE);
        }
    }
    return CLeashFrame::WindowProc(message, wParam, lParam);
}
开发者ID:Akasurde,项目名称:krb5,代码行数:34,代码来源:MainFrm.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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