本文整理汇总了C++中CFunctionEditorDoc::GetNextView方法的典型用法代码示例。如果您正苦于以下问题:C++ CFunctionEditorDoc::GetNextView方法的具体用法?C++ CFunctionEditorDoc::GetNextView怎么用?C++ CFunctionEditorDoc::GetNextView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFunctionEditorDoc
的用法示例。
在下文中一共展示了CFunctionEditorDoc::GetNextView方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: podGetFileViewPtr
CFileView* CGlobalObj::podGetFileViewPtr()
{
CFileView* pFileView = nullptr;
CView* pTempView = nullptr;
BOOL bFound = FALSE;
//Get the active document and find the CFileView attached to it
CFunctionEditorDoc* pDoc = podGetFunctionEditorDoc();
if (pDoc != nullptr)
{
POSITION pos = pDoc->GetFirstViewPosition();
while (pos && !bFound)
{
pTempView = pDoc->GetNextView(pos);
if (pTempView->IsKindOf(RUNTIME_CLASS(CFileView)))
{
pFileView = (CFileView*)pTempView;
bFound = TRUE;
}
}
}
return pFileView;
}
示例2: OnDbClick
void COutWnd::OnDbClick()
{
INT nSelectIndex;
CString omStrSelectedItem;
nSelectIndex = m_omListBox.GetCurSel();
if(nSelectIndex!=LB_ERR )
{
CString omStrLineNumber = "";
INT nIndex = 0;
UINT unLineNumber = 0;
char* pcStopStr = nullptr;
m_omListBox.GetText(nSelectIndex,omStrSelectedItem);
CString omStrFilePath;
CString omStrFileName;
omStrFilePath=omStrSelectedItem;
while(!(nSelectIndex==0||omStrFilePath==defSTR_BUILD_TRACE_LINE_MARK))
{
--nSelectIndex;
m_omListBox.GetText(nSelectIndex,omStrFilePath);
}
if(omStrFilePath==defSTR_BUILD_TRACE_LINE_MARK)
{
++nSelectIndex;
m_omListBox.GetText(nSelectIndex,omStrFilePath);
int nNameIndex = omStrFilePath.ReverseFind('\\');
if(nNameIndex != -1)
{
//pGetBusSpecificFunctionEditorDoc(omStrFilePath);
CFunctionEditorDoc* pDoc = m_pGlobalObj->pGetDocPtrOfFile(omStrFilePath);
if (pDoc != nullptr)
{
//If file is opened then get its frame and activate it
{
POSITION pos = pDoc->GetFirstViewPosition();
if (pos)
{
pDoc->GetNextView(pos)->GetParentFrame()->ActivateFrame();
}
}
}
else
{
//If file is not opened then open it
if ( !m_pGlobalObj->bOpenFunctioneditorfile(omStrFilePath) )
{
AfxMessageBox("Specified filename not found!",
MB_OK|MB_ICONINFORMATION);
}
}
// Find the ':' to get the number after second ':'
nIndex = omStrSelectedItem.Find(":");
if(nIndex!=-1)
{
omStrLineNumber = omStrSelectedItem.Right(
omStrSelectedItem.GetLength()-nIndex-1);
nIndex = omStrLineNumber.Find(":");
omStrLineNumber = omStrLineNumber.Right(
omStrLineNumber.GetLength()-nIndex-1);
omStrLineNumber.TrimLeft();
omStrLineNumber.TrimRight();
omStrLineNumber = omStrLineNumber.SpanExcluding(":");
unLineNumber = _tcstol((LPCTSTR)omStrLineNumber,
&pcStopStr,10);
// Call this function only if the line number is valid
if(unLineNumber!=0)
{
CFileView* pFileView = m_pGlobalObj->podGetFileViewPtr();
if(pFileView != nullptr)
{
pFileView->vDisplayWarningLineNumber(OUTWND,unLineNumber);
}
}
}
else
{
nIndex = omStrSelectedItem.Find(":");
if(nIndex!=-1)
{
nIndex = omStrSelectedItem.Find(":");
omStrLineNumber = omStrSelectedItem.Right(
omStrSelectedItem.GetLength()-nIndex-1);
omStrLineNumber.TrimLeft();
omStrLineNumber.TrimRight();
omStrLineNumber = omStrLineNumber.
SpanExcluding("\t ");
unLineNumber = _tcstol((LPCTSTR)omStrLineNumber,
&pcStopStr,
10);
if(unLineNumber!=0)
{
CFileView* pFileView = m_pGlobalObj->podGetFileViewPtr();
if(nullptr != pFileView)
{
pFileView->vDisplayWarningLineNumber(OUTWND,
//.........这里部分代码省略.........