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


C++ CObList::GetNext方法代码示例

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


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

示例1: RebuildFonts

//****************************************************************************************
void CBCGPRibbonFontComboBox::RebuildFonts ()
{
	RemoveAllItems ();

	CObList lstFonts;

	CBCGPToolbarFontCombo tlbFontCombo (
		&lstFonts, m_nFontType, m_nCharSet, m_nPitchAndFamily);

	POSITION pos = NULL;

	for (pos = lstFonts.GetHeadPosition (); pos != NULL;)
	{
		CBCGPFontDesc* pDesc = (CBCGPFontDesc*) lstFonts.GetNext (pos);
		ASSERT_VALID (pDesc);

		if ((m_nFontType & pDesc->m_nType) != 0)
		{
			BOOL bIsUnique = GetFontsCount (pDesc->m_strName, lstFonts) <= 1;
			AddItem (bIsUnique ? pDesc->m_strName : pDesc->GetFullName (), (DWORD_PTR) pDesc);
		}
	}

	// Delete unused items:
	for (pos = lstFonts.GetHeadPosition (); pos != NULL;)
	{
		CBCGPFontDesc* pDesc = (CBCGPFontDesc*) lstFonts.GetNext (pos);
		ASSERT_VALID (pDesc);

		if ((m_nFontType & pDesc->m_nType) == 0)
		{
			delete pDesc;
		}
	}
}
开发者ID:iclosure,项目名称:jframework,代码行数:36,代码来源:BCGPRibbonComboBox.cpp

示例2: FillModuleExtUserPrm

//----------------------------- FUNCTION -------------------------------------*
void PropGSDModule::FillModuleExtUserPrm(CDP_Module * pModule)
{
	CListCtrl* pExt = (CListCtrl*)GetDlgItem(IDC_LIST_AVAIL_MOD_EXTPRM);
	CListCtrl* pUsedExt = (CListCtrl*)GetDlgItem(IDC_LIST_USED_MOD_EXTPRM);
	if (pExt == NULL || pUsedExt == NULL)	{
		ASSERT(FALSE);
		return;
	}

	pExt->DeleteAllItems( );
	pUsedExt->DeleteAllItems();
    if (pModule == NULL) {
        return;
    }

	CObList* pExtParams = pModule->GetExtParams();
	POSITION pos = pExtParams->GetHeadPosition();
	LV_ITEM lv;
	int index = 0;
	while (pos)	{
		ExtParam* pParam = (ExtParam*)pExtParams->GetNext(pos);
		if (!pParam->IsConstantParam())	{
			::memset(&lv, 0, sizeof(LV_ITEM));
			lv.mask = LVIF_TEXT | LVIF_PARAM;
			lv.iItem = index++;
			lv.pszText = (LPTSTR)(LPCTSTR)pParam->GetDescription();
			lv.lParam = (DWORD)pParam;

			if (pParam->IsUsed())
				pUsedExt->InsertItem(&lv);
			else
				pExt->InsertItem(&lv);
		}
	}
}
开发者ID:LM25TTD,项目名称:ATCMcontrol_Engineering,代码行数:36,代码来源:PropGSDModule.cpp

示例3: OnInformation

void CExplorerTestView::OnInformation() 
{
	// TODO: Add your command handler code here
	CInfoDlg	dlg;	// 파일 정보 다이알로그 박스 클래스
	LIST_VIEW*	pListView;
	int			nItem = -1;
	CObList		obList;	// 선택된 파일 리스트들
	CListCtrl&	listCtrl = GetListCtrl();

	// 리스트 뷰에서 선택된 항목들만 CObList에 추가시킨다.
	while( (nItem = listCtrl.GetNextItem(nItem, LVNI_SELECTED)) != -1 )
	{
		pListView = new LIST_VIEW;
		*pListView = *(LIST_VIEW*)listCtrl.GetItemData(nItem);
		obList.AddTail((CObject*)pListView);
	}
	dlg.SetInfo(&obList);	// 다이알로그가 화면에 보여지기 전에
							// 먼저 파일정보를 다이알로그에 셋팅한다.
	dlg.DoModal();	// OnInitDialog를 호출하여 화면에 보이게 한다.

	// 모든 선택된 파일 리스트들을 메모리에서 삭제한다.
	for(POSITION pos = obList.GetHeadPosition() ; pos != NULL ; )
	{
		pListView = (LIST_VIEW*)obList.GetNext(pos);
		delete	pListView;
	}
	obList.RemoveAll();
}
开发者ID:gawallsibya,项目名称:BIT_MFC-CShap-DotNet,代码行数:28,代码来源:EXPLORERTESTVIEW.CPP

示例4: OnUpdateCaptionButtons

void CVisualManager::OnUpdateCaptionButtons (CRect rectCaption, const CObList& lstSysButtons, CWnd* /*pWnd*/)
{
	if (!CanDrawImage ())
	{
		return;
	}

	CSize szSysBorder (GetSystemBorders ());

	int nIndex = 3;

	int x = rectCaption.right + szSysBorder.cx - (szSysBorder.cx - 1);

	rectCaption.top -= szSysBorder.cy;

	for (POSITION pos = lstSysButtons.GetHeadPosition (); pos != NULL;)
	{
		CSize sizeButton (m_SysBtnBack[nIndex--].GetImageSize ());
		x -= sizeButton.cx;
		
		CBCGPFrameCaptionButton* pButton = (CBCGPFrameCaptionButton*)
			lstSysButtons.GetNext (pos);
		ASSERT_VALID (pButton);

		pButton->SetRect (CRect (CPoint (x, rectCaption.top), sizeButton));
	}

	return;
}
开发者ID:zxlooong,项目名称:bcgexp,代码行数:29,代码来源:VisualManager.cpp

示例5: Serialize

//*****************************************************************************************
void CBCGPDropDownToolbarButton::Serialize (CArchive& ar)
{
	CBCGPToolbarButton::Serialize (ar);
	
	UINT uiToolbarResID = 0;

	if (ar.IsLoading ())
	{
		m_pToolBar = NULL;

		ar >> uiToolbarResID;
		ar >> m_strName;
		ar >> m_iSelectedImage;

		// Find toolbar with required resource ID:
		for (POSITION pos = gAllToolbars.GetHeadPosition (); pos != NULL;)
		{
			CBCGPDropDownToolBar* pToolBar = DYNAMIC_DOWNCAST (CBCGPDropDownToolBar,
				gAllToolbars.GetNext (pos));

			if (pToolBar != NULL &&
				CWnd::FromHandlePermanent (pToolBar->m_hWnd) != NULL)
			{
				ASSERT_VALID (pToolBar);
				if (pToolBar->m_uiOriginalResID == uiToolbarResID)
				{
					m_pToolBar = pToolBar;
					break;
				}
			}
		}

		SetDefaultCommand (m_nID);
	}
开发者ID:iclosure,项目名称:jframework,代码行数:35,代码来源:BCGPDropDown.cpp

示例6: while

// Find a server from a service name
static CDDEServer *DDEFindServer(const CString& s)
{
    CDDEObject *obj = NULL;

    POSITION pos = DDEObjects.GetHeadPosition();
    while (pos && (obj = (CDDEObject *)DDEObjects.GetNext(pos)))
    {
        if (obj->service_name == s)
            return (CDDEServer *)obj;
    }
    return NULL;
    /*
    	wxNode *node = DDEObjects.First();
      CDDEServer *found = NULL;
      while (node && !found)
      {
        CDDEObject *object = (CDDEObject *)node->Data();

        if (object->service_name == s)
          found = (CDDEServer *)object;
        else node = node->Next();
      }
      return found;
      */
}
开发者ID:rajeshnarasimha,项目名称:foolject,代码行数:26,代码来源:MFCDDE.CPP

示例7: OnDummySelectActiveConfiguration

void CVisualStudioDemoDoc::OnDummySelectActiveConfiguration()
{
	CMFCToolBarComboBoxButton* pSrcCombo = NULL;

	CObList listButtons;
	if (CMFCToolBar::GetCommandButtons(ID_DUMMY_SELECT_ACTIVE_CONFIGURATION, listButtons) > 0)
	{
		for (POSITION posCombo = listButtons.GetHeadPosition();
			pSrcCombo == NULL && posCombo != NULL;)
		{
			CMFCToolBarComboBoxButton* pCombo = DYNAMIC_DOWNCAST(CMFCToolBarComboBoxButton, listButtons.GetNext(posCombo));

			if (pCombo != NULL && CMFCToolBar::IsLastCommandFromButton(pCombo))
			{
				pSrcCombo = pCombo;
			}
		}
	}

	if (pSrcCombo != NULL)
	{
		ASSERT_VALID(pSrcCombo);

		LPCTSTR lpszSelItem = pSrcCombo->GetItem();
		CString strSelItem = (lpszSelItem == NULL) ? _T("") : lpszSelItem;

		AfxMessageBox(strSelItem);
	}
	else
	{
		AfxMessageBox(_T("Show \"Set Active Configuration\" dialog...."));
	}
}
开发者ID:jetlive,项目名称:skiaming,代码行数:33,代码来源:VisualStudioDemoDoc.cpp

示例8: SetActiveInGroup

//---------------------------------------------------------------------------------------
void CBCGPAutoHideToolBar::SetActiveInGroup (BOOL bActive)
{
	CBCGPControlBar::SetActiveInGroup (bActive);
	if (bActive)
	{
		
		CObList lst;
		m_pDockBarRow->GetGroupFromBar (this, lst);

		for (POSITION pos = lst.GetHeadPosition (); pos != NULL;)
		{
			CBCGPControlBar* pBar = 
				DYNAMIC_DOWNCAST (CBCGPControlBar, lst.GetNext (pos));
			ASSERT_VALID (pBar);

			if (pBar != this)
			{
				pBar->SetActiveInGroup (FALSE);
			}
		}

		CRect rect; rect.SetRectEmpty ();
		m_pParentDockBar->RepositionBars (rect);
		
	}
}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:27,代码来源:BCGPAutoHideToolBar.cpp

示例9: SetNewParent

//------------------------------------------------------------------------//
void CBCGPGlobalUtils::SetNewParent (CObList& lstControlBars, CWnd* pNewParent,
									 BOOL bCheckVisibility)
{
	ASSERT_VALID (pNewParent);
	for (POSITION pos = lstControlBars.GetHeadPosition (); pos != NULL;)
	{
		CBCGPBaseControlBar* pBar = (CBCGPBaseControlBar*) lstControlBars.GetNext (pos);

		if (bCheckVisibility && !pBar->IsBarVisible ())
		{
			continue;
		}
		if (!pBar->IsKindOf (RUNTIME_CLASS (CBCGPSlider)))
		{
			pBar->ShowWindow (SW_HIDE);
			pBar->SetParent (pNewParent);
			CRect rectWnd;
			pBar->GetWindowRect (rectWnd);
			pNewParent->ScreenToClient (rectWnd);

			pBar->SetWindowPos (NULL, -rectWnd.Width (), -rectWnd.Height (), 
									  100, 100, SWP_NOZORDER | SWP_NOSIZE  | SWP_NOACTIVATE);
			pBar->ShowWindow (SW_SHOW);
		}
		else
		{
			pBar->SetParent (pNewParent);
		}
	}
}
开发者ID:iclosure,项目名称:jframework,代码行数:31,代码来源:BCGPGlobalUtils.cpp

示例10: Serialize

//************************************************************************************
void CBCGPCalendarMenuButton::Serialize (CArchive& ar)
{
	CBCGPToolbarMenuButton::Serialize (ar);

	if (ar.IsLoading ())
	{
		ar >> m_nColumns;
		ar >> m_nVertDockColumns;
		ar >> m_nHorzDockRows;

		ar >> m_bStdCalendarDlg;

		CObList listButtons;
		if (CBCGPToolBar::GetCommandButtons (m_nID, listButtons) > 0)
		{
			for (POSITION pos = listButtons.GetHeadPosition (); pos != NULL;)
			{
				CBCGPCalendarMenuButton* pOther = 
					DYNAMIC_DOWNCAST (CBCGPCalendarMenuButton, listButtons.GetNext (pos));
				if (pOther != NULL && pOther != this)
				{
					m_Calendar = pOther->m_Calendar;
				}
			}
		}
	}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:27,代码来源:BCGPCalendarMenuButton.cpp

示例11: CreateExtUserParams

//----------------------------- FUNCTION -------------------------------------*
void PropGSDModule::CreateExtUserParams()
{
	DWORD dwCurrentPos;
	CByteArray	UserParam;
	UserParam.RemoveAll();
	ExtParam* pParam = NULL;
	int offset = 0;

    UserParam.InsertAt(0, &m_DefaultUserPrmData);
    dwCurrentPos = UserParam.GetSize();

    if (m_bExtUserPrms) {
		// This sets all default parameter and of unused ExtUserPrms
		POSITION pos = ExtUserParams.GetHeadPosition();
		while (pos)	{
			pParam = (ExtParam*)ExtUserParams.GetNext(pos);
            ModifyParamArray(UserParam,pParam);
		}// end while of unused UserPrms
	}

    //actualize current position for appending the modules
    dwCurrentPos = UserParam.GetSize();
	// create UserParams and add them to the UserParam Array 
	m_pModule->GetUsedModules(&arModules);
	int index = arModules.GetSize();
	for (int i = 0; i < index; i++)	{
		CDP_Module* pModule = (CDP_Module*)arModules.GetAt(i);
		if (pModule->GetUserPrmLen() == 0)
			continue;

		CByteArray	ModuleParam;
		ModuleParam.RemoveAll();
		ModuleParam.InsertAt(0, 0x00, pModule->GetUserPrmLen());

		CObList* pParamList = pModule->GetExtParams();
		POSITION pos = pParamList->GetHeadPosition();
		while (pos)	{
			pParam = (ExtParam*)pParamList->GetNext(pos);
            ModifyParamArray(ModuleParam,pParam);
		}
		UserParam.InsertAt(dwCurrentPos, &ModuleParam);
		dwCurrentPos += pModule->GetUserPrmLen();
	}

	// set new userprms and show in EditCtrl
	m_ExtUserPrmData.RemoveAll();
    m_ExtUserPrmData.Copy(UserParam);

	if (::IsWindow(m_ctrlUserPrm.m_hWnd))
		m_ctrlUserPrm.SetHexContent(m_ExtUserPrmData.GetData(), m_ExtUserPrmData.GetSize());
}
开发者ID:LM25TTD,项目名称:ATCMcontrol_Engineering,代码行数:52,代码来源:PropGSDModule.cpp

示例12: Serialize

//************************************************************************************
void CBCGPColorMenuButton::Serialize (CArchive& ar)
{
	CBCGPToolbarMenuButton::Serialize (ar);

	if (ar.IsLoading ())
	{
		int nColorsCount;
		ar >> nColorsCount;

		m_Colors.SetSize (nColorsCount);

		for (int i = 0; i < nColorsCount; i++)
		{
			COLORREF color;
			ar >> color;

			m_Colors [i] = color;
		}

		ar >> m_nColumns;
		ar >> m_nVertDockColumns;
		ar >> m_nHorzDockRows;

		ar >> m_bIsAutomaticButton;    
		ar >> m_bIsOtherButton;        
		ar >> m_bIsDocumentColors;     
							
		ar >> m_strAutomaticButtonLabel;
		ar >> m_strOtherButtonLabel;   
		ar >> m_strDocumentColorsLabel;

		ar >> m_colorAutomatic;
		ar >> m_bStdColorDlg;

		// Synchromize color with another buttons with the same ID:
		CObList listButtons;
		if (CBCGPToolBar::GetCommandButtons (m_nID, listButtons) > 0)
		{
			for (POSITION pos = listButtons.GetHeadPosition (); pos != NULL;)
			{
				CBCGPColorMenuButton* pOther = 
					DYNAMIC_DOWNCAST (CBCGPColorMenuButton, listButtons.GetNext (pos));
				if (pOther != NULL && pOther != this &&
					pOther->m_Color != (COLORREF) -1)
				{
					m_Color = pOther->m_Color;
				}
			}
		}
	}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:51,代码来源:BCGPColorMenuButton.cpp

示例13: CalcMinMaxBounds

//************************************************************************************
static void CalcMinMaxBounds (const CObList& lst, int& nMin, int& nMax)
{
	for (POSITION pos = lst.GetHeadPosition (); pos != NULL; )
	{
		CBCGPOutlineBaseNode* pNode = (CBCGPOutlineBaseNode*) lst.GetNext (pos);
		ASSERT_VALID (pNode);

		if (pNode->m_nStart < nMin)
		{
			nMin = pNode->m_nStart;
		}
		if (pNode->m_nEnd > nMax)
		{
			nMax = pNode->m_nEnd;
		}
	}
}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:18,代码来源:BCGPOutlineParser.cpp

示例14: SetProfs

void CTabProfsDlg::SetProfs(CObList &list)
{
	ClearCounts();

	CProfData *pData;
	POSITION pos = list.GetHeadPosition();
	while(pos)
	{
		pData = (CProfData*)list.GetNext(pos);
		UpdateCount(pData->m_chProf,pData->m_nFirstClass,pData->m_nSecondClass);

		// Clear the list, it isn't needed anymore and will save the view from
		// having to do it.
		delete pData;
	}

	list.RemoveAll();
}
开发者ID:devurandom,项目名称:shadowkeeper,代码行数:18,代码来源:TabProfsDlg.cpp

示例15: RemoveTool

//*****************************************************************************************
BOOL CBCGPUserToolsManager::RemoveTool (CBCGPUserTool* pTool)
{
	ASSERT_VALID (pTool);
	POSITION pos = m_lstUserTools.Find (pTool);

	if (pos == NULL)
	{
		ASSERT (FALSE);
		return FALSE;
	}

	m_lstUserTools.RemoveAt (pos);

	UINT uiCmdId = pTool->GetCommandId ();
	delete pTool;

	if (!m_bIsCopy)
	{
		//------------------------------------
		// Remove user tool from all toolbars:
		//------------------------------------
		for (POSITION posTlb = gAllToolbars.GetHeadPosition (); posTlb != NULL;)
		{
			CBCGPToolBar* pToolBar = (CBCGPToolBar*) gAllToolbars.GetNext (posTlb);
			ASSERT (pToolBar != NULL);

			BOOL bToolIsFound = FALSE;

			int iIndex = -1;
			while ((iIndex = pToolBar->CommandToIndex (uiCmdId)) >= 0)
			{
				pToolBar->RemoveButton (iIndex);
				bToolIsFound = TRUE;
			}

			if (bToolIsFound)
			{
				pToolBar->AdjustLayout ();
			}
		}
	}

	return TRUE;
}
开发者ID:iclosure,项目名称:jframework,代码行数:45,代码来源:BCGPUserToolsManager.cpp


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