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

C++ GetNextItem函数代码示例

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

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



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

示例1: GetRootItem

// Collapse all the tree sections.  This is recursive
// so that we can collapse submenus.  SetRedraw should
// be FALSE while this is executing.
void CStatisticsTree::CollapseAll(HTREEITEM theItem)
{
	HTREEITEM hCurrent;

	if (theItem == NULL) {
		hCurrent = GetRootItem();
		m_bExpandingAll = true;
	}
	else
		hCurrent = theItem;

	while (hCurrent != NULL)
	{
		if (ItemHasChildren(hCurrent))
			CollapseAll(GetChildItem(hCurrent));
		Expand(hCurrent, TVE_COLLAPSE);
		hCurrent = GetNextItem(hCurrent, TVGN_NEXT);
	}

	if (theItem == NULL) m_bExpandingAll = false;
}
开发者ID:HackLinux,项目名称:eMule-IS-Mod,代码行数:24,代码来源:StatisticsTree.cpp


示例2: GetNextItem

void CMySuperGrid::SortData()
{
	int nIndex = GetNextItem(-1, LVNI_ALL | LVNI_SELECTED); 
	if(nIndex==-1)
		return;

	CTreeItem *pItem = reinterpret_cast<CTreeItem*>(GetItemData(nIndex));

	if(AfxMessageBox("Sort all children(Yes)\nor just sort rootitems(No)",MB_YESNO)==IDYES)
		Sort(pItem, TRUE);			
	else
		Sort(pItem, FALSE);			
	//do a simple refresh thing
	if(ItemHasChildren(pItem))
	{
		SetRedraw(0);
		Collapse(pItem);
		Expand(pItem, nIndex);
		SetRedraw(1);
	}
}
开发者ID:layerfsd,项目名称:Work,代码行数:21,代码来源:MySuperGrid.cpp


示例3: GetNextItem

void CDownloadClientsCtrl::OnContextMenu(CWnd* /*pWnd*/, CPoint point)
{
	int iSel = GetNextItem(-1, LVIS_SELECTED | LVIS_FOCUSED);
	const CUpDownClient* client = (iSel != -1) ? (CUpDownClient*)GetItemData(iSel) : NULL;

	CTitleMenu ClientMenu;
	ClientMenu.CreatePopupMenu();
	ClientMenu.AddMenuTitle(GetResString(IDS_CLIENTS), true);
	ClientMenu.AppendMenu(MF_STRING | (client ? MF_ENABLED : MF_GRAYED), MP_DETAIL, GetResString(IDS_SHOWDETAILS), _T("CLIENTDETAILS"));
	ClientMenu.SetDefaultItem(MP_DETAIL);

	//Xman Xtreme Downloadmanager
	if (client && client->GetDownloadState() == DS_DOWNLOADING)
		ClientMenu.AppendMenu(MF_STRING,MP_STOP_CLIENT,GetResString(IDS_STOP_CLIENT), _T("EXIT"));
	//Xman end
	//Xman friendhandling
	ClientMenu.AppendMenu(MF_SEPARATOR); 
	//Xman end
	ClientMenu.AppendMenu(MF_STRING | ((client && client->IsEd2kClient() && !client->IsFriend()) ? MF_ENABLED : MF_GRAYED), MP_ADDFRIEND, GetResString(IDS_ADDFRIEND), _T("ADDFRIEND"));
	//Xman friendhandling
	ClientMenu.AppendMenu(MF_STRING | (client && client->IsFriend() ? MF_ENABLED : MF_GRAYED), MP_REMOVEFRIEND, GetResString(IDS_REMOVEFRIEND), _T("DELETEFRIEND"));
	ClientMenu.AppendMenu(MF_STRING | (client && client->IsFriend() ? MF_ENABLED : MF_GRAYED), MP_FRIENDSLOT, GetResString(IDS_FRIENDSLOT), _T("FRIENDSLOT"));
	ClientMenu.CheckMenuItem(MP_FRIENDSLOT, (client && client->GetFriendSlot()) ? MF_CHECKED : MF_UNCHECKED);
	ClientMenu.AppendMenu(MF_SEPARATOR); 
	//Xman end

	ClientMenu.AppendMenu(MF_STRING | ((client && client->IsEd2kClient()) ? MF_ENABLED : MF_GRAYED), MP_MESSAGE, GetResString(IDS_SEND_MSG), _T("SENDMESSAGE"));
	ClientMenu.AppendMenu(MF_STRING | ((client && client->IsEd2kClient() && client->GetViewSharedFilesSupport()) ? MF_ENABLED : MF_GRAYED), MP_SHOWLIST, GetResString(IDS_VIEWFILES), _T("VIEWFILES"));
	if (Kademlia::CKademlia::IsRunning() && !Kademlia::CKademlia::IsConnected())
		ClientMenu.AppendMenu(MF_STRING | ((client && client->IsEd2kClient() && client->GetKadPort()!=0 && client->GetKadVersion() > 1) ? MF_ENABLED : MF_GRAYED), MP_BOOT, GetResString(IDS_BOOTSTRAP));
	ClientMenu.AppendMenu(MF_STRING | (GetItemCount() > 0 ? MF_ENABLED : MF_GRAYED), MP_FIND, GetResString(IDS_FIND), _T("Search"));

	// - show requested files (sivka/Xman)
	ClientMenu.AppendMenu(MF_SEPARATOR); 
	ClientMenu.AppendMenu(MF_STRING | (GetItemCount() > 0 ? MF_ENABLED : MF_GRAYED),MP_LIST_REQUESTED_FILES, GetResString(IDS_LISTREQUESTED), _T("FILEREQUESTED")); 
	//Xman end

	GetPopupMenuPos(*this, point);
	ClientMenu.TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, this);
}
开发者ID:rusingineer,项目名称:emulextreme-stulle,代码行数:40,代码来源:DownloadClientsCtrl.cpp


示例4: switch

void DIALOG_CHOOSE_COMPONENT::OnInterceptSearchBoxKey( wxKeyEvent& aKeyStroke )
{
    // Cursor up/down and partiallyi cursor are use to do tree navigation operations.
    // This is done by intercepting some navigational keystrokes that normally would go to
    // the text search box (which has the focus by default). That way, we are mostly keyboard
    // operable.
    // (If the tree has the focus, it can handle that by itself).
    const wxTreeItemId sel = m_libraryComponentTree->GetSelection();

    switch( aKeyStroke.GetKeyCode() )
    {
    case WXK_UP:
        selectIfValid( GetPrevItem( *m_libraryComponentTree, sel ) );
        break;

    case WXK_DOWN:
        selectIfValid( GetNextItem( *m_libraryComponentTree, sel ) );
        break;

        // The following keys we can only hijack if they are not needed by the textbox itself.

    case WXK_LEFT:
        if( m_searchBox->GetInsertionPoint() == 0 )
            m_libraryComponentTree->Collapse( sel );
        else
            aKeyStroke.Skip();   // Use for original purpose: move cursor.
        break;

    case WXK_RIGHT:
        if( m_searchBox->GetInsertionPoint() >= (long) m_searchBox->GetLineText( 0 ).length() )
            m_libraryComponentTree->Expand( sel );
        else
            aKeyStroke.Skip();   // Use for original purpose: move cursor.
        break;

    default:
        aKeyStroke.Skip();  // Any other key: pass on to search box directly.
        break;
    }
}
开发者ID:natsfr,项目名称:kicad,代码行数:40,代码来源:dialog_choose_component.cpp


示例5: GetTreeListItem

void CInspectorTreeCtrl::dynExpand(HTREEITEM in)
{
    CTreeListItem *parent = GetTreeListItem(in);
    assertex(parent);
    IPropertyTree &pTree = *parent->queryPropertyTree();
    if (!parent->isExpanded())
    {
        HTREEITEM i = GetChildItem(in);
        while(i)
        {
            DeleteItem(i);
            i = GetNextItem(i, TVGN_NEXT);              
        }
        CString txt;
        TV_INSERTSTRUCT is;
        is.hInsertAfter = TVI_LAST;
        is.item.mask = TVIF_TEXT | TVIF_PARAM;
        is.item.pszText = LPSTR_TEXTCALLBACK;   
        
        Owned<IAttributeIterator> attrIterator = pTree.getAttributes();
        ForEach(*attrIterator)
        {
            is.hParent = in;
            is.item.lParam = reinterpret_cast <DWORD> (createTreeListAttribute(attrIterator->queryName(), pTree));
            HTREEITEM r = InsertItem(&is);
            ASSERT(r != NULL);
        }

        Owned<IPropertyTreeIterator> iterator = pTree.getElements("*", iptiter_sort);
        ForEach(*iterator)
        {
            IPropertyTree & thisTree = iterator->query();

            is.hParent = in;
            is.item.lParam = reinterpret_cast <DWORD> (createTreeListProperty(thisTree.queryName(), thisTree));
            HTREEITEM thisTreeItem = InsertItem(&is);
            ASSERT(thisTreeItem != NULL);
        }
        parent->setExpanded();
    }
开发者ID:AlexLuya,项目名称:HPCC-Platform,代码行数:40,代码来源:inspectctrl.cpp


示例6: GetNextItem

void CContactListCtrl::OnCtxMakeQuickCall(wxCommandEvent& e)
{
  int idx = GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
  if ((idx >= 0) && (idx < m_liEntries.size()))
  {
    CContact& rContact = m_liEntries[idx];
    const TPhoneList& rPhones = rContact.getConstPhones();
    int phoneIdx = e.GetId() - ID_CTX_MAKE_CALL;
    if ((phoneIdx >= 0) && (phoneIdx < rPhones.size())) {
      wxString strNumber;
      rPhones[phoneIdx].getCallableNumber(strNumber);
      CCallMonitorApi *pCM = wxGetApp().getDefaultCallProvider();
      if (pCM) {
        wxLogMessage(wxT("Dialing %s using %s ..."), strNumber,
            wxGetApp().getPrefs().getDefaultCallProvider());
        pCM->makeCall(strNumber.ToUTF8().data());
      } else {
        wxLogMessage(wxT("Can't dial -> no valid default call provider"));
      }
    }
  }
}
开发者ID:Sonderstorch,项目名称:c-mon,代码行数:22,代码来源:contactspage.cpp


示例7: GetNextItem

void CFriendListCtrl::OnContextMenu(CWnd* /*pWnd*/, CPoint point)
{
	CTitleMenu ClientMenu;
	ClientMenu.CreatePopupMenu();
	ClientMenu.AddMenuTitle(GetResString(IDS_FRIENDLIST), true);

	const CFriend* cur_friend = NULL;
	int iSel = GetNextItem(-1, LVIS_SELECTED | LVIS_FOCUSED);
	if (iSel != -1) {
		cur_friend = (CFriend*)GetItemData(iSel);
		ClientMenu.AppendMenu(MF_STRING,MP_DETAIL, GetResString(IDS_SHOWDETAILS), _T("CLIENTDETAILS"));
		ClientMenu.SetDefaultItem(MP_DETAIL);
	}

	ClientMenu.AppendMenu(MF_STRING, MP_ADDFRIEND, GetResString(IDS_ADDAFRIEND), _T("ADDFRIEND"));
	ClientMenu.AppendMenu(MF_STRING | (cur_friend ? MF_ENABLED : MF_GRAYED), MP_REMOVEFRIEND, GetResString(IDS_REMOVEFRIEND), _T("DELETEFRIEND"));
	ClientMenu.AppendMenu(MF_STRING | (cur_friend ? MF_ENABLED : MF_GRAYED), MP_MESSAGE, GetResString(IDS_SEND_MSG), _T("SENDMESSAGE"));
	ClientMenu.AppendMenu(MF_STRING | ((cur_friend==NULL || (cur_friend && cur_friend->GetLinkedClient(true) && !cur_friend->GetLinkedClient(true)->GetViewSharedFilesSupport())) ? MF_GRAYED : MF_ENABLED), MP_SHOWLIST, GetResString(IDS_VIEWFILES) , _T("VIEWFILES"));
	ClientMenu.AppendMenu(MF_STRING, MP_FRIENDSLOT, GetResString(IDS_FRIENDSLOT), _T("FRIENDSLOT"));
	ClientMenu.AppendMenu(MF_STRING | (GetItemCount() > 0 ? MF_ENABLED : MF_GRAYED), MP_FIND, GetResString(IDS_FIND), _T("Search"));

    ClientMenu.EnableMenuItem(MP_FRIENDSLOT, (cur_friend)?MF_ENABLED : MF_GRAYED);
	ClientMenu.CheckMenuItem(MP_FRIENDSLOT, (cur_friend && cur_friend->GetFriendSlot()) ? MF_CHECKED : MF_UNCHECKED);
	// MORPH START - Modified by Commander, Friendlinks [emulEspaa] - added by zz_fly
	ClientMenu.AppendMenu(MF_SEPARATOR);
    ClientMenu.AppendMenu(MF_STRING | (theApp.IsEd2kFriendLinkInClipboard() ? MF_ENABLED : MF_GRAYED), MP_PASTE, GetResString(IDS_PASTE), _T("PASTELINK"));
	ClientMenu.AppendMenu(MF_STRING | (cur_friend ? MF_ENABLED : MF_GRAYED), MP_GETFRIENDED2KLINK, GetResString(IDS_GETFRIENDED2KLINK), _T("ED2KLINK"));
	ClientMenu.AppendMenu(MF_STRING | (cur_friend ? MF_ENABLED : MF_GRAYED), MP_GETHTMLFRIENDED2KLINK, GetResString(IDS_GETHTMLFRIENDED2KLINK), _T("ED2KLINK"));
	// MORPH END - Modified by Commander, Friendlinks [emulEspaa]

	// - show requested files (sivka/Xman)
	ClientMenu.AppendMenu(MF_SEPARATOR); 
	ClientMenu.AppendMenu(MF_STRING | (cur_friend && cur_friend->GetLinkedClient() ? MF_ENABLED : MF_GRAYED),MP_LIST_REQUESTED_FILES, GetResString(IDS_LISTREQUESTED), _T("FILEREQUESTED")); 
	//Xman end

	GetPopupMenuPos(*this, point);
	ClientMenu.TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, this);
	VERIFY( ClientMenu.DestroyMenu() ); // XP Style Menu [Xanatos] - Stulle
}
开发者ID:rusingineer,项目名称:eMule-scarangel,代码行数:39,代码来源:FriendListCtrl.cpp


示例8: SearchCompanionItem

//寻找项
HTREEITEM CCompanionTreeCtrl::SearchCompanionItem(HTREEITEM hRootTreeItem, DWORD_PTR dwParam)
{
	//获取父项
	if (hRootTreeItem==NULL) hRootTreeItem=GetRootItem();
	if (hRootTreeItem==NULL) return NULL;

	//循环查找
	HTREEITEM hTreeItemTemp=NULL;
	do
	{
		if (GetItemData(hRootTreeItem)==dwParam) return hRootTreeItem;
		hTreeItemTemp=GetChildItem(hRootTreeItem);
		if (hTreeItemTemp!=NULL)
		{
			hTreeItemTemp=SearchCompanionItem(hTreeItemTemp,dwParam);
			if (hTreeItemTemp!=NULL) return hTreeItemTemp;
		}
		hRootTreeItem=GetNextItem(hRootTreeItem,TVGN_NEXT);
	} while (hRootTreeItem!=NULL);

	return NULL;
}
开发者ID:275958081,项目名称:netfox,代码行数:23,代码来源:CompanionTreeCtrl.cpp


示例9: wxLogDebug

// Get an array of row numbers currently selected in the listctrl
void main_listctrl::get_selected_row_numbers( wxArrayInt *row_numbers )
{   
    long  selected_row_number = -1;  // '-1' needed to include the first selected row.
    
    wxLogDebug( "Entering selected row numbers function" );                                   
        
    for ( ;; ) {
        // for( ;; ) with this next line is the recommended way for iterating selected rows.
        // selected_row_number was initialized at -1 to allow inclusion of first selected
        // row.
        selected_row_number = GetNextItem( selected_row_number, wxLIST_NEXT_ALL,
                                           wxLIST_STATE_SELECTED );
        
        if ( selected_row_number == -1 ) {
            break;           
        } else {
            row_numbers->Add( selected_row_number );        
            wxLogDebug( "Appended row %ld to selected rows", selected_row_number );
        }            
        
    }
}
开发者ID:TimofonicJunkRoom,项目名称:plucker-1,代码行数:23,代码来源:main_listctrl_[most_of_get_set_data_approach].cpp


示例10: GetNextItem

void DocumentListCtrl::SortOnResemblance (bool force_sort)
{
	if (_lastsort == sortResemblance && !force_sort) return;
	_lastsort = sortResemblance;
	// get current selected item
	long item_number = GetNextItem (-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
	int selected_item = (item_number == -1 ? -1 : _sortedIndices[(int)item_number]);

	std::vector<int> newIndices;

	// initialise the set of new indices
	for (int i=0; i < _sortedIndices.size(); ++i)
	{
		newIndices.push_back (_sortedIndices[i]);
	}
	
	std::sort (newIndices.begin(), newIndices.end(), 
			_ferretparent->GetDocumentList().GetSimilarityComparer (&_document1, &_document2, _remove_common_trigrams, _ignore_template_material));

	_sortedIndices = newIndices;
	RefreshItems (0, _sortedIndices.size()-1);
	// select original item
	if (selected_item != -1)
	{
		// find item in sorted indices, and select that position
		for (long i = 0, n = _sortedIndices.size(); i < n; ++i)
		{
			SetItemState (i, !wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
			if (_sortedIndices[i] == selected_item)
			{
				SetItemState (i, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
				EnsureVisible (i);
			}
		}
	}

	Refresh ();
	_ferretparent->SetStatusText ("Rearranged table by similarity", 0);
}
开发者ID:abame,项目名称:ferret,代码行数:39,代码来源:resultstable.cpp


示例11: GetNextItem

void DataListCtrl::OnBake(wxCommandEvent& event)
{
   long item = GetNextItem(-1,
         wxLIST_NEXT_ALL,
         wxLIST_STATE_SELECTED);
   if (item != -1 && GetItemText(item) == "Volume")
   {
      wxString name = GetText(item, 1);

      wxFileDialog *fopendlg = new wxFileDialog(
            m_frame, "Bake Volume Data", "", "",
            "Muti-page Tiff file (*.tif, *.tiff)|*.tif;*.tiff|"\
            "Single-page Tiff sequence (*.tif)|*.tif;*.tiff|"\
            "Nrrd file (*.nrrd)|*.nrrd",
            wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
      fopendlg->SetExtraControlCreator(CreateExtraControl);

      int rval = fopendlg->ShowModal();

      if (rval == wxID_OK)
      {
         wxString filename = fopendlg->GetPath();

         VRenderFrame* vr_frame = (VRenderFrame*)m_frame;
         if (vr_frame)
         {
            VolumeData* vd = vr_frame->GetDataManager()->GetVolumeData(name);
            if (vd)
            {
               vd->Save(filename, fopendlg->GetFilterIndex(), true, VRenderFrame::GetCompression());
               wxString str = vd->GetPath();
               SetText(item, 2, str);
            }
         }
      }

      delete fopendlg;
   }
}
开发者ID:takashi310,项目名称:VVD_Viewer,代码行数:39,代码来源:ListPanel.cpp


示例12: ClearSelection

BOOL CLibraryFolderCtrl::ClearSelection(HTREEITEM hExcept, HTREEITEM hItem, BOOL bSelect)
{
	BOOL bChanged = FALSE;

	if ( hItem == NULL ) hItem = GetRootItem();

	for ( ; hItem != NULL ; hItem = GetNextItem( hItem, TVGN_NEXT ) )
	{
		BOOL bIsSelected = ( GetItemState( hItem, TVIS_SELECTED ) & TVIS_SELECTED ) ? TRUE : FALSE;

		if ( hItem != hExcept && ( bIsSelected != bSelect ) )
		{
			SetItemState( hItem, bSelect ? TVIS_SELECTED : 0, TVIS_SELECTED );
			bChanged = TRUE;
		}

		HTREEITEM hChild = GetChildItem( hItem );
		if ( hChild != NULL ) bChanged |= ClearSelection( hExcept, hChild, bSelect );
	}

	return bChanged;
}
开发者ID:ivan386,项目名称:Shareaza,代码行数:22,代码来源:CtrlSharedFolder.cpp


示例13: InvalidOperationException

   /// <summary>Gets the text of the selected suggestion.</summary>
   /// <returns></returns>
   /// <exception cref="Logic::InvalidOperationException">No item selected</exception>
   /// <exception cref="Logic::NotImplementedException">Command selected</exception>
   wstring SuggestionList::GetSelected() const
   {
      // Ensure exists
      if (GetNextItem(-1, LVNI_SELECTED) == -1)
         throw InvalidOperationException(HERE, L"No item selected");

      // Get selection and format
      switch (SuggestionType)
      {
      case Suggestion::GameObject:   return VString(L"{%s}", Content[GetNextItem(-1, LVNI_SELECTED)].Text.c_str());
      case Suggestion::ScriptObject: return VString(L"[%s]", Content[GetNextItem(-1, LVNI_SELECTED)].Text.c_str());
      case Suggestion::Variable:     return VString(L"$%s", Content[GetNextItem(-1, LVNI_SELECTED)].Text.c_str());
      case Suggestion::Label:        return VString(L"%s:", Content[GetNextItem(-1, LVNI_SELECTED)].Text.c_str());
      case Suggestion::Command:      return Content[GetNextItem(-1, LVNI_SELECTED)].Text;
      default:  return L"Error";
      }
   }
开发者ID:CyberSys,项目名称:X-Studio-2,代码行数:21,代码来源:SuggestionList.cpp


示例14: nCount

void wxGxContentView::OnSelected(wxListEvent& event)
{
	//event.Skip();
    m_pSelection->Clear(NOTFIRESELID);
    long nItem = wxNOT_FOUND;
	size_t nCount(0);
    for ( ;; )
    {
        nItem = GetNextItem(nItem, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
        if ( nItem == wxNOT_FOUND )
            break;
        LPITEMDATA pItemData = (LPITEMDATA)GetItemData(nItem);
	    if(pItemData == NULL)
            continue;
		nCount++;
        m_pSelection->Select(pItemData->nObjectID, true, NOTFIRESELID);
    }

    if (m_pGxApp != NULL)
    {
        if(nCount <= 0)
	    	m_pSelection->SetInitiator(TREECTRLID);
        m_pGxApp->UpdateNewMenu(m_pSelection);
	}

    wxGISStatusBar* pStatusBar = m_pApp->GetStatusBar();
    if(pStatusBar)
    {
        if(nCount > 1)
        {
            pStatusBar->SetMessage(wxString::Format(_("%ld objects selected"), nCount));
        }
        else
        {
            pStatusBar->SetMessage(wxEmptyString);
        }
    }
}
开发者ID:GimpoByte,项目名称:nextgismanager,代码行数:38,代码来源:gxcontentview.cpp


示例15: GetRootItem

// This is the primary function for generating HTML output of the statistics tree.
// It is recursive.
CString CStatisticsTree::GetHTML(bool onlyVisible, HTREEITEM theItem, int theItemLevel, bool firstItem)
{
	HTREEITEM hCurrent;
	if (theItem == NULL)
	{
		if (!onlyVisible)
			theApp.emuledlg->statisticswnd->ShowStatistics(true);
		hCurrent = GetRootItem(); // Copy All Vis or Copy All
	}
	else
		hCurrent = theItem;

	CString	strBuffer;
	if (firstItem)
		strBuffer.Format(_T("<font face=\"Tahoma,Verdana,Courier New,Helvetica\" size=\"2\">\r\n<b>eMule v%s %s [%s]</b>\r\n<br /><br />\r\n"), theApp.m_strCurVersionLong, GetResString(IDS_SF_STATISTICS), thePrefs.GetUserNick());

	while (hCurrent != NULL)
	{
		CString	strItem;
		if (IsBold(hCurrent))
			strItem = _T("<b>") + GetItemText(hCurrent) + _T("</b>");
		else
			strItem = GetItemText(hCurrent);
		for (int i = 0; i < theItemLevel; i++)
			strBuffer += _T("&nbsp;&nbsp;&nbsp;");
		if (theItemLevel == 0)
			strBuffer.Append(_T("\n"));
		strBuffer += strItem + _T("<br />");
		if (ItemHasChildren(hCurrent) && (!onlyVisible || IsExpanded(hCurrent)))
			strBuffer += GetHTML(onlyVisible, GetChildItem(hCurrent), theItemLevel+1, false);
		hCurrent = GetNextItem(hCurrent, TVGN_NEXT);
		if (firstItem && theItem != NULL)
			break; // Copy Selected Branch was used, so we don't want to copy all branches at this level.  Only the one that was selected.
	}
	if (firstItem)
		strBuffer += _T("</font>");
	return strBuffer;
}
开发者ID:axxapp,项目名称:winxgui,代码行数:40,代码来源:StatisticsTree.cpp


示例16: WXUNUSED

void WFileList::OnMenuFileDelete(wxCommandEvent& WXUNUSED(event))
{
    std::vector<int> subfilelist;

    long sfid = -1;
    while (1)
    {
        sfid = GetNextItem(sfid, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
        if (sfid == -1) break;

        subfilelist.push_back(sfid);
    }

    wxString surestr;

    if (subfilelist.empty()) return;
    else if (subfilelist.size() == 1)
    {
        wxString filelist = strSTL2WX(wmain->container.GetSubFileProperty(subfilelist[0], "Name"));
        surestr = wxString::Format(_("Going to permanently delete \"%s\". This cannot be undone, are you sure?"), filelist.c_str());
    }
    else {
        surestr = wxString::Format(_("Going to permanently delete %u files. This cannot be undone, are you sure?"), subfilelist.size());
    }

    wxMessageDialog suredlg(this, surestr, _("Delete files?"),
                            wxYES_NO | wxNO_DEFAULT);

    if (suredlg.ShowModal() != wxID_YES) return;

    for (std::vector<int>::reverse_iterator sfi = subfilelist.rbegin();
         sfi != subfilelist.rend(); ++sfi)
    {
        wmain->DeleteSubFile(*sfi, false);
    }

    ResetItems();
}
开发者ID:gatlex,项目名称:cryptote,代码行数:38,代码来源:wfilelist.cpp


示例17: switch

void DataListCtrl::SetSelection(int type, wxString &name)
{
   wxString str_type;
   switch (type)
   {
   case DATA_VOLUME:
      str_type = "Volume";
      break;
   case DATA_MESH:
      str_type = "Mesh";
      break;
   case DATA_ANNOTATIONS:
      str_type = "Annotations";
      break;
   }

   long item = -1;
   for (;;)
   {
      item = GetNextItem(item,
            wxLIST_NEXT_ALL,
            wxLIST_STATE_DONTCARE);
      if (item != -1)
      {
         wxString item_type = GetText(item, 0);
         wxString item_name = GetText(item, 1);

         if (item_type == str_type &&
               item_name == name)
         {
            SetItemState(item, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
            break;
         }
      }
      else
         break;
   }
}
开发者ID:takashi310,项目名称:VVD_Viewer,代码行数:38,代码来源:ListPanel.cpp


示例18: GetRootItem

void CMultiTreeCtrl::GetCheckItems(std::vector<HTREEITEM>& vecTreeItems, HTREEITEM hTreeItem)
{
	if (hTreeItem == NULL)
	{
		hTreeItem = GetRootItem();
	}

	HTREEITEM hNextItem = GetChildItem(hTreeItem);
	while(hNextItem!=NULL)
	{
		GetCheckItems(vecTreeItems, hNextItem);
		hNextItem = GetNextItem(hNextItem,TVGN_NEXT);
	}

	if (hTreeItem!=NULL)
	{
		//如果该节点复选框被选中
		if (GetCheck(hTreeItem))
		{
			vecTreeItems.push_back(hTreeItem);
		}
	}
}
开发者ID:github188,项目名称:MonitorSystem,代码行数:23,代码来源:MultiTreeCtrl.cpp


示例19: HitTest

void CMusikListCtrl::SelectClickedItem(wxMouseEvent &event)
{
	int HitFlags = 0;
	long item = HitTest(event.GetPosition(),HitFlags);
	if(item != -1)
	{
        if((wxLIST_STATE_SELECTED & GetItemState(item,wxLIST_STATE_SELECTED)) != wxLIST_STATE_SELECTED) // bug in MSW GetItemState (mask param is ignored)
        {    
            if(!event.CmdDown())
            {
                int i = -1;
                while ( -1 != (i = GetNextItem(i, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED)))
                {
                    if(i != item)
                        SetItemState( i, 0, wxLIST_STATE_SELECTED );
                }

            }
            SetItemState(item,wxLIST_STATE_SELECTED,wxLIST_STATE_SELECTED);
            wxTheApp->Yield(true);   // call yield to let the SetItemState changes go through the system.
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:musik-svn,代码行数:23,代码来源:MusikListCtrl.cpp


示例20: GetRootItem

    BOOL SMCTreeCtrl::DeleteColumn(int iCol)
    {
        if(iCol<0 || iCol>=m_arrColWidth.GetCount()) 
            return FALSE;
        HSTREEITEM hItem = GetRootItem();
        while(hItem)
        {
            MCITEM *pMcItem = (MCITEM*)STreeCtrl::GetItemData(hItem);
            pMcItem->arrText.RemoveAt(iCol);
            hItem = GetNextItem(hItem);
        }
        int nColWid = m_arrColWidth[iCol];
        m_arrColWidth.RemoveAt(iCol);
        
        m_nItemWid = -1;
        CalcItemWidth(0);

        CSize szView = GetViewSize();
        szView.cx = m_nItemWid;
        SetViewSize(szView);
        Invalidate();
        return TRUE;
    }
开发者ID:435420057,项目名称:soui,代码行数:23,代码来源:STreeList.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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