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


C++ CChildFrame类代码示例

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


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

示例1: DYNAMIC_DOWNCAST

BOOL CGotoDlg::OnInitDialog() 
{
	CMDIFrameWnd* pMainFrame = DYNAMIC_DOWNCAST(CMDIFrameWnd, AfxGetMainWnd());
	CChildFrame *pFrame = DYNAMIC_DOWNCAST( CChildFrame, pMainFrame->MDIGetActive() );

	CWSDialog::OnInitDialog();
	
	CWSUIExtras::SetWSDialogWindowText(CWnd::GetSafeHwnd(), Workshare::Products::WS_PROD_COMPARE);

	m_btnGoto.SubclassDlgItem( IDGOTO, this );
	m_btnClose.SubclassDlgItem( IDCLOSE, this );

	if (pFrame && pFrame->GetCompositeView())
	{
		CRect rcView;
		pFrame->GetCompositeView()->GetWindowRect(rcView);
		SetWindowPos(&wndTop, rcView.left+10, rcView.top+10, 0, 0, SWP_NOSIZE);
	}
	
	// Setup the help link.
	m_StaticHyperLinkHelp.SubclassDlgItem(IDC_HELPLINK, this);
	m_StaticHyperLinkHelp.m_iHelpID = GetHelpID();

	SetDefID(IDGOTO);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:27,代码来源:GotoDlg.cpp

示例2: LookupParser

BOOL CBonfireDoc::OnNewDocument()
{
	if (!CDocument::OnNewDocument())
		return FALSE;

	m_xTextBuffer.InitNew();

	((CMainFrame*)AfxGetMainWnd())->m_wndProjectBar.LoadFile(this);

	// MAYBE PUT IN SETPATHNAME() LATER
	// set the syntax highlighting parser
	this->m_fnParse = LookupParser( NULL );

	// draw icon
	POSITION pos = GetFirstViewPosition();
	CChildFrame* pChild = (CChildFrame*)GetNextView(pos)->GetParentFrame();
	pChild->UpdateIcon("");

	UpdateTabs( NULL );

	// initialize the document title
	UpdateDocumentTitle( NULL );

	SwitchToFirstView();

	return TRUE;
}
开发者ID:Qeeet,项目名称:nz-software,代码行数:27,代码来源:BonfireDoc.cpp

示例3: while

void CMainFrame::OnSelChangedTree(NMHDR* pNMHDR, LRESULT* pResult)
{
	NMTREEVIEW* pTreeView = (NMTREEVIEW*)pNMHDR;
	HTREEITEM hSelected = pTreeView->itemNew.hItem;	
	int nDeep = 0;
	HTREEITEM hTempItem = m_wndMasterlistDialogBar.m_treeMasters.GetParentItem(hSelected);
	while (hTempItem)
	{
		nDeep++;
		hTempItem = m_wndMasterlistDialogBar.m_treeMasters.GetParentItem(hTempItem);
	}
	DWORD_PTR pPoint = m_wndMasterlistDialogBar.m_treeMasters.GetItemData(hSelected); 
	CRecordeOperatorDoc* pDoc = NULL;
	CChildFrame* pChild = NULL;
	pChild = (CChildFrame*)GetActiveFrame();
	if (!pChild)
		return;
	pDoc = (CRecordeOperatorDoc*)pChild->GetActiveDocument();
	if (!pDoc)
		return;
	IERecPlayer* pRecord = pDoc->GetRecord();
	if (pRecord)
	{
		g_RecordUITools.FillListCtrl(pRecord, nDeep,pPoint,m_wndMasterlistDialogBar.m_listCtrl);
	}
}
开发者ID:viticm,项目名称:pap2,代码行数:26,代码来源:MainFrm.cpp

示例4:

void CMainFrame::UpdateActiveDoc
	(
	  void
	)
{
	CChildFrame	*pActiveChild	=(CChildFrame *)this->MDIGetActive();
	if(pActiveChild)
	{
		CFusionDoc	*pDoc		=(CFusionDoc*)pActiveChild->GetActiveDocument();

		// update groups tab
		if(pDoc)
		{
			if(m_wndTabControls)
			{
				if(m_wndTabControls->GrpTab)
				{
					m_wndTabControls->GrpTab->UpdateTabDisplay(pDoc);
				}
			}
			LoadComboBox() ;
		}
	}
	// update models list box
	this->UpdateModelsDialog ();
}
开发者ID:RealityFactory,项目名称:Genesis3D-Tools,代码行数:26,代码来源:MainFrm.cpp

示例5: if

BOOL CMainFrame::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
{
	if (nCode == CN_UPDATE_COMMAND_UI)
	{
		if (nID >= WM_CLASSMENU && nID < (WM_CLASSMENU + WM_MAXITEMS))
		{ 
			((CCmdUI*)pExtra)->Enable(TRUE); 
			return TRUE;
		}
		else if (nID >= WM_PROCESSMENU && nID < (WM_PROCESSMENU + WM_MAXITEMS))
		{ 
			((CCmdUI*)pExtra)->Enable(TRUE); 
			return TRUE;
		}
		else if (nID >= WM_DELETECLASSMENU && nID < (WM_DELETECLASSMENU + WM_MAXITEMS))
		{ 
			((CCmdUI*)pExtra)->Enable(TRUE); 
			return TRUE;
		}
	}
	if (nCode == CN_COMMAND)
	{
		if (nID >= WM_CLASSMENU && nID < (WM_CLASSMENU + WM_MAXITEMS))
		{
			UINT idx = nID - WM_CLASSMENU;

			CChildFrame* pChild = (CChildFrame*)this->CreateNewChild(RUNTIME_CLASS(CChildFrame), IDR_ReClass2015TYPE, theApp.m_hMDIMenu, theApp.m_hMDIAccel);
			CNodeClass* pClass = theApp.Classes[idx];
			pClass->pChildWindow = pChild;

			pChild->SetTitle(pClass->Name);
			pChild->SetWindowText(pClass->Name);
			UpdateFrameTitleForDocument(pClass->Name);
			pChild->m_wndView.m_pClass = pClass;
			return TRUE;
		}
		if (nID >= WM_PROCESSMENU && nID < (WM_PROCESSMENU + WM_MAXITEMS) )
		{
			UINT idx = nID - WM_PROCESSMENU;
			g_ProcessID = ProcMenuItems[idx].ProcessId;
			g_hProcess = OpenProcess(PROCESS_ALL_ACCESS, false, g_ProcessID);
			UpdateMemoryMap();
			return TRUE;
		}
		if (nID >= WM_DELETECLASSMENU && nID < (WM_DELETECLASSMENU + WM_MAXITEMS) )
		{
			UINT idx = nID - WM_DELETECLASSMENU;
			if (theApp.Classes[idx]->pChildWindow)
				theApp.Classes[idx]->pChildWindow->SendMessage(WM_CLOSE, 0, 0);
			theApp.DeleteClass(theApp.Classes[idx]);
			return TRUE;
		}
	}

	return CMDIFrameWndEx::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}
开发者ID:knobik,项目名称:Reclass-2015,代码行数:56,代码来源:MainFrm.cpp

示例6: while

void CDialogClasses::OnOK()
{
	unsigned numselected = m_ClassView.GetSelectedCount();
	POSITION pos = m_ClassView.GetFirstSelectedItemPosition();
	while (pos)
	{
		int nItem = m_ClassView.GetNextSelectedItem(pos);

		// FUUUUCK pushign this out last second shutup
		CString szBuffer = m_ClassView.GetItemText(nItem, 0);
	
		printf("nitem %d\n", nItem);

		nItem = FindClassByName(szBuffer.GetBuffer());

		//printf( "szBuffer %s new %d\n", szBuffer.GetBuffer( ), nItem );

		CMainFrame*  pFrame = static_cast<CMainFrame*>(AfxGetApp( )->m_pMainWnd);
		CChildFrame* pChild = (CChildFrame*)pFrame->CreateNewChild(RUNTIME_CLASS(CChildFrame), IDR_ReClass2015TYPE, theApp.m_hMDIMenu, theApp.m_hMDIAccel);
		pChild->m_wndView.m_pClass = theApp.Classes[nItem];

		// This will get overwritten for each class that is opened
		pChild->SetTitle(theApp.Classes[nItem]->Name);
		pChild->SetWindowTextA(theApp.Classes[nItem]->Name);
		pFrame->UpdateFrameTitleForDocument(theApp.Classes[nItem]->Name);
	}

	CDialogEx::OnOK();
}
开发者ID:JackD111,项目名称:Reclass-2015,代码行数:29,代码来源:DialogClasses.cpp

示例7: OnFileNew

void CMainFrame::OnFileNew(UINT uNotifyCode, int nID, CWindow wndCtl)
{
	CChildFrame* pChild = new CChildFrame;
	pChild->CreateEx(m_hWndClient);

	// TODO: add code to initialize document
}
开发者ID:moon-sky,项目名称:fishjam-template-library,代码行数:7,代码来源:MainFrm.cpp

示例8: _T

LRESULT CTuotuoCategoryCtrl::OnGetToolTipInfo(LPNMHDR pnmh)
{
	LPNMSTTDISPINFO pnmdsp = (LPNMSTTDISPINFO)pnmh;
	pnmdsp->dwFlags = STTDSPF_TEXT;
	if (pnmdsp->pdwIndex >= 1 && pnmdsp->pdwIndex <= 5)
		pnmdsp->szText = _T("");
	else if (pnmdsp->pdwIndex)
	{
		HWND hChildFrame = (HWND)pnmdsp->pdwIndex;
		if (::IsWindow(hChildFrame))
		{
			CChildFrame *pChild = (CChildFrame*)::GetWindowLongPtr(hChildFrame, GWLP_USERDATA);
			if (pChild)
			{
				if (pChild->GetItem()->m_pCategory->m_pWebData == START_PAGE_WEBSITE_DATA)
					pnmdsp->szText = _T("我的首页");
				else if (pChild->GetItem()->m_pCategory->m_pWebData)
					pnmdsp->szText = pChild->GetItem()->GetText();
				else
					pnmdsp->szText = _T("");
			}
			else
				pnmdsp->szText = _T("");
		}
		else
			pnmdsp->szText = _T("");
	}
	else
		pnmdsp->szText = _T("");

	return 0;
}
开发者ID:Williamzuckerberg,项目名称:chtmoneyhub,代码行数:32,代码来源:CategoryCtrl_Message.cpp

示例9: 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

示例10: 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

示例11: DYNAMIC_DOWNCAST

void CFileView::AdjustLayout()
{
	if (GetSafeHwnd() == NULL)
	{
		return;
	}

	CMainFrame * pFrame = DYNAMIC_DOWNCAST(CMainFrame, AfxGetMainWnd());
	if(pFrame)
	{
		CChildFrame * pChildFrame = DYNAMIC_DOWNCAST(CChildFrame, pFrame->MDIGetActive());
		if(pChildFrame)
		{
			CImgRegionDoc * pDoc = DYNAMIC_DOWNCAST(CImgRegionDoc, pChildFrame->GetActiveDocument());
			if(pDoc && pDoc->m_TreeCtrl.m_hWnd)
			{
				CRect rectClient;
				GetClientRect(rectClient);

				pDoc->m_TreeCtrl.SetWindowPos(
					&wndTop, rectClient.left, rectClient.top, rectClient.Width(), rectClient.Height(), 0);

				pDoc->m_TreeCtrl.Invalidate();
			}
		}
	}
}
开发者ID:howardgao-mt,项目名称:myd3dlib,代码行数:27,代码来源:FileView.cpp

示例12: 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

示例13: getStandardHeight

static int getStandardHeight(CippsDemoDoc* pDoc)
{
   CippsDemoView* pView = pDoc->GetDemoView();
   if (pView == NULL) return 0;
   CChildFrame* pFrame = pDoc->GetDemoFrame();
   return pView->GetInitialHeight() + pFrame->GetBorderHeight();
}
开发者ID:vinnie38170,项目名称:klImageCore,代码行数:7,代码来源:ippsRun.cpp

示例14: OnBnClickedButtonPlay

void CMainFrame::OnBnClickedButtonPlay()
{
	CRecordeOperatorDoc* pDoc = NULL;
	CChildFrame* pChild = NULL;
	pChild = (CChildFrame*)GetActiveFrame();
	if (!pChild)
		return;
	pDoc = (CRecordeOperatorDoc*)pChild->GetActiveDocument();
	if (!pDoc)
		return;
	IERecPlayer* pRecord = pDoc->GetRecord();
	if (pRecord)
	{
		if (pRecord->RePlay() == S_OK)
		{
			m_wndProgressDialogBar.m_buttonPlay.SetWindowText("Pause");
		}
		else if (pRecord->PauseRePlay() == S_OK)
		{
			m_wndProgressDialogBar.m_buttonPlay.SetWindowText("Play");
		}
	}
	else
		MessageBox("»¹Î´°ó¶¨Â¼Ïñ¶ÔÏó£¡","ѽ",MB_OK);
}
开发者ID:viticm,项目名称:pap2,代码行数:25,代码来源:MainFrm.cpp

示例15: GetDocument

//////////////////////////////TWAIN Specific////////////////////////////////////////
void CFPAnalysisView::OnFileScan() 
{
	
    CFPAnalysisDoc* pDoc = GetDocument();

   	CScanDlg dlg;
	if (dlg.DoModal() == IDOK)
	{
		currentimage.SetFilename(dlg.m_szImageName);
		currentimage.LoadBMP();
		Invalidate(FALSE);
		pDoc->SetTitle(dlg.m_szImageName);
	}

	//set the size of view to image-size...
	  CChildFrame* pParent =(CChildFrame*)GetParentFrame();
	  CRect rcParent;

	  rcParent.left = 0;
	  rcParent.top =0;
	  rcParent.right = (int)currentimage.GetWidth();
	  rcParent.bottom = (int)currentimage.GetHeight();
	  pParent->MoveWindow(&rcParent);

	  
	  SetFPScrollInfo();

      // Refresh the entire view...
	  Invalidate(TRUE);	
}
开发者ID:Flora0409,项目名称:fingerprint-analysis,代码行数:31,代码来源:FPAnalysisView.cpp


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