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

C++ GetItemText函数代码示例

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

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



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

示例1: GetItemText

wxTreeItemId
SamplesTreeCtrl::changeSpeaker( const wxTreeItemId &speech,
                                const wxTreeItemId &currentSpeaker,
                                const wxTreeItemId &newSpeaker )
{
	// Do be sure that these aren't made invalid when the item is deleted.
	std::string name     = GetItemText( speech );
	wxTreeItemData *data = GetItemData( speech );

	SetItemData( speech, NULL ); // replace the data with NULL; speech will not delete it now!
	Delete( speech );

	// Delete the speaker, if this was the only speech in it.
	if ( GetChildrenCount( currentSpeaker ) == 0 )
		Delete( currentSpeaker );

	return AppendItem( newSpeaker, name.c_str(), -1, -1, data );
}
开发者ID:rainChu,项目名称:ytp-king,代码行数:18,代码来源:SamplesTreeCtrl.cpp


示例2: Get_Server_Item

//---------------------------------------------------------
wxTreeItemId CData_Source_PgSQL::Find_Source(const wxString &Server)
{
	wxTreeItemId	Item	= Get_Server_Item(Server, false);

	if( Item.IsOk() )
	{
		wxTreeItemIdValue Cookie; Item = GetFirstChild(Item, Cookie);

		wxString	Name	= Server.BeforeLast('['); Name.Trim(true);

		while( Item.IsOk() && Name.Cmp(GetItemText(Item)) )
		{
			Item	= GetNextChild(Item, Cookie);
		}
	}

	return( Item );
}
开发者ID:sinozope,项目名称:SAGA-GIS-git-mirror,代码行数:19,代码来源:data_source_pgsql.cpp


示例3: while

CString CDirTreeCtrl::GetFullPath(HTREEITEM hItem)
{
	CString strReturn;
	CString strTemp;
	HTREEITEM hParent = hItem;
	strReturn = "";
	while ( hParent )
	{ 
		strTemp  = GetItemText( hParent );
		if(strTemp != _T("project"))   {
			if ( strTemp.Right(1) !=  _T("\\"))
				strTemp += _T("\\");
			strReturn = strTemp + strReturn;
		} 
		hParent = GetParentItem( hParent );
	}
	return strReturn;
}
开发者ID:neil-yi,项目名称:ffsource,代码行数:18,代码来源:DirTreeCtrl.cpp


示例4: GetItemText

void CLightTree::OnTvnSelchanged(NMHDR *pNMHDR, LRESULT *pResult)
{
	
	LPNMTREEVIEW pNMTreeView = reinterpret_cast<LPNMTREEVIEW>(pNMHDR);
	// TODO:  在此添加控件通知处理程序代码
	CString obj_name = GetItemText(pNMTreeView->itemNew.hItem);
	CMainFrame *pFrame = (CMainFrame*)(AfxGetApp()->m_pMainWnd);
	pFrame->draw_property(obj_name, DRAW_LIGHT);
	pFrame->m_obj_or_light_name = obj_name;
	pFrame->m_draw_type = DRAW_LIGHT;
	CSceneEditorView* pView = (CSceneEditorView*)pFrame->GetActiveView();
	/*取消另外的选中
	HTREEITEM hItem = pFrame->m_wndFileView.m_wndFileView.GetSelectedItem();
	pFrame->m_wndFileView.m_wndFileView.SetItemState(hItem, 0, TVIS_SELECTED);
	*/
	pView->Invalidate(FALSE);
	*pResult = 0;
}
开发者ID:XiangTianxiao,项目名称:SceneEditor,代码行数:18,代码来源:LightTree.cpp


示例5: GetParentItem

CString CDirTreeCtrl::GetFullPath1(HTREEITEM hItem)
{
	CString path, temp;

	HTREEITEM hParent = GetParentItem(hItem);
	while ( hParent )
	{ 
		temp  = GetItemText( hParent );
		if(temp != m_RootName){
			temp =  temp + _T("\\");
			path = temp + path;
		}
		hParent = GetParentItem(hParent);
	}
	path = _T("\\") + path;
	path = m_RootPath + path;
	return path;
}
开发者ID:neil-yi,项目名称:ffsource,代码行数:18,代码来源:DirTreeCtrl.cpp


示例6: JXKeyModifiers

void
JXStringCompletionMenu::HandleSelection
	(
	const JIndex index
	)
{
	if (itsAllowTabChar && index == kInsertTabCmd)
		{
		// tab may insert spaces
		itsTE->JXTEBase::HandleKeyPress('\t', JXKeyModifiers(GetDisplay()));
		}
	else if (index - (itsAllowTabChar ? kSpecialCmdCount : 0) <= kMaxItemCount)
		{
		JString s = GetItemText(index);
		s.RemoveSubstring(1, kItemPrefixLength + itsPrefixLength);
		itsTE->Paste(s);
		}
}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:18,代码来源:JXStringCompletionMenu.cpp


示例7: _T

void CLocalTreeView::RemoveDrive(wxChar drive)
{
	wxString driveName = drive;
	driveName += _T(":");
	wxTreeItemIdValue value;
	wxTreeItemId driveItem = GetFirstChild(m_drives, value);
	while (driveItem)
	{
		if (!GetItemText(driveItem).Left(2).CmpNoCase(driveName))
			break;

		driveItem = GetNextSibling(driveItem);
	}
	if (!driveItem)
		return;

	Delete(driveItem);
}
开发者ID:idgaf,项目名称:FileZilla3,代码行数:18,代码来源:LocalTreeView.cpp


示例8: SuppressListItemStateEventsWrapper

void CSourcesListBox::DelSel()
{
	//-----------------------------------------------------//
	//--- the EVT_LIST_ITEM_SELECTED will check this	---//
	//--- as there is no need to update the sel until	---//
	//--- we're done									---//
	//-----------------------------------------------------//
    SuppressListItemStateEventsWrapper(*this);
    m_Deleting = true;

	//--- where are we selected? ---//
	int nIndex = - 1;
	nIndex = GetNextItem( nIndex, wxLIST_NEXT_ALL , wxLIST_STATE_SELECTED );

	int nType = GetType( nIndex );

	//--- no item selected? bail ---//
	if ( nIndex == - 1 || nType == MUSIK_SOURCES_LIBRARY || nType == MUSIK_SOURCES_NOW_PLAYING )
		return;

	//--- if we have a standard or dynamic playlist, delete the file ---//
	if ( nType == MUSIK_SOURCES_PLAYLIST_STANDARD || nType == MUSIK_SOURCES_PLAYLIST_DYNAMIC || MUSIK_SOURCES_NETSTREAM)
	{
		wxString sFilename = GetItemText( nIndex );
		SourcesToFilename( &sFilename, nType );

		if ( wxFileExists( sFilename ) )
			wxRemoveFile( sFilename );
	}
	
	//--- remove item from list ---//
	m_SourcesList.RemoveAt( nIndex );
	Update();


	int nNextSel = nIndex;
	if ( nNextSel != 0 )
		nNextSel -= 1;

	SetItemState( nNextSel, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );
	UpdateSel( nNextSel );

	m_Deleting = false;
}
开发者ID:BackupTheBerlios,项目名称:musik-svn,代码行数:44,代码来源:SourcesBox.cpp


示例9: _QuickSortRecursive

BOOL CReportCtrl::_PartialSort(int nStart, int nEnd)
{
	if (nStart >= nEnd || !_IsValidIndex(nStart) || !_IsValidIndex(nEnd))
		return FALSE;

	const int COUNT = nEnd - nStart + 1;
	int i = 0;
	int* aIndices = new int[COUNT];
	for (i = 0; i < COUNT; i++)
		aIndices[i] = nStart + i;
	
	_QuickSortRecursive(aIndices, 0, COUNT - 1); 

	// rearrange items
	const int COLS = GetColumnCount();
	ROWINFO* aRows = new ROWINFO[COUNT];
	for (i = 0; i < COUNT; i++)
	{
		int n = aIndices[i];
		aRows[i].dwStates = GetItemStates(aIndices[i]);
		aRows[i].dwData = CListCtrl::GetItemData(aIndices[i]);
		aRows[i].aImages.SetSize(COLS);
		aRows[i].aTexts.SetSize(COLS);
		for (int j = 0; j < COLS; j++)
		{
			aRows[i].aImages[j] = GetItemImage(aIndices[i], j);
			aRows[i].aTexts[j] = GetItemText(aIndices[i], j);
		}
	}

	for (i = 0; i < COUNT; i++)
	{
		SetItemStates(nStart + i, aRows[i].dwStates);
		CListCtrl::SetItemData(nStart + i, aRows[i].dwData);
		for (int j = 0; j < COLS; j++)
		{
			SetItemImage(nStart + i, j, aRows[i].aImages[j]);			
			CListCtrl::SetItemText(nStart + i, j, aRows[i].aTexts[j]);
		}
	}
	delete [] aRows;
	delete [] aIndices;
	return TRUE;
}
开发者ID:KnowNo,项目名称:test-code-backup,代码行数:44,代码来源:ReportCtrl.cpp


示例10: GetRootItem

CString CStatisticsTree::GetText(bool onlyVisible, HTREEITEM theItem, int theItemLevel, bool firstItem)
{
	bool bPrintHeader = firstItem;
	HTREEITEM hCurrent;
	if (theItem == NULL)
	{
		hCurrent = GetRootItem(); // Copy All Vis or Copy All
	}
	else
	{
		if (bPrintHeader && (!ItemHasChildren(theItem) || !IsExpanded(theItem)))
			bPrintHeader = false;
		hCurrent = theItem;
	}

	CString	strBuffer;
	if (bPrintHeader)
		//Xman // Maella -Support for tag ET_MOD_VERSION 0x55
		/*
		strBuffer.Format(_T("eMule v%s %s [%s]\r\n\r\n"), theApp.m_strCurVersionLong, GetResString(IDS_SF_STATISTICS) ,thePrefs.GetUserNick());
		*/
		// ==> ModID [itsonlyme/SiRoB] - Stulle
		/*
		strBuffer.Format(_T("eMule v%s %s [%s]\r\n\r\n"), theApp.m_strCurVersionLong + _T(" ") + MOD_VERSION, GetResString(IDS_SF_STATISTICS) ,thePrefs.GetUserNick()); //Xman // Maella -Support for tag ET_MOD_VERSION 0x55
		*/
		strBuffer.Format(_T("eMule v%s [%s] %s [%s]\r\n\r\n"), theApp.m_strCurVersionLong,theApp.m_strModLongVersion, GetResString(IDS_SF_STATISTICS) ,thePrefs.GetUserNick());
		// <== ModID [itsonlyme/SiRoB] - Stulle
		//Xman end

	while (hCurrent != NULL)
	{
		for (int i = 0; i < theItemLevel; i++)
			strBuffer += _T("   ");
		strBuffer += GetItemText(hCurrent);
		if (bPrintHeader || !firstItem)
			strBuffer += _T("\r\n");
		if (ItemHasChildren(hCurrent) && (!onlyVisible || IsExpanded(hCurrent)))
			strBuffer += GetText(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.
	}
	return strBuffer;
}
开发者ID:brolee,项目名称:EMule-GIFC,代码行数:44,代码来源:StatisticsTree.cpp


示例11: GetItemText

//绘画数据
VOID CEasySkinListCtrl::DrawReportItem(CDC * pDC, INT nItem, CRect & rcSubItem, INT nColumnIndex)
{
	//获取文字
	TCHAR szString[256]=TEXT("");
	GetItemText(nItem,nColumnIndex,szString,CountArray(szString));

	//绘画文字
	rcSubItem.left+=5;

	//绘制CheckButton
	if( nColumnIndex == 0 )
	{
		if ((m_pCheckImg != NULL && !m_pCheckImg->IsNull()) && (m_pUnCheckImg != NULL && !m_pUnCheckImg->IsNull()))
		{
			if( GetCheck(nItem) )
				m_pCheckImg->DrawImage(pDC,rcSubItem.left+2,rcSubItem.top+(rcSubItem.Height()-m_pCheckImg->GetHeight())/2);
			else
				m_pUnCheckImg->DrawImage(pDC,rcSubItem.left+2,rcSubItem.top+(rcSubItem.Height()-m_pUnCheckImg->GetHeight())/2);

			rcSubItem.left+=(8+m_pCheckImg->GetWidth());
		}

		CItemImgArray::iterator iter = m_ItemImgArray.begin();

		for (;iter != m_ItemImgArray.end(); ++iter )
		{
			if ( iter->nItem == nItem )
			{
				CImageEx *pImage = iter->pImage;

				if (pImage != NULL && !pImage->IsNull())
				{
					pImage->DrawImage(pDC,rcSubItem.left+2,rcSubItem.top+(rcSubItem.Height()-pImage->GetHeight())/2);
					rcSubItem.left+=(8+pImage->GetWidth());
				}
				break;
			}
		}
	}

	pDC->DrawText(szString,lstrlen(szString),&rcSubItem,DT_VCENTER|DT_SINGLELINE|DT_END_ELLIPSIS);

	return;
}
开发者ID:alon-zhong,项目名称:EasyClient,代码行数:45,代码来源:EasySkinListCtrl.cpp


示例12: GetDataView

void WIDGET_HOTKEY_LIST::OnSize( wxSizeEvent& aEvent )
{
    // Handle this manually - wxTreeListCtrl screws up the width of the first column
    wxDataViewCtrl* view = GetDataView();

    if( !view )
        return;

    wxRect rect = GetClientRect();
    view->SetSize( rect );

#ifdef wxHAS_GENERIC_DATAVIEWCTRL
    {
        wxWindow* view = GetView();
        view->Refresh();
        view->Update();
    }
#endif

    // Find the maximum width of the hotkey column
    int hk_column_width = 0;

    for( wxTreeListItem item = GetFirstItem(); item.IsOk(); item = GetNextItem( item ) )
    {
        const wxString& text = GetItemText( item, 1 );
        int width = WidthFor( text );

        if( width > hk_column_width )
            hk_column_width = width;
    }

    if( hk_column_width < HOTKEY_MIN_WIDTH )
        hk_column_width = HOTKEY_MIN_WIDTH;
    else if( hk_column_width <= 0 )
        hk_column_width = 1;

    int name_column_width = rect.width - hk_column_width - HORIZ_MARGIN;

    if( name_column_width <= 0 )
        name_column_width = 1;

    SetColumnWidth( 1, hk_column_width );
    SetColumnWidth( 0, name_column_width );
}
开发者ID:bpkempke,项目名称:kicad-source-mirror,代码行数:44,代码来源:widget_hotkey_list.cpp


示例13: GetItem

void CListControlEx::DrawItem( LPDRAWITEMSTRUCT lpDrawItemStruct )
{
	// TODO:  添加您的代码以绘制指定项
	CDC* pDC = CDC::FromHandle(lpDrawItemStruct->hDC);

	LVITEM lvi = {0};
	lvi.mask = LVIF_STATE;
	lvi.stateMask = LVIS_FOCUSED | LVIS_SELECTED ;
	lvi.iItem = lpDrawItemStruct->itemID;
	BOOL bGet = GetItem(&lvi);

	BOOL bHighlight =((lvi.state & LVIS_DROPHILITED)||((lvi.state & LVIS_SELECTED) && ((GetFocus() == this)|| (GetStyle() & LVS_SHOWSELALWAYS))));

	CRect rcBack = lpDrawItemStruct->rcItem;

	if( bHighlight ) //高亮显示
	{
		pDC->SetTextColor(::GetSysColor(COLOR_HIGHLIGHTTEXT));
		pDC->SetBkColor(::GetSysColor(COLOR_HIGHLIGHT));
		pDC->FillRect(rcBack, &CBrush(::GetSysColor(COLOR_HIGHLIGHT)));
	}
	else
	{

		pDC->SetTextColor(::GetSysColor(COLOR_WINDOWTEXT));
		pDC->FillRect(rcBack, &CBrush(::GetSysColor(COLOR_WINDOW)));


	}
	//绘制文本
	CString strText=L"";
	CRect rcItem;
	if (lpDrawItemStruct->itemAction & ODA_DRAWENTIRE)
	{
		for (int i = 0; i < GetHeaderCtrl()-> GetItemCount();i++)
		{            
			if ( !GetSubItemRect(lpDrawItemStruct->itemID, i, LVIR_LABEL, rcItem ))
				continue;
			strText = GetItemText( lpDrawItemStruct->itemID, i );

			pDC->DrawText(strText,strText.GetLength(), &rcItem, DT_LEFT|DT_VCENTER|DT_SINGLELINE|DT_BOTTOM);
		}
	}
}
开发者ID:loveunk,项目名称:diseases-prediction-and-tracking,代码行数:44,代码来源:ListControlEx.cpp


示例14: GetFirstChild

bool browsers::CellBrowser::findItem(const wxString name, wxTreeItemId& item, const wxTreeItemId parent) 
{
   wxTreeItemIdValue cookie;
   wxTreeItemId child = GetFirstChild(parent,cookie);
   while (child.IsOk()) 
   {
      if (item.IsOk()) 
      {
         if (child == item) item = wxTreeItemId();
      }
      else if (name == GetItemText(child)) 
      {
         item = child; return true;
      }   
      if (findItem(name, item, child)) return true;
      child = GetNextChild(parent,cookie);
   }
   return false;
}   
开发者ID:BackupTheBerlios,项目名称:toped-svn,代码行数:19,代码来源:browsers.cpp


示例15: GetItemText

/**
 *
 * \param *pNMHDR 
 * \param *pResult 
 */
void	CUnitListBox::OnLvnBegindrag(NMHDR *pNMHDR, LRESULT *pResult)
{
	LPNMLISTVIEW pNMLV	= reinterpret_cast<LPNMLISTVIEW>(pNMHDR);
	if (pNMLV->iItem >= 0)
	{
		// 获取文件名
		m_szFileName		= GetItemText(pNMLV->iItem, pNMLV->iSubItem);

		POINT pt ={
			0, 0
		};

		int nOffset = 0;
		int nCount	= GetSelectedCount();
		if (nCount >= 1)
		{
			pt.x = nOffset;
			pt.y = nOffset;
		}

		m_pDragImage = CreateDragImage(pNMLV->iItem, &pt);
		if (m_pDragImage)
		{
			IMAGEINFO img;
			m_ImageList.GetImageInfo(pNMLV->iItem, &img);

			CBitmap* pBitmap = CBitmap::FromHandle(img.hbmImage);
			if (pBitmap)
			{
				m_pDragImage->Replace(0, pBitmap, NULL);
				m_pDragImage->BeginDrag(0, 
					CPoint(nOffset, nOffset));
				m_pDragImage->DragEnter(GetDesktopWindow(), pNMLV->ptAction);

				m_bDragging = TRUE;

				SetCapture ();
			}
		}
	}

	*pResult = 0;
}
开发者ID:lonyzone,项目名称:oathx-ogrex-editor,代码行数:48,代码来源:UnitListBox.cpp


示例16: GetItemText

void browsers::CellBrowser::ShowMenu(wxTreeItemId id, const wxPoint& pt) {
    wxMenu menu;
    RBcellID = id;
    if ( id.IsOk() && (id != GetRootItem()))   {
      wxString RBcellname = GetItemText(id);
      menu.Append(CELLTREEOPENCELL, wxT("Open " + RBcellname));
      menu.Append(tui::TMCELL_REF_B , wxT("Add reference to " + RBcellname));
      menu.Append(tui::TMCELL_AREF_B, wxT("Add array of " + RBcellname));
      wxString ost;
      ost << wxT("export ") << RBcellname << wxT(" to GDS");
      menu.Append(tui::TMGDS_EXPORTC, ost);
      menu.Append(tui::TMCELL_REPORTLAY, wxT("Report layers used in " + RBcellname));
    }
    else {
      menu.Append(tui::TMCELL_NEW, wxT("New cell")); // will be catched up in toped.cpp
      menu.Append(tui::TMGDS_EXPORTL, wxT("GDS export"));
    }
    PopupMenu(&menu, pt);
}
开发者ID:BackupTheBerlios,项目名称:toped-svn,代码行数:19,代码来源:browsers.cpp


示例17: GetItemText

// 终端登录 将列表中的信息更新
void CListCtrlSock::setItemLogIn( CTerminal *pTml, UINT32 ulAddress )
{
	CString strObjID, strObjIDList;
	CString strAddress;
	strAddress.Format("%d",ulAddress );
	strObjID.Format("%X",(unsigned long)pTml);
	pTml->m_address = ulAddress;
	int nItem = 0;
	int i = 0;
	for(i = 0; i < GetItemCount(); i++)
	{
		strObjIDList = GetItemText(i, 5);
		if(strObjID.Compare(strObjIDList) == 0)
		{
			SetItemText(i, 1, strAddress);
			SetItemText(i, 4,"上线-已登录");
		}
	}
}
开发者ID:ruglcc,项目名称:gbnx31_tool,代码行数:20,代码来源:ListCtrlSock.cpp


示例18: pt

void CPropertiesList::OnDblclk(NMHDR* pNMHDR, LRESULT* pResult) 
{

  // Double-clicked the item	
  
  // We do not use the parameters on the OnDblClk handlers in order to preserve compatibility
  // between pre- and post-4.71 comctrl32.dll versions.
  
  int pos=GetMessagePos();
  CPoint pt(GET_X_LPARAM(pos),GET_Y_LPARAM(pos));
  ScreenToClient(&pt);
  int nItem=HitTest(pt,NULL);
  
  if(GetItemData(nItem)>1){
    // This is a property row
    const CdlGoalExpression goal = dynamic_cast<CdlGoalExpression> ((CdlProperty) GetItemData (nItem));
    if (goal){
      // This is a rule row
      const CdlExpression expression = goal->get_expression ();
      if (1 == expression->references.size ()) // if the property contains a single reference
      {
        // assume that the reference is to another user visible node and try to find it
        std::string macro_name = expression->references [0].get_destination_name ();
        CConfigItem * pItem = CConfigTool::GetConfigToolDoc ()->Find (CString (macro_name.c_str ()));
        if (pItem) // the referenced node was found so select it
        {
          CConfigTool::GetControlView()->GetTreeCtrl().SelectItem(pItem->HItem());
        }
      }
    }
  } else {
    const CString strText(GetItemText(nItem,0));
    if(strText==FieldTypeImage[File]){
      m_pti->ViewHeader();
    } else if (strText==FieldTypeImage[URL]) {
      m_pti->ViewURL();
    }
  }

	UNUSED_ALWAYS(pResult);
	UNUSED_ALWAYS(pNMHDR);
}
开发者ID:Robertysc,项目名称:ecos,代码行数:42,代码来源:PropertiesList.cpp


示例19: GetCurSel

void CListBoxEx::CreateEditControl()
{
    if(IsWindow(EditCtrl.m_hWnd))
        return;

    // create edit control
    int iItem = GetCurSel();
    if(iItem == LB_ERR)
        return;

    LBEXTITEMSTRUCT& lbis = Items[iItem];

    if(lbis.iEditType != lbeString &&
            lbis.iEditType != lbeInteger &&
            lbis.iEditType != lbeTexture)
        return;

    CRect r;
    GetItemRect(iItem, r);
    r.InflateRect(-1, -1);
    r.left += iCaptionWidthPixels;

    // create edit ctrl
    EditCtrl.Create(ES_LEFT | ES_LOWERCASE | WS_VISIBLE | WS_TABSTOP, r, this,
                    IDC_EDITPARAMETER);
    // set font
    HFONT hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
    if (hFont == NULL)
        hFont = (HFONT)GetStockObject(ANSI_VAR_FONT);
    EditCtrl.SendMessage(WM_SETFONT, (WPARAM)hFont);

    // set current text in edit ctrl
    char szBuf[128];
    GetItemText(iItem, szBuf);
    EditCtrl.SetWindowText(szBuf);

    EditCtrl.SetForegroundWindow();
    EditCtrl.SetSel(0, -1);

    bControlActive = TRUE;
    iControlItem = iItem;
}
开发者ID:steadyfield,项目名称:SourceEngine2007,代码行数:42,代码来源:listboxex.cpp


示例20: GetPathFromItem

void CRemoteTreeView::OnMenuDelete(wxCommandEvent&)
{
	if (!m_pState->IsRemoteIdle())
		return;

	if (!m_contextMenuItem)
		return;

	const CServerPath& path = GetPathFromItem(m_contextMenuItem);
	if (path.empty())
		return;

	if (wxMessageBoxEx(_("Really delete all selected files and/or directories from the server?"), _("Confirmation needed"), wxICON_QUESTION | wxYES_NO, this) != wxYES)
		return;

	const bool hasParent = path.HasParent();

	CRecursiveOperation* pRecursiveOperation = m_pState->GetRecursiveOperationHandler();

	CServerPath startDir;
	if (hasParent)
	{
		const wxString& name = GetItemText(m_contextMenuItem);
		startDir = path.GetParent();
		pRecursiveOperation->AddDirectoryToVisit(startDir, name);
	}
	else
	{
		startDir = path;
		pRecursiveOperation->AddDirectoryToVisit(startDir, _T(""));
	}

	CServerPath currentPath;
	const wxTreeItemId selected = GetSelection();
	if (selected)
		currentPath = GetPathFromItem(selected);
	if (!currentPath.empty() && (path == currentPath || path.IsParentOf(currentPath, false)))
		currentPath = startDir;

	CFilterManager filter;
	pRecursiveOperation->StartRecursiveOperation(CRecursiveOperation::recursive_delete, startDir, filter.GetActiveFilters(false), !hasParent, currentPath);
}
开发者ID:oneminot,项目名称:filezilla3,代码行数:42,代码来源:RemoteTreeView.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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