您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DeleteString函数代码示例

51自学网 2021-06-01 20:26:48
  C++
这篇教程C++ DeleteString函数代码示例写得很实用,希望能帮到您。

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

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

示例1: sString

// this version of AddString adds a string only if it doesn't already exist// in the list, and in any case, makes sure that the string is the first// in the list (ie most recent in history)// also makes sure number of items in the list doesn't exceed the maximum allowedint CHistoryCombo::AddString(LPCTSTR lpszString){	CString sString(lpszString);	// if it's not set up as a history combo then call base class	if (m_sSection.IsEmpty() || m_sKeyPrefix.IsEmpty())		return CComboBox::AddString(lpszString);	int nRet = -1;	// don't add if already there	sString.TrimLeft();	sString.TrimRight();	if (sString.IsEmpty())	{		TRACE(_T("ERROR  string is empty/n"));		return CB_ERR;	}	nRet = CComboBox::InsertString(0, sString);	int nIndex = FindStringExact(0, sString);	if (nIndex != -1 && nIndex != 0)		DeleteString(nIndex);	// if we've got too many items then delete the last one	// truncate list to m_nMaxHistoryItems	int nNumItems = GetCount();	for (int n = m_nMaxHistoryItems; n < nNumItems; n++)		DeleteString(m_nMaxHistoryItems);	SetCurSel(nRet);	return nRet;}
开发者ID:KurzedMetal,项目名称:Jaangle,代码行数:38,


示例2: FiniProfile

/* * FiniProfile - free the profile path strings */void FiniProfile( void ){    DeleteString( &cfgFile );    DeleteString( &iniFile );    DeleteString( &iniPath );} /* FiniProfile */
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:10,


示例3: switch

BOOL CSplitPointList::OnCommand(WPARAM wParam, LPARAM lParam){    // TODO: Speziellen Code hier einfügen und/oder Basisklasse aufrufen    AddSplitPointDlg*	aspd;    DWORD				dwSplitPos;    int					iIndex;    char				Buffer[200];    switch (LOWORD(wParam))    {    case IDM_ADDSPLITPOINT:        aspd=new AddSplitPointDlg;        aspd->SetSplitPos(0);        if (aspd->DoModal())        {            dwSplitPos=aspd->GetSplitPos();            if (CheckSplitPoint(dwSplitPos)) AddSplitPoint(dwSplitPos);        }        delete aspd;        break;    case IDM_REMOVESPLITPOINT:        iIndex=GetCurSel();        if (iIndex!=LB_ERR)        {            DeleteString(iIndex);        }        break;    case IDM_CHANGESPLITPOINT:        iIndex=GetCurSel();        if (iIndex!=LB_ERR)        {            GetText(iIndex,Buffer);            aspd=new AddSplitPointDlg;            aspd->SetSplitPos(atoi(Buffer));            if (aspd->DoModal())            {                dwSplitPos=aspd->GetSplitPos();                if (CheckSplitPoint(dwSplitPos))                {                    DeleteString(iIndex);                    AddSplitPoint(dwSplitPos);                }            }            delete aspd;        }        break;    }    return CListBox::OnCommand(wParam, lParam);}
开发者ID:BrunoReX,项目名称:avimuxgui,代码行数:50,


示例4: FindStringExact

int CSmartComboBox::AddString(LPCTSTR str){	if( _tcslen(str) == 0 )		return -1;	int oldIndex = FindStringExact(-1, str);	if( oldIndex >= 0 )		DeleteString(oldIndex);	if( GetCount() == m_nMaxStrings )		DeleteString(m_nMaxStrings-1);	return CComboBox::InsertString(0, str);}
开发者ID:BackupTheBerlios,项目名称:iris-svn,代码行数:14,


示例5: DeleteChannel

void DeleteChannel(channel *Channel) {   if (Channel == NULL) {      Error("DeleteChannel(): Channel = NULL");      return;   } else if (Channel->Type != CHANNEL) {      Error("DeleteChannel(): /"%s/" is not a channel",Channel->Id);      return;   }   DeleteString(&Channel->Id);   DeleteString(&Channel->Topic);   free(Channel);}
开发者ID:StraToN,项目名称:tux-target,代码行数:15,


示例6: GetNextPos

void CGuiEdit::AjustaCadena(int nStartPos,int  nEndPos ){		int numCharMove=0;	int LastChar=FindLasCharR(); //el ultimo caracter valido de la cadena	int LastCharDel=LastChar;	int init =nStartPos;	for (int i=nStartPos; i <= LastChar; i++)	{			int nNext = GetNextPos(nStartPos);			if (IsValidChar(m_szShowMask.GetAt(i),nNext) || m_szShowMask.GetAt(i)==m_cadResult.GetAt(i))//el caracter se puede mover a esa posicion						{				//se mueve el caracter				m_szShowMask.SetAt(nStartPos,m_szShowMask.GetAt(nNext));							//se reemplaza la ultima posicion despues del ultimo caracter con el				//equivalente en la mascara				//obtenemos la proxima posicion donde se moveria el proximo caracter				nStartPos = GetNextPos(nStartPos);				numCharMove++;			}			}	DeleteString(LastCharDel,LastCharDel);	SetSel(init,init);		m_KeySpecial=0;}
开发者ID:ZhaoboMeng,项目名称:k-line-print,代码行数:27,


示例7: ASSERT_VALID

BOOL COXHistoryCombo::DeleteItem(int nItemIndex /* = -1 */){	ASSERT_VALID(this);	if (nItemIndex == -1)		// ... No index was specified, get the current selection		nItemIndex = GetCurSel();	BOOL bSuccess = (DeleteString(nItemIndex) != CB_ERR);	if (bSuccess)	{		// Select the next item if it exists		if (nItemIndex < GetCount())		{			// ... Items have shifted up, select the same index			SetCurSel(nItemIndex);			CWnd* pParentWnd=GetParent();			if(pParentWnd!=NULL)			{				pParentWnd->SendMessage(WM_COMMAND,					MAKEWPARAM(GetDlgCtrlID(),CBN_SELCHANGE),(LPARAM)GetSafeHwnd());			}		}		else			// ... Last item was deleted, select the current last one (may not exist if the list is empty)			SetCurSel(nItemIndex - 1);	}	return bSuccess;}
开发者ID:drupalhunter-team,项目名称:TrackMonitor,代码行数:31,


示例8: GetWindowText

BOOL CUrlBox::PreTranslateMessage(MSG* pMsg){	if ((pMsg->message != WM_KEYDOWN))		return CComboBox::PreTranslateMessage(pMsg);    if (pMsg->wParam != VK_RETURN)       return CComboBox::PreTranslateMessage(pMsg);	// when the enter key is hit in the ComboBox we want to add the string	// to the top of the list and hilight it.  We also want to limit the	// list to the last 15 entries.	if ((pMsg->lParam & 0x40000000) == 0)   // Not a repeat.	{		CString strText;		GetWindowText(strText);		InsertString(0, strText);		SetCurSel(0);            m_curSel = 0;		if (GetCount() > 150)			DeleteString(GetCount()-1);      CMyglView* pView = ((CMyglApp *) AfxGetApp())->GetActiveView();      if (pView) { pView->ReadUrl( strText); }	}	return TRUE;}
开发者ID:deepmatrix,项目名称:blaxxun-cc3d,代码行数:31,


示例9: DeleteString

/* * Elimina un nodo del árbol. */void DeleteString(int p) {  int  replacement;  /* Si el nodo a borrar no está en el árbol, no hacemos nada. */  if ( tree[ p ].parent == UNUSED )    return;  /* Si el nodo a borrar sólo tiene un hijo, hacemos una contracción     del árbol. */  if ( tree[ p ].larger_child == UNUSED )    ContractNode( p, tree[ p ].smaller_child );  else if ( tree[ p ].smaller_child == UNUSED )    ContractNode( p, tree[ p ].larger_child );  /* Si el nodo a borrar tiene ambos descendientes. */  else {    /* Localizamos el siguiente nodo más peque
C++ DeleteWindowById函数代码示例
C++ DeleteService函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。