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


C++ CChildFrame::SetWindowTextA方法代码示例

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


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

示例1: OnOK

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

示例2: OnCmdMsg

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;}
		if (nID >= WM_PROCESSMENU && nID		< (WM_PROCESSMENU+WM_MAXITEMS)){ ((CCmdUI*)pExtra)->Enable(TRUE); return TRUE;}
		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_ReClass2011TYPE, theApp.m_hMDIMenu, theApp.m_hMDIAccel);
			CNodeClass* pClass = theApp.Classes[idx];

			pChild->SetTitle(pClass->Name);
			pChild->SetWindowTextA(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;
			ProcessID = ProcMenuItems[idx].ProcessId;
			hProcess = OpenProcess(PROCESS_ALL_ACCESS,false,ProcessID);
			UpdateMemoryMap();
			return TRUE;
		}
		if (nID >= WM_DELETECLASSMENU && nID < (WM_DELETECLASSMENU+WM_MAXITEMS) )
		{
			UINT idx = nID - WM_DELETECLASSMENU;
			theApp.DeleteClass(theApp.Classes[idx]);
			return TRUE;
		}
	}


	return CMDIFrameWndEx::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}
开发者ID:IChooseYou,项目名称:Reclass64,代码行数:42,代码来源:MainFrm.cpp


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